From 747653911c088227ae0717179f83190a896f61e9 Mon Sep 17 00:00:00 2001 From: Philip Wernersbach Date: Sun, 15 Mar 2015 19:07:42 -0400 Subject: [PATCH] Add compiler-specific configuration options for all compilers. --- compiler/extccomp.nim | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/compiler/extccomp.nim b/compiler/extccomp.nim index 8888632b9..a68e7f734 100644 --- a/compiler/extccomp.nim +++ b/compiler/extccomp.nim @@ -363,7 +363,16 @@ proc nameToCC*(name: string): TSystemCC = proc getConfigVar(c: TSystemCC, suffix: string): string = # use ``cpu.os.cc`` for cross compilation, unless ``--compileOnly`` is given # 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 optCompileOnly notin gGlobalOptions: let fullCCname = platform.CPU[targetCPU].name & '.' &