mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
OSX: Added separate osx-arm64 build configuration.
This commit is contained in:
@@ -81,7 +81,7 @@ project "bx.test"
|
||||
"pthread",
|
||||
}
|
||||
|
||||
configuration { "osx" }
|
||||
configuration { "osx*" }
|
||||
links {
|
||||
"Cocoa.framework",
|
||||
}
|
||||
@@ -126,7 +126,7 @@ project "bx.bench"
|
||||
"pthread",
|
||||
}
|
||||
|
||||
configuration { "osx" }
|
||||
configuration { "osx*" }
|
||||
links {
|
||||
"Cocoa.framework",
|
||||
}
|
||||
|
||||
@@ -71,7 +71,8 @@ function toolchain(_buildDir, _libDir)
|
||||
{ "mingw-gcc", "MinGW" },
|
||||
{ "mingw-clang", "MinGW (clang compiler)" },
|
||||
{ "netbsd", "NetBSD" },
|
||||
{ "osx", "OSX" },
|
||||
{ "osx-x64", "OSX - x64" },
|
||||
{ "osx-arm64", "OSX - ARM64" },
|
||||
{ "orbis", "Orbis" },
|
||||
{ "riscv", "RISC-V" },
|
||||
{ "rpi", "RaspberryPi" },
|
||||
@@ -361,7 +362,9 @@ function toolchain(_buildDir, _libDir)
|
||||
elseif "netbsd" == _OPTIONS["gcc"] then
|
||||
location (path.join(_buildDir, "projects", _ACTION .. "-netbsd"))
|
||||
|
||||
elseif "osx" == _OPTIONS["gcc"] then
|
||||
elseif "osx-x64" == _OPTIONS["gcc"]
|
||||
or "osx-arm64" == _OPTIONS["gcc"] then
|
||||
|
||||
|
||||
if os.is("linux") then
|
||||
if not os.getenv("OSXCROSS") then
|
||||
@@ -373,7 +376,8 @@ function toolchain(_buildDir, _libDir)
|
||||
premake.gcc.cxx = "$(OSXCROSS)/target/bin/" .. osxToolchain .. "clang++"
|
||||
premake.gcc.ar = "$(OSXCROSS)/target/bin/" .. osxToolchain .. "ar"
|
||||
end
|
||||
location (path.join(_buildDir, "projects", _ACTION .. "-osx"))
|
||||
|
||||
location (path.join(_buildDir, "projects", _ACTION .. "-" .. _OPTIONS["gcc"]))
|
||||
|
||||
elseif "orbis" == _OPTIONS["gcc"] then
|
||||
|
||||
@@ -986,37 +990,29 @@ function toolchain(_buildDir, _libDir)
|
||||
path.join(bxDir, "include/compat/freebsd"),
|
||||
}
|
||||
|
||||
configuration { "osx", "x32" }
|
||||
targetdir (path.join(_buildDir, "osx32_clang/bin"))
|
||||
objdir (path.join(_buildDir, "osx32_clang/obj"))
|
||||
--libdirs { path.join(_libDir, "lib/osx32_clang") }
|
||||
buildoptions {
|
||||
"-m32",
|
||||
}
|
||||
|
||||
configuration { "osx", "x64" }
|
||||
targetdir (path.join(_buildDir, "osx64_clang/bin"))
|
||||
objdir (path.join(_buildDir, "osx64_clang/obj"))
|
||||
--libdirs { path.join(_libDir, "lib/osx64_clang") }
|
||||
configuration { "osx-x64" }
|
||||
targetdir (path.join(_buildDir, "osx-x64/bin"))
|
||||
objdir (path.join(_buildDir, "osx-x64/obj"))
|
||||
buildoptions {
|
||||
"-m64",
|
||||
"-msse2",
|
||||
"-target x86_64-apple-macos" .. (#macosPlatform > 0 and macosPlatform or "10.11"),
|
||||
}
|
||||
|
||||
configuration { "osx", "Universal" }
|
||||
targetdir (path.join(_buildDir, "osx_universal/bin"))
|
||||
objdir (path.join(_buildDir, "osx_universal/obj"))
|
||||
configuration { "osx-arm64" }
|
||||
targetdir (path.join(_buildDir, "osx-arm64/bin"))
|
||||
objdir (path.join(_buildDir, "osx-arm64/obj"))
|
||||
buildoptions {
|
||||
"-arch arm64",
|
||||
"-Wno-error=unused-command-line-argument",
|
||||
"-Wno-unused-command-line-argument",
|
||||
}
|
||||
|
||||
configuration { "osx", "Native" }
|
||||
targetdir (path.join(_buildDir, "osx/bin"))
|
||||
objdir (path.join(_buildDir, "osx/obj"))
|
||||
|
||||
configuration { "osx" }
|
||||
configuration { "osx*" }
|
||||
buildoptions {
|
||||
"-Wfatal-errors",
|
||||
"-msse2",
|
||||
"-Wunused-value",
|
||||
"-Wundef",
|
||||
"-target x86_64-apple-macos" .. (#macosPlatform > 0 and macosPlatform or "10.11"),
|
||||
}
|
||||
includedirs { path.join(bxDir, "include/compat/osx") }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user