diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-07-20 11:01:47 +0300 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-07-20 11:01:47 +0300 |
commit | 0ee980abae91c481009152cdccab8e61c9625303 (patch) | |
tree | 51bbe81e9346547c0f758a6399f5d326315a9bee /tools/osx.py | |
parent | 8772a7faca8156a502b12dda36e46cdb6904814f (diff) | |
download | redot-cpp-0ee980abae91c481009152cdccab8e61c9625303.tar.gz |
Rename OSX to macOS.
Diffstat (limited to 'tools/osx.py')
-rw-r--r-- | tools/osx.py | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/tools/osx.py b/tools/osx.py deleted file mode 100644 index b709472..0000000 --- a/tools/osx.py +++ /dev/null @@ -1,55 +0,0 @@ -import os -import sys -import osxcross - - -def options(opts): - opts.Add("macos_deployment_target", "macOS deployment target", "default") - opts.Add("macos_sdk_path", "macOS SDK path", "") - osxcross.options(opts) - - -def exists(env): - return sys.platform == "darwin" or osxcross.exists(env) - - -def generate(env): - if env["arch"] not in ("universal", "arm64", "x86_64"): - print("Only universal, arm64, and x86_64 are supported on macOS. Exiting.") - Exit() - - if sys.platform == "darwin": - # Use clang on macOS by default - env["CXX"] = "clang++" - env["CC"] = "clang" - else: - # Use osxcross - osxcross.generate(env) - - if env["arch"] == "universal": - env.Append(LINKFLAGS=["-arch", "x86_64", "-arch", "arm64"]) - env.Append(CCFLAGS=["-arch", "x86_64", "-arch", "arm64"]) - else: - env.Append(LINKFLAGS=["-arch", env["arch"]]) - env.Append(CCFLAGS=["-arch", env["arch"]]) - - if env["macos_deployment_target"] != "default": - env.Append(CCFLAGS=["-mmacosx-version-min=" + env["macos_deployment_target"]]) - env.Append(LINKFLAGS=["-mmacosx-version-min=" + env["macos_deployment_target"]]) - - if env["macos_sdk_path"]: - env.Append(CCFLAGS=["-isysroot", env["macos_sdk_path"]]) - env.Append(LINKFLAGS=["-isysroot", env["macos_sdk_path"]]) - - env.Append( - LINKFLAGS=[ - "-framework", - "Cocoa", - "-Wl,-undefined,dynamic_lookup", - ] - ) - - if env["target"] == "debug": - env.Append(CCFLAGS=["-Og", "-g"]) - elif env["target"] == "release": - env.Append(CCFLAGS=["-O3"]) |