diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2017-12-14 21:29:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-14 21:29:26 +0100 |
commit | 9314628921ca862277e43a08ec7272015a7ce67f (patch) | |
tree | 60e0f66d73505f7dcde360bb70c3453b8f74cb48 /platform/osx | |
parent | 93a63a5e1adf1886ea37a8357442de7e2c80cd20 (diff) | |
parent | 0571a3615273b1939c3868c13f933f5a96f464f7 (diff) | |
download | redot-engine-9314628921ca862277e43a08ec7272015a7ce67f.tar.gz |
Merge pull request #14667 from bruvzg/macports-clang-imp
Minor improvements for #14658 (MacPorts clang support)
Diffstat (limited to 'platform/osx')
-rw-r--r-- | platform/osx/SCsub | 5 | ||||
-rw-r--r-- | platform/osx/detect.py | 18 |
2 files changed, 12 insertions, 11 deletions
diff --git a/platform/osx/SCsub b/platform/osx/SCsub index 13ce14f040..029e3d808c 100644 --- a/platform/osx/SCsub +++ b/platform/osx/SCsub @@ -4,9 +4,10 @@ import os Import('env') def make_debug(target, source, env): - if (env["macports_clang"]): + if (env["macports_clang"] != 'no'): mpprefix = os.environ.get("MACPORTS_PREFIX", "/opt/local") - os.system(mpprefix + '/libexec/llvm-5.0/bin/llvm-dsymutil %s -o %s.dSYM' % (target[0], target[0])) + mpclangver = env["macports_clang"] + os.system(mpprefix + '/libexec/llvm-' + mpclangver + '/bin/llvm-dsymutil %s -o %s.dSYM' % (target[0], target[0])) else: os.system('dsymutil %s -o %s.dSYM' % (target[0], target[0])) diff --git a/platform/osx/detect.py b/platform/osx/detect.py index 77a4ee1a48..e8a8319431 100644 --- a/platform/osx/detect.py +++ b/platform/osx/detect.py @@ -72,19 +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"]): + if (env["macports_clang"] != 'no'): 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" + mpclangver = env["macports_clang"] + env["CC"] = mpprefix + "/libexec/llvm-" + mpclangver + "/bin/clang" + env["LD"] = mpprefix + "/libexec/llvm-" + mpclangver + "/bin/clang++" + env["CXX"] = mpprefix + "/libexec/llvm-" + mpclangver + "/bin/clang++" + env['AR'] = mpprefix + "/libexec/llvm-" + mpclangver + "/bin/llvm-ar" + env['RANLIB'] = mpprefix + "/libexec/llvm-" + mpclangver + "/bin/llvm-ranlib" + env['AS'] = mpprefix + "/libexec/llvm-" + mpclangver + "/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']) + env.Append(LINKFLAGS=['-fopenmp']) else: # osxcross build root = os.environ.get("OSXCROSS_ROOT", 0) |