fix #16947: --app:staticlib -o:lib now first removes lib (#16948)

This commit is contained in:
Timothee Cour 2021-02-08 13:26:09 -08:00 • committed by GitHub
commit ba64d0c8ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -662,6 +662,7 @@ proc addExternalFileToCompile*(conf: ConfigRef; filename: AbsoluteFile) =
proc getLinkCmd(conf: ConfigRef; output: AbsoluteFile,
objfiles: string, isDllBuild: bool): string =
if optGenStaticLib in conf.globalOptions:
removeFile output # fixes: bug #16947
result = CC[conf.cCompiler].buildLib % ["libfile", quoteShell(output),
"objfiles", objfiles]
else: