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
parent e211a2a9f6
commit ba64d0c8ab

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: