You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2016/03/14 19:57:11 UTC

mesos git commit: Don't use --as-needed linker flag on OSX.

Repository: mesos
Updated Branches:
  refs/heads/master 69b2ad528 -> 3eefe6d16


Don't use --as-needed linker flag on OSX.

Review: https://reviews.apache.org/r/44785/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/3eefe6d1
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/3eefe6d1
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/3eefe6d1

Branch: refs/heads/master
Commit: 3eefe6d16a08c20143dc750d664730b22bcd145b
Parents: 69b2ad5
Author: Steve Niemitz <sn...@twitter.com>
Authored: Mon Mar 14 14:56:46 2016 -0400
Committer: Vinod Kone <vi...@gmail.com>
Committed: Mon Mar 14 14:56:46 2016 -0400

----------------------------------------------------------------------
 src/python/native_common/ext_modules.py.in | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/3eefe6d1/src/python/native_common/ext_modules.py.in
----------------------------------------------------------------------
diff --git a/src/python/native_common/ext_modules.py.in b/src/python/native_common/ext_modules.py.in
index 0a005dc..c335bd8 100644
--- a/src/python/native_common/ext_modules.py.in
+++ b/src/python/native_common/ext_modules.py.in
@@ -18,6 +18,7 @@ import errno
 import glob
 import os
 import shutil
+import sys
 
 from setuptools import Extension
 
@@ -123,7 +124,10 @@ def _create_module(module_name):
     if os.path.exists(libprofiler):
         EXTRA_OBJECTS.append(libprofiler)
 
-    EXTRA_LINK_ARGS = ['-Wl,--as-needed']
+    # OSX uses a different linker (llvm-ld) and doesn't support --as-needed
+    # TODO(SteveNiemitz): Feature detect --as-needed instead of looking at
+    # sys.platform.
+    EXTRA_LINK_ARGS = ['-Wl,--as-needed'] if sys.platform != 'darwin' else []
 
     # Add any flags from LDFLAGS.
     if 'LDFLAGS' in os.environ: