Add compiler-specific configuration options for all compilers.
This commit is contained in:
parent
faad6ed67f
commit
747653911c
1 changed files with 10 additions and 1 deletions
|
|
@ -363,7 +363,16 @@ proc nameToCC*(name: string): TSystemCC =
|
||||||
proc getConfigVar(c: TSystemCC, suffix: string): string =
|
proc getConfigVar(c: TSystemCC, suffix: string): string =
|
||||||
# use ``cpu.os.cc`` for cross compilation, unless ``--compileOnly`` is given
|
# use ``cpu.os.cc`` for cross compilation, unless ``--compileOnly`` is given
|
||||||
# for niminst support
|
# for niminst support
|
||||||
let fullSuffix = (if gCmd == cmdCompileToCpp: ".cpp" & suffix else: suffix)
|
let fullSuffix =
|
||||||
|
if gCmd == cmdCompileToCpp:
|
||||||
|
".cpp" & suffix
|
||||||
|
elif gCmd == cmdCompileToOC:
|
||||||
|
".objc" & suffix
|
||||||
|
elif gCmd == cmdCompileToJS:
|
||||||
|
".js" & suffix
|
||||||
|
else:
|
||||||
|
suffix
|
||||||
|
|
||||||
if (platform.hostOS != targetOS or platform.hostCPU != targetCPU) and
|
if (platform.hostOS != targetOS or platform.hostCPU != targetCPU) and
|
||||||
optCompileOnly notin gGlobalOptions:
|
optCompileOnly notin gGlobalOptions:
|
||||||
let fullCCname = platform.CPU[targetCPU].name & '.' &
|
let fullCCname = platform.CPU[targetCPU].name & '.' &
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue