Merge pull request #1188 from adamscott/add-platform-macros

Add platform macros
pull/1203/head
David Snopek 2023-07-31 15:38:47 -05:00 committed by GitHub
commit 494b51698d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 0 deletions

View File

@ -100,3 +100,5 @@ def generate(env):
)
env.Append(CCFLAGS=arch_info["ccflags"])
env.Append(LINKFLAGS=["--target=" + arch_info["target"] + env["android_api_level"], "-march=" + arch_info["march"]])
env.Append(CPPDEFINES=["ANDROID_ENABLED", "UNIX_ENABLED"])

View File

@ -79,3 +79,5 @@ def generate(env):
env.Append(CCFLAGS=["-isysroot", env["IOS_SDK_PATH"]])
env.Append(LINKFLAGS=["-isysroot", env["IOS_SDK_PATH"], "-F" + env["IOS_SDK_PATH"]])
env.Append(CPPDEFINES=["IOS_ENABLED", "UNIX_ENABLED"])

View File

@ -43,3 +43,5 @@ def generate(env):
env.Append(CCFLAGS=["-O0", "-g"])
elif env["target"] == "release":
env.Append(CCFLAGS=["-O3"])
env.Append(CPPDEFINES=["WEB_ENABLED", "UNIX_ENABLED"])

View File

@ -32,3 +32,5 @@ def generate(env):
elif env["arch"] == "rv64":
env.Append(CCFLAGS=["-march=rv64gc"])
env.Append(LINKFLAGS=["-march=rv64gc"])
env.Append(CPPDEFINES=["LINUX_ENABLED", "UNIX_ENABLED"])

View File

@ -48,3 +48,5 @@ def generate(env):
"-Wl,-undefined,dynamic_lookup",
]
)
env.Append(CPPDEFINES=["MACOS_ENABLED", "UNIX_ENABLED"])

View File

@ -70,3 +70,5 @@ def generate(env):
"-static-libstdc++",
]
)
env.Append(CPPDEFINES=["WINDOWS_ENABLED"])