pass platform argument only if vccexe is used (#13078)
* pass platform only if vccexe is used * fixes #12297
This commit is contained in:
parent
fadbd8f70d
commit
b4545f03de
1 changed files with 9 additions and 10 deletions
|
|
@ -558,15 +558,14 @@ proc getCompileOptions(conf: ConfigRef): string =
|
||||||
proc vccplatform(conf: ConfigRef): string =
|
proc vccplatform(conf: ConfigRef): string =
|
||||||
# VCC specific but preferable over the config hacks people
|
# VCC specific but preferable over the config hacks people
|
||||||
# had to do before, see #11306
|
# had to do before, see #11306
|
||||||
case conf.target.targetCPU
|
if conf.cCompiler == ccVcc:
|
||||||
of cpuI386:
|
let exe = getConfigVar(conf, conf.cCompiler, ".exe")
|
||||||
result = " --platform:x86"
|
if "vccexe.exe" == extractFilename(exe):
|
||||||
of cpuArm:
|
result = case conf.target.targetCPU
|
||||||
result = " --platform:arm"
|
of cpuI386: " --platform:x86"
|
||||||
of cpuAmd64:
|
of cpuArm: " --platform:arm"
|
||||||
result = " --platform:amd64"
|
of cpuAmd64: " --platform:amd64"
|
||||||
else:
|
else: ""
|
||||||
result = ""
|
|
||||||
|
|
||||||
proc getLinkOptions(conf: ConfigRef): string =
|
proc getLinkOptions(conf: ConfigRef): string =
|
||||||
result = conf.linkOptions & " " & conf.linkOptionsCmd & " "
|
result = conf.linkOptions & " " & conf.linkOptionsCmd & " "
|
||||||
|
|
@ -596,7 +595,7 @@ proc getLinkerExe(conf: ConfigRef; compiler: TSystemCC): string =
|
||||||
|
|
||||||
proc getCompileCFileCmd*(conf: ConfigRef; cfile: Cfile,
|
proc getCompileCFileCmd*(conf: ConfigRef; cfile: Cfile,
|
||||||
isMainFile = false; produceOutput = false): string =
|
isMainFile = false; produceOutput = false): string =
|
||||||
var c = conf.cCompiler
|
let c = conf.cCompiler
|
||||||
# We produce files like module.nim.cpp, so the absolute Nim filename is not
|
# We produce files like module.nim.cpp, so the absolute Nim filename is not
|
||||||
# cfile.name but `cfile.cname.changeFileExt("")`:
|
# cfile.name but `cfile.cname.changeFileExt("")`:
|
||||||
var options = cFileSpecificOptions(conf, cfile.nimname, cfile.cname.changeFileExt("").string)
|
var options = cFileSpecificOptions(conf, cfile.nimname, cfile.cname.changeFileExt("").string)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue