Merge pull request #2342 from philip-wernersbach/more-improved-objc

Fix linking errors with basic Objective-C FFI.
This commit is contained in:
Andreas Rumpf
2015-03-16 21:30:08 +01:00
2 changed files with 26 additions and 1 deletions

View File

@@ -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 & '.' &