Add platform macros

pull/1188/head
Adam Scott 2023-07-22 08:46:14 -04:00
parent 1009da4d7e
commit 9d9f4279ed
No known key found for this signature in database
GPG Key ID: 1352C2919D96DDDF
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(CCFLAGS=arch_info["ccflags"])
env.Append(LINKFLAGS=["--target=" + arch_info["target"] + env["android_api_level"], "-march=" + arch_info["march"]]) 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(CCFLAGS=["-isysroot", env["IOS_SDK_PATH"]])
env.Append(LINKFLAGS=["-isysroot", env["IOS_SDK_PATH"], "-F" + 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"]) env.Append(CCFLAGS=["-O0", "-g"])
elif env["target"] == "release": elif env["target"] == "release":
env.Append(CCFLAGS=["-O3"]) env.Append(CCFLAGS=["-O3"])
env.Append(CPPDEFINES=["WEB_ENABLED", "UNIX_ENABLED"])

View File

@ -32,3 +32,5 @@ def generate(env):
elif env["arch"] == "rv64": elif env["arch"] == "rv64":
env.Append(CCFLAGS=["-march=rv64gc"]) env.Append(CCFLAGS=["-march=rv64gc"])
env.Append(LINKFLAGS=["-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", "-Wl,-undefined,dynamic_lookup",
] ]
) )
env.Append(CPPDEFINES=["MACOS_ENABLED", "UNIX_ENABLED"])

View File

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