summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorTomohiro <gpuppur@gmail.com>2022-09-28 22:07:41 +0900
committerGitHub <noreply@github.com>2022-09-28 15:07:41 +0200
commit92a0f191bf837287eec180288465d7b64d9bf47f (patch)
tree90207550577f8bd6e3eba6b390cee39ff68a4076 /compiler
parentde4b0346bdafab6c38b77d430d0e83f95da0582c (diff)
downloadNim-92a0f191bf837287eec180288465d7b64d9bf47f.tar.gz
Use vccexe when generating static lib with vcc (#19843)
Diffstat (limited to 'compiler')
-rw-r--r--compiler/extccomp.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/extccomp.nim b/compiler/extccomp.nim
index 0128ff3cb..256e02b22 100644
--- a/compiler/extccomp.nim
+++ b/compiler/extccomp.nim
@@ -155,7 +155,7 @@ compiler vcc:
     compileTmpl: "/c$vccplatform $options $include /nologo /Fo$objfile $file",
     buildGui: " /SUBSYSTEM:WINDOWS user32.lib ",
     buildDll: " /LD",
-    buildLib: "lib /OUT:$libfile $objfiles",
+    buildLib: "vccexe --command:lib$vccplatform /nologo /OUT:$libfile $objfiles",
     linkerExe: "cl",
     linkTmpl: "$builddll$vccplatform /Fe$exefile $objfiles $buildgui /nologo $options",
     includeCmd: " /I",
@@ -676,7 +676,8 @@ proc getLinkCmd(conf: ConfigRef; output: AbsoluteFile,
     if removeStaticFile:
       removeFile output # fixes: bug #16947
     result = CC[conf.cCompiler].buildLib % ["libfile", quoteShell(output),
-                                            "objfiles", objfiles]
+                                            "objfiles", objfiles,
+                                            "vccplatform", vccplatform(conf)]
   else:
     var linkerExe = getConfigVar(conf, conf.cCompiler, ".linkerexe")
     if linkerExe.len == 0: linkerExe = getLinkerExe(conf, conf.cCompiler)