summaryrefslogtreecommitdiff
path: root/giscanner/ccompiler.py
diff options
context:
space:
mode:
authorPhilip Chimento <philip.chimento@gmail.com>2015-10-19 23:10:27 -0700
committerColin Walters <walters@verbum.org>2015-10-20 13:13:23 -0400
commit4a724ac699f0c34fba2fb452cfadea11540325e8 (patch)
treee8e2e56b0b1e86fc83d45028cbaa29d771a32cf6 /giscanner/ccompiler.py
parentaa4f3f5045f2952d4004bc1c7d7e076d1de03fdc (diff)
downloadgobject-introspection-4a724ac699f0c34fba2fb452cfadea11540325e8.tar.gz
scanner: Fix non-libtool linker flags on Darwin
Darwin's linker doesn't like "-rpath=path"; instead pass "-rpath path", which works on more linkers than the version with the = sign does. Additionally, Darwin's linker has no equivalent for "--no-as-needed" (it seems to do the right thing by default?) https://bugzilla.gnome.org/show_bug.cgi?id=625195
Diffstat (limited to 'giscanner/ccompiler.py')
-rw-r--r--giscanner/ccompiler.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py
index 224c3e5d..515b4227 100644
--- a/giscanner/ccompiler.py
+++ b/giscanner/ccompiler.py
@@ -128,11 +128,12 @@ class CCompiler(object):
self.compiler.add_runtime_library_dir('.')
# https://bugzilla.gnome.org/show_bug.cgi?id=625195
- args.append('-Wl,-rpath=.')
+ args.append('-Wl,-rpath,.')
# Ensure libraries are always linked as we are going to use ldd to work
# out their names later
- args.append('-Wl,--no-as-needed')
+ if sys.platform != 'darwin':
+ args.append('-Wl,--no-as-needed')
for library in libraries:
self.compiler.add_library(library)
@@ -140,7 +141,7 @@ class CCompiler(object):
for library_path in libpaths:
args.append('-L' + library_path)
if os.path.isabs(library_path):
- args.append('-Wl,-rpath=' + library_path)
+ args.append('-Wl,-rpath,' + library_path)
else:
# libtool case: assemble linker command arguments, like we did before