summary refs log tree commit diff stats
path: root/config
diff options
context:
space:
mode:
authorPhilip Wernersbach <philip.wernersbach@gmail.com>2015-03-15 19:08:58 -0400
committerPhilip Wernersbach <philip.wernersbach@gmail.com>2015-03-15 19:09:28 -0400
commit5be4e7b9f057f207c8f19176c9d0a58bee41ad4e (patch)
treee85137a379716260569b9c9b79e86bde2d6ce983 /config
parent747653911c088227ae0717179f83190a896f61e9 (diff)
downloadNim-5be4e7b9f057f207c8f19176c9d0a58bee41ad4e.tar.gz
Add linker flags for the Objective-C compilation mode.
Fixes Araq/Nim#2153.
Diffstat (limited to 'config')
-rw-r--r--config/nim.cfg16
1 files changed, 16 insertions, 0 deletions
diff --git a/config/nim.cfg b/config/nim.cfg
index cb3f897d4..ccb9977db 100644
--- a/config/nim.cfg
+++ b/config/nim.cfg
@@ -112,6 +112,22 @@ path="$lib/pure/unidecode"
   gcc.cpp.options.always = "-w -fpermissive"
 @end
 
+# Configuration for Objective-C compiler:
+#
+# Options for GNUStep. GNUStep configuration varies wildly, so you'll probably
+# have to add additional compiler and linker flags on a per-project basis.
+gcc.objc.options.linker = "-lobjc -lgnustep-base"
+llvm_gcc.objc.options.linker = "-lobjc -lgnustep-base"
+clang.objc.options.linker = "-lobjc -lgnustep-base"
+
+# Options for Mac OS X. Mac OS X uses its own Objective-C stack that is
+# totally different from GNUStep.
+@if macosx:
+  gcc.objc.options.linker = "-framework Foundation"
+  llvm_gcc.objc.options.linker = "-framework Foundation"
+  clang.objc.options.linker = "-framework Foundation"
+@end
+
 # Configuration for the VxWorks
 # This has been tested with VxWorks 6.9 only
 @if vxworks: