diff options
Diffstat (limited to 'premake5.lua')
| -rw-r--r-- | premake5.lua | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/premake5.lua b/premake5.lua index ecd2422dd..04649689e 100644 --- a/premake5.lua +++ b/premake5.lua @@ -246,10 +246,30 @@ newoption { buildoptions { "-D_GNU_SOURCE" } end + function getPlatforms(targetInfo) + if _ACTION == "xcode4" then + local arch = targetInfo.arch + local valueMap = + { + x86_64 = "x64", + arm = "aarch64", + } + + local value = valueMap[arch:lower()] + if value == nil then + return { arch } + else + return { value } + end + else + return { "x86", "x64", "aarch64" } + end + end + workspace "slang" -- We will support debug/release configuration and x86/x64 builds. configurations { "Debug", "Release" } - platforms { "x86", "x64", "aarch64" } + platforms(getPlatforms(targetInfo)) if buildLocation then location(buildLocation) @@ -281,6 +301,9 @@ newoption { -- Our `x64` platform should (obviously) target the x64 -- architecture and similarly for x86. + -- + -- https://premake.github.io/docs/architecture/ + -- filter { "platforms:x64" } architecture "x64" filter { "platforms:x86" } @@ -288,7 +311,6 @@ newoption { filter { "platforms:aarch64"} architecture "ARM" - filter { "toolset:clang or gcc*" } -- Makes all symbols hidden by default unless explicitly 'exported' buildoptions { "-fvisibility=hidden" } |
