mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-18 04:53:06 +01:00
Added NACL-ARM target.
This commit is contained in:
@@ -16,6 +16,7 @@ function toolchain(_buildDir, _libDir)
|
||||
{ "linux", "Linux" },
|
||||
{ "mingw", "MinGW" },
|
||||
{ "nacl", "Native Client" },
|
||||
{ "nacl-arm", "Native Client - ARM" },
|
||||
{ "pnacl", "Native Client - PNaCl" },
|
||||
{ "osx", "OS X" },
|
||||
}
|
||||
@@ -79,6 +80,18 @@ function toolchain(_buildDir, _libDir)
|
||||
location (_buildDir .. "projects/" .. _ACTION .. "-nacl")
|
||||
end
|
||||
|
||||
if "nacl-arm" == _OPTIONS["gcc"] then
|
||||
|
||||
if not os.getenv("NACL-ARM") then
|
||||
print("Set NACL-ARM enviroment variables.")
|
||||
end
|
||||
|
||||
premake.gcc.cc = "$(NACL-ARM)/bin/arm-nacl-gcc"
|
||||
premake.gcc.cxx = "$(NACL-ARM)/bin/arm-nacl-g++"
|
||||
premake.gcc.ar = "$(NACL-ARM)/bin/arm-nacl-ar"
|
||||
location (_buildDir .. "projects/" .. _ACTION .. "-nacl-arm")
|
||||
end
|
||||
|
||||
if "pnacl" == _OPTIONS["gcc"] then
|
||||
|
||||
if not os.getenv("PNACL") then
|
||||
@@ -265,6 +278,23 @@ function toolchain(_buildDir, _libDir)
|
||||
libdirs { _libDir .. "lib/nacl-x64" }
|
||||
linkoptions { "-melf64_nacl" }
|
||||
|
||||
configuration { "nacl-arm" }
|
||||
defines { "_BSD_SOURCE=1", "_POSIX_C_SOURCE=199506", "_XOPEN_SOURCE=600", "__native_client__", "__LITTLE_ENDIAN__" }
|
||||
includedirs { bxDir .. "include/compat/nacl" }
|
||||
buildoptions {
|
||||
"-std=c++0x",
|
||||
"-U__STRICT_ANSI__",
|
||||
"-fno-stack-protector",
|
||||
"-fdiagnostics-show-option",
|
||||
"-Wunused-value",
|
||||
"-Wno-psabi", -- note: the mangling of 'va_list' has changed in GCC 4.4.0
|
||||
"-fdata-sections",
|
||||
"-ffunction-sections",
|
||||
}
|
||||
targetdir (_buildDir .. "nacl-arm" .. "/bin")
|
||||
objdir (_buildDir .. "nacl-arm" .. "/obj")
|
||||
libdirs { _libDir .. "lib/nacl-arm" }
|
||||
|
||||
configuration { "pnacl" }
|
||||
defines { "_BSD_SOURCE=1", "_POSIX_C_SOURCE=199506", "_XOPEN_SOURCE=600", "__native_client__", "__LITTLE_ENDIAN__" }
|
||||
includedirs { bxDir .. "include/compat/nacl" }
|
||||
|
||||
Reference in New Issue
Block a user