summaryrefslogtreecommitdiffstats
path: root/docs/release/scripts/toolchain.lua
diff options
context:
space:
mode:
author Robbbert <pac0446@bigpond.net.au>2016-04-27 18:59:40 +1000
committer Robbbert <pac0446@bigpond.net.au>2016-04-27 18:59:40 +1000
commitbcd8558b02cb54eab92df98f14bf07221d6d358b (patch)
treec29211cecf250a791c074dfc3e1fc9a2d9a1a593 /docs/release/scripts/toolchain.lua
parent0d70c1f8cdb9e66fd7bc5bcad128e394a2345607 (diff)
0.173 Release Fileshbmame173
Diffstat (limited to 'docs/release/scripts/toolchain.lua')
-rw-r--r--docs/release/scripts/toolchain.lua452
1 files changed, 292 insertions, 160 deletions
diff --git a/docs/release/scripts/toolchain.lua b/docs/release/scripts/toolchain.lua
index 137a873ae09..2a5490fab06 100644
--- a/docs/release/scripts/toolchain.lua
+++ b/docs/release/scripts/toolchain.lua
@@ -16,8 +16,11 @@ newoption {
description = "Choose GCC flavor",
allowed = {
{ "android-arm", "Android - ARM" },
+ { "android-arm64", "Android - ARM64" },
{ "android-mips", "Android - MIPS" },
+ { "android-mips64","Android - MIPS64" },
{ "android-x86", "Android - x86" },
+ { "android-x64", "Android - x64" },
{ "asmjs", "Emscripten/asm.js" },
{ "freebsd", "FreeBSD" },
{ "linux-gcc", "Linux (GCC compiler)" },
@@ -27,17 +30,14 @@ newoption {
{ "mingw32-gcc", "MinGW32" },
{ "mingw64-gcc", "MinGW64" },
{ "mingw-clang", "MinGW (clang compiler)" },
- { "nacl", "Native Client" },
- { "nacl-arm", "Native Client - ARM" },
{ "netbsd", "NetBSD" },
- { "os2", "OS/2" },
{ "osx", "OSX (GCC compiler)" },
{ "osx-clang", "OSX (Clang compiler)" },
{ "pnacl", "Native Client - PNaCl" },
- { "qnx-arm", "QNX/Blackberry - ARM" },
{ "rpi", "RaspberryPi" },
- { "solaris", "Solaris" },
- { "steamlink", "Steam Link" },
+ { "solaris", "Solaris" },
+ { "steamlink", "Steam Link" },
+ { "ci20", "Creator-Ci20" },
},
}
@@ -46,12 +46,12 @@ newoption {
value = "toolset",
description = "Choose VS toolset",
allowed = {
- { "intel-14", "Intel C++ Compiler XE 14.0" },
- { "intel-15", "Intel C++ Compiler XE 15.0" },
+ { "intel-14", "Intel C++ Compiler XE 14.0" },
+ { "intel-15", "Intel C++ Compiler XE 15.0" },
{ "vs2013-clang", "Clang 3.6" },
{ "vs2015-clang", "Clang 3.6" },
- { "vs2013-xp", "Visual Studio 2013 targeting XP" },
- { "vs2015-xp", "Visual Studio 2015 targeting XP" },
+ { "vs2013-xp", "Visual Studio 2013 targeting XP" },
+ { "vs2015-xp", "Visual Studio 2015 targeting XP" },
{ "winphone8", "Windows Phone 8.0" },
{ "winphone81", "Windows Phone 8.1" },
{ "winstore81", "Windows Store 8.1" },
@@ -81,6 +81,12 @@ newoption {
description = "Set iOS target version (default: 8.0).",
}
+newoption {
+ trigger = "with-windows",
+ value = "#",
+ description = "Set the Windows target platform version (default: 10.0.10240.0).",
+}
+
function toolchain(_buildDir, _subDir)
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION)
@@ -95,6 +101,11 @@ function toolchain(_buildDir, _subDir)
iosPlatform = _OPTIONS["with-ios"]
end
+ local windowsPlatform = "10.0.10240.0"
+ if _OPTIONS["with-windows"] then
+ windowsPlatform = _OPTIONS["with-windows"]
+ end
+
if _ACTION == "gmake" then
if nil == _OPTIONS["gcc"] or nil == _OPTIONS["gcc_version"] then
@@ -108,36 +119,77 @@ function toolchain(_buildDir, _subDir)
print("Set ANDROID_NDK_ARM and ANDROID_NDK_ROOT envrionment variables.")
end
- premake.gcc.cc = "$(ANDROID_NDK_ARM)/bin/arm-linux-androideabi-gcc"
- premake.gcc.cxx = "$(ANDROID_NDK_ARM)/bin/arm-linux-androideabi-g++"
+ premake.gcc.cc = "$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe"
+ premake.gcc.cxx = "$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe"
premake.gcc.ar = "$(ANDROID_NDK_ARM)/bin/arm-linux-androideabi-ar"
+ premake.gcc.llvm = true
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-android-arm")
end
+ if "android-arm64" == _OPTIONS["gcc"] then
+
+ if not os.getenv("ANDROID_NDK_ARM64") or not os.getenv("ANDROID_NDK_ROOT") then
+ print("Set ANDROID_NDK_ARM64 and ANDROID_NDK_ROOT envrionment variables.")
+ end
+
+ premake.gcc.cc = "$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe"
+ premake.gcc.cxx = "$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe"
+ premake.gcc.ar = "$(ANDROID_NDK_ARM64)/bin/aarch64-linux-android-ar.exe"
+ premake.gcc.llvm = true
+ location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-android-arm64")
+ end
+
if "android-mips" == _OPTIONS["gcc"] then
if not os.getenv("ANDROID_NDK_MIPS") or not os.getenv("ANDROID_NDK_ROOT") then
print("Set ANDROID_NDK_MIPS and ANDROID_NDK_ROOT envrionment variables.")
end
- premake.gcc.cc = "$(ANDROID_NDK_MIPS)/bin/mipsel-linux-android-gcc"
- premake.gcc.cxx = "$(ANDROID_NDK_MIPS)/bin/mipsel-linux-android-g++"
+ premake.gcc.cc = "$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe"
+ premake.gcc.cxx = "$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe"
premake.gcc.ar = "$(ANDROID_NDK_MIPS)/bin/mipsel-linux-android-ar"
+ premake.gcc.llvm = true
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-android-mips")
end
+ if "android-mips64" == _OPTIONS["gcc"] then
+
+ if not os.getenv("ANDROID_NDK_MIPS64") or not os.getenv("ANDROID_NDK_ROOT") then
+ print("Set ANDROID_NDK_MIPS64 and ANDROID_NDK_ROOT envrionment variables.")
+ end
+
+ premake.gcc.cc = "$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe"
+ premake.gcc.cxx = "$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe"
+ premake.gcc.ar = "$(ANDROID_NDK_MIPS64)/bin/mips64el-linux-android-ar.exe"
+ premake.gcc.llvm = true
+ location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-android-mips64")
+ end
+
if "android-x86" == _OPTIONS["gcc"] then
if not os.getenv("ANDROID_NDK_X86") or not os.getenv("ANDROID_NDK_ROOT") then
print("Set ANDROID_NDK_X86 and ANDROID_NDK_ROOT envrionment variables.")
end
- premake.gcc.cc = "$(ANDROID_NDK_X86)/bin/i686-linux-android-gcc"
- premake.gcc.cxx = "$(ANDROID_NDK_X86)/bin/i686-linux-android-g++"
+ premake.gcc.cc = "$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe"
+ premake.gcc.cxx = "$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe"
premake.gcc.ar = "$(ANDROID_NDK_X86)/bin/i686-linux-android-ar"
+ premake.gcc.llvm = true
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-android-x86")
end
+ if "android-x64" == _OPTIONS["gcc"] then
+
+ if not os.getenv("ANDROID_NDK_X64") or not os.getenv("ANDROID_NDK_ROOT") then
+ print("Set ANDROID_NDK_X64 and ANDROID_NDK_ROOT envrionment variables.")
+ end
+
+ premake.gcc.cc = "$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe"
+ premake.gcc.cxx = "$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe"
+ premake.gcc.ar = "$(ANDROID_NDK_X64)/bin/x86_64-linux-android-ar.exe"
+ premake.gcc.llvm = true
+ location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-android-x64")
+ end
if "asmjs" == _OPTIONS["gcc"] then
if not os.getenv("EMSCRIPTEN") then
@@ -205,6 +257,26 @@ function toolchain(_buildDir, _subDir)
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-steamlink")
end
+ if "rpi" == _OPTIONS["gcc"] then
+ if not os.getenv("RASPBERRY_SDK_PATH") then
+ print("Set RASPBERRY_SDK_PATH envrionment variable.")
+ end
+ premake.gcc.cc = "$(RASPBERRY_SDK_PATH)/bin/arm-linux-gnueabihf-gcc"
+ premake.gcc.cxx = "$(RASPBERRY_SDK_PATH)/bin/arm-linux-gnueabihf-g++"
+ premake.gcc.ar = "$(RASPBERRY_SDK_PATH)/bin/arm-linux-gnueabihf-ar"
+ location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-rpi")
+ end
+
+ if "ci20" == _OPTIONS["gcc"] then
+ if not os.getenv("MIPS_LINUXGNU_ROOT") then
+ print("Set MIPS_LINUXGNU_ROOT envrionment variable.")
+ end
+ premake.gcc.cc = "$(MIPS_LINUXGNU_ROOT)/bin/mips-mti-linux-gnu-gcc"
+ premake.gcc.cxx = "$(MIPS_LINUXGNU_ROOT)/bin/mips-mti-linux-gnu-g++"
+ premake.gcc.ar = "$(MIPS_LINUXGNU_ROOT)/bin/mips-mti-linux-gnu-ar"
+ location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-ci20")
+ end
+
if "mingw32-gcc" == _OPTIONS["gcc"] then
if not os.getenv("MINGW32") then
print("Set MINGW32 envrionment variable.")
@@ -253,44 +325,6 @@ function toolchain(_buildDir, _subDir)
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-mingw-clang")
end
- if "nacl" == _OPTIONS["gcc"] then
-
- if not os.getenv("NACL_SDK_ROOT") then
- print("Set NACL_SDK_ROOT enviroment variables.")
- end
-
- naclToolchain = "$(NACL_SDK_ROOT)/toolchain/win_x86_newlib/bin/x86_64-nacl-"
- if os.is("macosx") then
- naclToolchain = "$(NACL_SDK_ROOT)/toolchain/mac_x86_newlib/bin/x86_64-nacl-"
- elseif os.is("linux") then
- naclToolchain = "$(NACL_SDK_ROOT)/toolchain/linux_x86_newlib/bin/x86_64-nacl-"
- end
-
- premake.gcc.cc = naclToolchain .. "gcc"
- premake.gcc.cxx = naclToolchain .. "g++"
- premake.gcc.ar = naclToolchain .. "ar"
- location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-nacl")
- end
-
- if "nacl-arm" == _OPTIONS["gcc"] then
-
- if not os.getenv("NACL_SDK_ROOT") then
- print("Set NACL_SDK_ROOT enviroment variables.")
- end
-
- naclToolchain = "$(NACL_SDK_ROOT)/toolchain/win_arm_newlib/bin/arm-nacl-"
- if os.is("macosx") then
- naclToolchain = "$(NACL_SDK_ROOT)/toolchain/mac_arm_newlib/bin/arm-nacl-"
- elseif os.is("linux") then
- naclToolchain = "$(NACL_SDK_ROOT)/toolchain/linux_arm_newlib/bin/arm-nacl-"
- end
-
- premake.gcc.cc = naclToolchain .. "gcc"
- premake.gcc.cxx = naclToolchain .. "g++"
- premake.gcc.ar = naclToolchain .. "ar"
- location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-nacl-arm")
- end
-
if "osx" == _OPTIONS["gcc"] then
if os.is("linux") then
premake.gcc.cc = toolchainPrefix .. "clang"
@@ -326,25 +360,14 @@ function toolchain(_buildDir, _subDir)
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-pnacl")
end
- if "qnx-arm" == _OPTIONS["gcc"] then
-
- if not os.getenv("QNX_HOST") then
- print("Set QNX_HOST enviroment variables.")
- end
-
- premake.gcc.cc = "$(QNX_HOST)/usr/bin/arm-unknown-nto-qnx8.0.0eabi-gcc"
- premake.gcc.cxx = "$(QNX_HOST)/usr/bin/arm-unknown-nto-qnx8.0.0eabi-g++"
- premake.gcc.ar = "$(QNX_HOST)/usr/bin/arm-unknown-nto-qnx8.0.0eabi-ar"
- location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-qnx-arm")
- end
-
if "rpi" == _OPTIONS["gcc"] then
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-rpi")
end
- if "os2" == _OPTIONS["gcc"] then
- location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-os2")
+ if "ci20" == _OPTIONS["gcc"] then
+ location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-ci20")
end
+
elseif _ACTION == "vs2013" or _ACTION == "vs2015" then
if (_ACTION .. "-clang") == _OPTIONS["vs"] then
@@ -373,6 +396,15 @@ function toolchain(_buildDir, _subDir)
if "winstore82" == _OPTIONS["vs"] then
premake.vstudio.toolset = "v140"
premake.vstudio.storeapp = "8.2"
+
+ -- If needed, depending on GENie version, enable file-level configuration
+ if enablefilelevelconfig ~= nil then
+ enablefilelevelconfig()
+ end
+
+ local action = premake.action.current()
+ action.vstudio.windowsTargetPlatformVersion = windowsPlatform
+
platforms { "ARM" }
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-winstore82")
end
@@ -391,7 +423,7 @@ function toolchain(_buildDir, _subDir)
premake.vstudio.toolset = ("v120_xp")
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-xp")
end
-
+
if ("vs2015-xp") == _OPTIONS["vs"] then
premake.vstudio.toolset = ("v140_xp")
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-xp")
@@ -477,7 +509,6 @@ function toolchain(_buildDir, _subDir)
removeflags {
"StaticRuntime",
"NoExceptions",
- "EnableMinimalRebuild",
}
configuration { "mingw*" }
@@ -525,6 +556,93 @@ function toolchain(_buildDir, _subDir)
configuration { "steamlink", "Debug" }
targetdir (_buildDir .. "steamlink/bin/Debug")
+ configuration { "rpi" }
+ objdir ( _buildDir .. "rpi/obj")
+ libdirs {
+ "$(RASPBERRY_SYSROOT)/opt/vc/lib",
+ }
+ includedirs {
+ "$(RASPBERRY_SYSROOT)/opt/vc/include",
+ "$(RASPBERRY_SYSROOT)/opt/vc/include/interface/vcos/pthreads",
+ "$(RASPBERRY_SYSROOT)/opt/vc/include/interface/vmcs_host/linux",
+ }
+ defines {
+ "__VCCOREVER__=0x04000000", -- There is no special prefedined compiler symbol to detect RaspberryPi, faking it.
+ }
+ linkoptions {
+ "-Wl,--gc-sections",
+ }
+ buildoptions {
+ "--sysroot=$(RASPBERRY_SYSROOT)",
+ }
+ linkoptions {
+ "-static-libgcc",
+ "-static-libstdc++",
+ "--sysroot=$(RASPBERRY_SYSROOT)",
+ }
+
+ configuration { "rpi", "Release" }
+ targetdir (_buildDir .. "rpi/bin/Release")
+
+ configuration { "rpi", "Debug" }
+ targetdir (_buildDir .. "rpi/bin/Debug")
+
+ configuration { "ci20" }
+ objdir ( _buildDir .. "ci20/obj")
+ includedirs {
+ "$(CI20_SYSROOT)/mipsel-r2-hard/usr/include/c++/4.9",
+ "$(CI20_SYSROOT)/mipsel-r2-hard/usr/include/mipsel-linux-gnu/c++/4.9",
+ "$(CI20_SYSROOT)/mipsel-r2-hard/usr/include/c++/4.9/backward",
+ "$(CI20_SYSROOT)/mipsel-r2-hard/usr/lib/gcc/mipsel-linux-gnu/4.9/include",
+ "$(CI20_SYSROOT)/mipsel-r2-hard/usr/local/include",
+ "$(CI20_SYSROOT)/mipsel-r2-hard/usr/lib/gcc/mipsel-linux-gnu/4.9/include-fixed",
+ "$(CI20_SYSROOT)/mipsel-r2-hard/usr/include/mipsel-linux-gnu",
+ "$(CI20_SYSROOT)/mipsel-r2-hard/usr/include",
+ }
+ links {
+ "c",
+ "dl",
+ "m",
+ "gcc",
+ "stdc++",
+ "gcc_s",
+ }
+
+ buildoptions {
+ "--sysroot=$(CI20_SYSROOT)",
+ "-Wno-pragmas",
+ "-Wno-undef",
+ "-EL",
+ "-mel",
+ "-march=mips32r2",
+ "-mllsc",
+ "-mabi=32",
+ }
+ linkoptions {
+ "--sysroot=$(CI20_SYSROOT)",
+ "-Wl,-rpath=$(CI20_SYSROOT)/mipsel-r2-hard/usr/lib/mipsel-linux-gnu/",
+ "-Wl,-rpath=$(CI20_SYSROOT)/mipsel-r2-hard/lib/mipsel-linux-gnu/",
+ "-nostdlib",
+ "-EL",
+ "-mel",
+ "-march=mips32r2",
+ "-mllsc",
+ "-mabi=32",
+ "$(MIPS_LINUXGNU_ROOT)/lib/gcc/mips-mti-linux-gnu/4.9.2/mipsel-r2-hard/lib/crtbegin.o",
+ "$(MIPS_LINUXGNU_ROOT)/lib/gcc/mips-mti-linux-gnu/4.9.2/mipsel-r2-hard/lib/crtend.o",
+ "-L$(CI20_SYSROOT)/mipsel-r2-hard/usr/lib/gcc/mipsel-linux-gnu/4.9",
+ "-L$(CI20_SYSROOT)/mipsel-r2-hard/usr/lib/mipsel-linux-gnu",
+ "-L$(CI20_SYSROOT)/mipsel-r2-hard/usr/lib",
+ "-L$(CI20_SYSROOT)/mipsel-r2-hard/lib/mipsel-linux-gnu",
+ "-L$(CI20_SYSROOT)/mipsel-r2-hard/lib",
+ }
+
+ configuration { "ci20", "Release" }
+ targetdir (_buildDir .. "ci20/bin/Release")
+
+ configuration { "ci20", "Debug" }
+ targetdir (_buildDir .. "ci20/bin/Debug")
+
configuration { "mingw-clang" }
linkoptions {
"-Wl,--allow-multiple-definition",
@@ -669,12 +787,13 @@ function toolchain(_buildDir, _subDir)
configuration { "android-*" }
includedirs {
- "$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/include",
+ MAME_DIR .. "3rdparty/bgfx/3rdparty/khronos",
+ "$(ANDROID_NDK_ROOT)/sources/cxx-stl/llvm-libc++/libcxx/include",
+ "$(ANDROID_NDK_ROOT)/sources/android/support/include",
"$(ANDROID_NDK_ROOT)/sources/android/native_app_glue",
}
linkoptions {
"-nostdlib",
- "-static-libgcc",
}
flags {
"NoImportLib",
@@ -685,19 +804,21 @@ function toolchain(_buildDir, _subDir)
"m",
"android",
"log",
- "gnustl_static",
+ "c++_static",
"gcc",
}
buildoptions {
- "-fPIC",
- "-no-canonical-prefixes",
- "-Wa,--noexecstack",
- "-fstack-protector",
+ "-fpic",
"-ffunction-sections",
- "-Wno-cast-align",
- "-Wno-psabi", -- note: the mangling of 'va_list' has changed in GCC 4.4.0
+ "-funwind-tables",
+ "-fstack-protector-strong",
+ "-no-canonical-prefixes",
+ "-fno-integrated-as",
"-Wunused-value",
"-Wundef",
+ "-Wno-cast-align",
+ "-Wno-unknown-attributes",
+ "-Wno-macro-redefined",
}
linkoptions {
"-no-canonical-prefixes",
@@ -712,73 +833,144 @@ function toolchain(_buildDir, _subDir)
targetdir (_buildDir .. "android-arm" .. "/bin")
objdir (_buildDir .. "android-arm" .. "/obj")
libdirs {
- "$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a",
+ "$(ANDROID_NDK_ROOT)/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a",
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-arm/usr/lib",
}
includedirs {
- "$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include",
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-arm/usr/include",
}
buildoptions {
- "-mthumb",
+ "-gcc-toolchain $(ANDROID_NDK_ARM)",
+ "-target armv7-none-linux-androideabi",
"-march=armv7-a",
"-mfloat-abi=softfp",
- "-mfpu=neon",
- "-Wunused-value",
- "-Wundef",
+ "-mfpu=vfpv3-d16",
+ "-mthumb",
}
linkoptions {
+ "-gcc-toolchain $(ANDROID_NDK_ARM)",
+ "--sysroot=$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-arm",
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-arm/usr/lib/crtbegin_so.o",
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-arm/usr/lib/crtend_so.o",
+ "-target armv7-none-linux-androideabi",
"-march=armv7-a",
- "-Wl,--fix-cortex-a8",
+ "-mthumb",
+ }
+
+ configuration { "android-arm64" }
+ androidPlatform = "android-21" -- supported from API 21
+ targetdir (_buildDir .. "android-arm64" .. "/bin")
+ objdir (_buildDir .. "android-arm64" .. "/obj")
+ libdirs {
+ "$(ANDROID_NDK_ROOT)/sources/cxx-stl/llvm-libc++/libs/arm64-v8a",
+ "$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-arm64/usr/lib64",
+ }
+ includedirs {
+ "$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-arm64/usr/include",
+ }
+ buildoptions {
+ "-gcc-toolchain $(ANDROID_NDK_ARM64)",
+ "-target aarch64-none-linux-android",
+ }
+ linkoptions {
+ "-gcc-toolchain $(ANDROID_NDK_ARM64)",
+ "--sysroot=$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-arm64",
+ "$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-arm64/usr/lib/crtbegin_so.o",
+ "$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-arm64/usr/lib/crtend_so.o",
+ "-target aarch64-none-linux-android",
}
configuration { "android-mips" }
targetdir (_buildDir .. "android-mips" .. "/bin")
objdir (_buildDir .. "android-mips" .. "/obj")
libdirs {
- "$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/mips",
+ "$(ANDROID_NDK_ROOT)/sources/cxx-stl/llvm-libc++/libs/mips",
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-mips/usr/lib/",
}
includedirs {
- "$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/mips/include",
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-mips/usr/include",
}
buildoptions {
- "-Wunused-value",
- "-Wundef",
+ "-gcc-toolchain $(ANDROID_NDK_MIPS)",
+ "-target mipsel-none-linux-android",
}
linkoptions {
+ "-gcc-toolchain $(ANDROID_NDK_MIPS)",
+ "-target mipsel-none-linux-android",
+ "--sysroot=$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-mips",
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-mips/usr/lib/crtbegin_so.o",
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-mips/usr/lib/crtend_so.o",
}
+ configuration { "android-mips64" }
+ androidPlatform = "android-21" -- supported from API 21
+ targetdir (_buildDir .. "android-mips64" .. "/bin")
+ objdir (_buildDir .. "android-mips64" .. "/obj")
+ libdirs {
+ "$(ANDROID_NDK_ROOT)/sources/cxx-stl/llvm-libc++/libs/mips64",
+ "$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-mips64/usr/lib64/",
+ }
+ includedirs {
+ "$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-mips64/usr/include",
+ }
+ buildoptions {
+ "-gcc-toolchain $(ANDROID_NDK_MIPS64)",
+ "-target mips64el-none-linux-android",
+ }
+ linkoptions {
+ "-gcc-toolchain $(ANDROID_NDK_MIPS64)",
+ "-target mips64el-none-linux-android",
+ "--sysroot=$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-mips64",
+ "$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-mips64/usr/lib64/crtbegin_so.o",
+ "$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-mips64/usr/lib64/crtend_so.o",
+ }
+
configuration { "android-x86" }
targetdir (_buildDir .. "android-x86" .. "/bin")
objdir (_buildDir .. "android-x86" .. "/obj")
libdirs {
- "$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/x86",
+ "$(ANDROID_NDK_ROOT)/sources/cxx-stl/llvm-libc++/libs/x86",
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-x86/usr/lib",
}
includedirs {
- "$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/x86/include",
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-x86/usr/include",
}
buildoptions {
- "-march=i686",
- "-mtune=atom",
- "-mstackrealign",
- "-msse3",
- "-mfpmath=sse",
- "-Wunused-value",
- "-Wundef",
+ "-gcc-toolchain $(ANDROID_NDK_X86)",
+ "-target i686-none-linux-android",
+ "-mssse3"
}
linkoptions {
+ "-gcc-toolchain $(ANDROID_NDK_X86)",
+ "-target i686-none-linux-android",
+ "-mssse3",
+ "--sysroot=$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-x86",
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-x86/usr/lib/crtbegin_so.o",
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-x86/usr/lib/crtend_so.o",
}
+ configuration { "android-x64" }
+ androidPlatform = "android-21" -- supported from API 21
+ targetdir (_buildDir .. "android-x64" .. "/bin")
+ objdir (_buildDir .. "android-x64" .. "/obj")
+ libdirs {
+ "$(ANDROID_NDK_ROOT)/sources/cxx-stl/llvm-libc++/libs/x86_64",
+ "$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-x86_64/usr/lib64",
+ }
+ includedirs {
+ "$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-x86_64/usr/include",
+ }
+ buildoptions {
+ "-gcc-toolchain $(ANDROID_NDK_X64)",
+ "-target x86_64-none-linux-android",
+ }
+ linkoptions {
+ "-gcc-toolchain $(ANDROID_NDK_X64)",
+ "-target x86_64-none-linux-android",
+ "--sysroot=$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-x86_64",
+ "$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-x86_64/usr/lib64/crtbegin_so.o",
+ "$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-x86_64/usr/lib64/crtend_so.o",
+ }
configuration { "asmjs" }
targetdir (_buildDir .. "asmjs" .. "/bin")
@@ -801,7 +993,7 @@ function toolchain(_buildDir, _subDir)
"-Wno-extern-c-compat",
}
- configuration { "nacl or nacl-arm or pnacl" }
+ configuration { "pnacl" }
buildoptions {
"-U__STRICT_ANSI__", -- strcasecmp, setenv, unsetenv,...
"-fno-stack-protector",
@@ -810,11 +1002,6 @@ function toolchain(_buildDir, _subDir)
"-ffunction-sections",
"-Wunused-value",
}
- configuration { "nacl or nacl-arm" }
- includedirs {
- "$(NACL_SDK_ROOT)/include",
- "$(NACL_SDK_ROOT)/include/newlib",
- }
configuration { "pnacl" }
buildoptions {
@@ -826,36 +1013,6 @@ function toolchain(_buildDir, _subDir)
"$(NACL_SDK_ROOT)/include/pnacl",
}
- configuration { "x32", "nacl" }
- targetdir (_buildDir .. "nacl-x86" .. "/bin/x32")
- objdir (_buildDir .. "nacl-x86" .. "/obj")
-
- configuration { "x32", "nacl", "Debug" }
- libdirs { "$(NACL_SDK_ROOT)/lib/newlib_x86_32/Debug" }
-
- configuration { "x32", "nacl", "Release" }
- libdirs { "$(NACL_SDK_ROOT)/lib/newlib_x86_32/Release" }
-
- configuration { "x64", "nacl" }
- targetdir (_buildDir .. "nacl-x64" .. "/bin/x64")
- objdir (_buildDir .. "nacl-x64" .. "/obj")
-
- configuration { "x64", "nacl", "Debug" }
- libdirs { "$(NACL_SDK_ROOT)/lib/newlib_x86_64/Debug" }
-
- configuration { "x64", "nacl", "Release" }
- libdirs { "$(NACL_SDK_ROOT)/lib/newlib_x86_64/Release" }
-
- configuration { "nacl-arm" }
- targetdir (_buildDir .. "nacl-arm" .. "/bin")
- objdir (_buildDir .. "nacl-arm" .. "/obj")
-
- configuration { "nacl-arm", "Debug" }
- libdirs { "$(NACL_SDK_ROOT)/lib/newlib_arm/Debug" }
-
- configuration { "nacl-arm", "Release" }
- libdirs { "$(NACL_SDK_ROOT)/lib/newlib_arm/Release" }
-
configuration { "pnacl" }
targetdir (_buildDir .. "pnacl" .. "/bin")
objdir (_buildDir .. "pnacl" .. "/obj")
@@ -897,23 +1054,10 @@ function toolchain(_buildDir, _subDir)
targetdir (_buildDir .. "ios-simulator" .. "/bin")
objdir (_buildDir .. "ios-simulator" .. "/obj")
- configuration { "qnx-arm" }
- targetdir (_buildDir .. "qnx-arm" .. "/bin")
- objdir (_buildDir .. "qnx-arm" .. "/obj")
-
configuration { "rpi" }
targetdir (_buildDir .. "rpi" .. "/bin")
objdir (_buildDir .. "rpi" .. "/obj")
- configuration { "os2" }
- objdir (_buildDir .. "os2" .. "/obj")
-
- configuration { "os2", "Release" }
- targetdir (_buildDir .. "os2" .. "/bin/Release")
-
- configuration { "os2", "Debug" }
- targetdir (_buildDir .. "os2" .. "/bin/Debug")
-
configuration {} -- reset configuration
return true
@@ -971,12 +1115,6 @@ function strip()
"$(SILENT) " .. naclToolchain .. "finalize \"$(TARGET)\""
}
- configuration { "*nacl*", "Release" }
- postbuildcommands {
- "$(SILENT) echo Stripping symbols.",
- "$(SILENT) " .. naclToolchain .. "strip -s \"$(TARGET)\""
- }
-
configuration { "asmjs" }
postbuildcommands {
"$(SILENT) echo Running asmjs finalize.",
@@ -984,12 +1122,6 @@ function strip()
-- ALLOW_MEMORY_GROWTH
}
- configuration { "os2", "Release" }
- postbuildcommands {
- "$(SILENT) echo Stripping symbols.",
- "$(SILENT) lxlite /B- /L- /CS \"$(TARGET)\""
- }
-
configuration {} -- reset configuration
end