summaryrefslogtreecommitdiffstats
path: root/platform/osx/detect.py
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-12-14 16:09:08 +0100
committerGitHub <noreply@github.com>2017-12-14 16:09:08 +0100
commitccea45e4fd7f2fa23584e2ab3fe42a228781795f (patch)
tree5baf65aa14680f09ad5cd7d87c43ff2f7503e394 /platform/osx/detect.py
parent9fab3811419aa58b864b5c190fc0fe3fa60ba9e1 (diff)
parentf8303ec6fb94ad15dcfdef59c315eef609768734 (diff)
downloadredot-engine-ccea45e4fd7f2fa23584e2ab3fe42a228781795f.tar.gz
Merge pull request #14658 from bruvzg/macports-clang
Adds `macports_clang` build flag.
Diffstat (limited to 'platform/osx/detect.py')
-rw-r--r--platform/osx/detect.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/platform/osx/detect.py b/platform/osx/detect.py
index ff7cf2ad2f..77a4ee1a48 100644
--- a/platform/osx/detect.py
+++ b/platform/osx/detect.py
@@ -72,6 +72,19 @@ def configure(env):
else: # 64-bit, default
env.Append(CCFLAGS=['-arch', 'x86_64'])
env.Append(LINKFLAGS=['-arch', 'x86_64'])
+ if (env["macports_clang"]):
+ mpprefix = os.environ.get("MACPORTS_PREFIX", "/opt/local")
+ env["CC"] = mpprefix + "/libexec/llvm-5.0/bin/clang"
+ env["LD"] = mpprefix + "/libexec/llvm-5.0/bin/clang++"
+ env["CXX"] = mpprefix + "/libexec/llvm-5.0/bin/clang++"
+ env['AR'] = mpprefix + "/libexec/llvm-5.0/bin/llvm-ar"
+ env['RANLIB'] = mpprefix + "/libexec/llvm-5.0/bin/llvm-ranlib"
+ env['AS'] = mpprefix + "/libexec/llvm-5.0/bin/llvm-as"
+ env.Append(CCFLAGS=['-D__MACPORTS__']) #hack to fix libvpx MM256_BROADCASTSI128_SI256 define
+ if (env["openmp"]):
+ env.Append(CPPFLAGS=['-fopenmp'])
+ env.Append(LINKFLAGS=['-L' + mpprefix + '/lib/libomp/'])
+ env.Append(LIBS=['gomp'])
else: # osxcross build
root = os.environ.get("OSXCROSS_ROOT", 0)