summaryrefslogtreecommitdiffstats
path: root/platform/osx/detect.py
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-12-22 12:31:43 +0100
committerRémi Verschelde <rverschelde@gmail.com>2018-12-22 12:36:19 +0100
commitd52100f4ffd3191ca070be34043c5a5343cd1a0b (patch)
tree790e7c4f99e12b225fa2b5f5c1da111a205898be /platform/osx/detect.py
parent404f39422665375e62863c0247768759bb2cd0be (diff)
downloadredot-engine-d52100f4ffd3191ca070be34043c5a5343cd1a0b.tar.gz
SCons: Allow building Mono module with OSXCross
Improve the test logic to only assume that we're building for macOS if OSXCROSS_ROOT is defined *and* we requested p=osx. Supersedes #24480.
Diffstat (limited to 'platform/osx/detect.py')
-rw-r--r--platform/osx/detect.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/platform/osx/detect.py b/platform/osx/detect.py
index 051836b66d..6eee8f204f 100644
--- a/platform/osx/detect.py
+++ b/platform/osx/detect.py
@@ -72,7 +72,11 @@ def configure(env):
## Compiler configuration
- if "OSXCROSS_ROOT" not in os.environ: # regular native build
+ # Save this in environment for use by other modules
+ if "OSXCROSS_ROOT" in os.environ:
+ env["osxcross"] = True
+
+ if not "osxcross" in env: # regular native build
env.Append(CCFLAGS=['-arch', 'x86_64'])
env.Append(LINKFLAGS=['-arch', 'x86_64'])
if (env["macports_clang"] != 'no'):