You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
[macOS] Add support for the Apple Silicon (ARM64) build target.
This commit is contained in:
@@ -87,8 +87,15 @@ def configure(env):
|
||||
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["arch"] == "arm64":
|
||||
print("Building for macOS 10.15+, platform arm64.")
|
||||
env.Append(CCFLAGS=["-arch", "arm64", "-mmacosx-version-min=10.15", "-target", "arm64-apple-macos10.15"])
|
||||
env.Append(LINKFLAGS=["-arch", "arm64", "-mmacosx-version-min=10.15", "-target", "arm64-apple-macos10.15"])
|
||||
else:
|
||||
print("Building for macOS 10.12+, platform x86-64.")
|
||||
env.Append(CCFLAGS=["-arch", "x86_64", "-mmacosx-version-min=10.12"])
|
||||
env.Append(LINKFLAGS=["-arch", "x86_64", "-mmacosx-version-min=10.12"])
|
||||
|
||||
if env["macports_clang"] != "no":
|
||||
mpprefix = os.environ.get("MACPORTS_PREFIX", "/opt/local")
|
||||
mpclangver = env["macports_clang"]
|
||||
@@ -148,7 +155,8 @@ def configure(env):
|
||||
## Dependencies
|
||||
|
||||
if env["builtin_libtheora"]:
|
||||
env["x86_libtheora_opt_gcc"] = True
|
||||
if env["arch"] != "arm64":
|
||||
env["x86_libtheora_opt_gcc"] = True
|
||||
|
||||
## Flags
|
||||
|
||||
@@ -189,6 +197,3 @@ def configure(env):
|
||||
env.Append(LIBS=["vulkan"])
|
||||
|
||||
# env.Append(CPPDEFINES=['GLES_ENABLED', 'OPENGL_ENABLED'])
|
||||
|
||||
env.Append(CCFLAGS=["-mmacosx-version-min=10.12"])
|
||||
env.Append(LINKFLAGS=["-mmacosx-version-min=10.12"])
|
||||
|
||||
Reference in New Issue
Block a user