toolchain.lua 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572
  1. --
  2. -- Copyright 2010-2013 Branimir Karadzic. All rights reserved.
  3. -- License: http://www.opensource.org/licenses/BSD-2-Clause
  4. --
  5. local bxDir = (path.getabsolute("..") .. "/")
  6. function toolchain(_buildDir, _libDir)
  7. newoption {
  8. trigger = "gcc",
  9. value = "GCC",
  10. description = "Choose GCC flavor",
  11. allowed = {
  12. { "android-arm", "Android - ARM" },
  13. -- { "emscripten-experimental", "Emscripten" },
  14. { "linux", "Linux" },
  15. { "linux-clang", "Linux (Clang compiler)" },
  16. { "mingw", "MinGW" },
  17. { "nacl", "Native Client" },
  18. { "nacl-arm", "Native Client - ARM" },
  19. { "pnacl", "Native Client - PNaCl" },
  20. { "osx", "OSX" },
  21. { "ios-arm", "iOS - ARM" },
  22. { "ios-simulator", "iOS - Simulator" },
  23. { "qnx-arm", "QNX/Blackberry - ARM" },
  24. }
  25. }
  26. -- Avoid error when invoking premake4 --help.
  27. if (_ACTION == nil) then return end
  28. location (_buildDir .. "projects/" .. _ACTION)
  29. if _ACTION == "clean" then
  30. os.rmdir(BUILD_DIR)
  31. end
  32. if _ACTION == "gmake" then
  33. if nil == _OPTIONS["gcc"] then
  34. print("GCC flavor must be specified!")
  35. os.exit(1)
  36. end
  37. flags {
  38. "ExtraWarnings",
  39. }
  40. if "android-arm" == _OPTIONS["gcc"] then
  41. if not os.getenv("ANDROID_NDK_ARM") or not os.getenv("ANDROID_NDK_ROOT") then
  42. print("Set ANDROID_NDK_ARM and ANDROID_NDK_ROOT envrionment variables.")
  43. end
  44. premake.gcc.cc = "$(ANDROID_NDK_ARM)/bin/arm-linux-androideabi-gcc"
  45. premake.gcc.cxx = "$(ANDROID_NDK_ARM)/bin/arm-linux-androideabi-g++"
  46. premake.gcc.ar = "$(ANDROID_NDK_ARM)/bin/arm-linux-androideabi-ar"
  47. location (_buildDir .. "projects/" .. _ACTION .. "-android-arm")
  48. end
  49. if "emscripten-experimental" == _OPTIONS["gcc"] then
  50. if not os.getenv("EMSCRIPTEN") then
  51. print("Set EMSCRIPTEN enviroment variables.")
  52. end
  53. premake.gcc.cc = "$(EMSCRIPTEN)/emcc"
  54. premake.gcc.cxx = "$(EMSCRIPTEN)/em++"
  55. premake.gcc.ar = "$(EMSCRIPTEN)/emar"
  56. location (_buildDir .. "projects/" .. _ACTION .. "-emscripten")
  57. end
  58. if "linux" == _OPTIONS["gcc"] then
  59. location (_buildDir .. "projects/" .. _ACTION .. "-linux")
  60. end
  61. if "linux-clang" == _OPTIONS["gcc"] then
  62. premake.gcc.cc = "clang"
  63. premake.gcc.cxx = "clang++"
  64. premake.gcc.ar = "ar"
  65. location (_buildDir .. "projects/" .. _ACTION .. "-linux-clang")
  66. end
  67. if "mingw" == _OPTIONS["gcc"] then
  68. premake.gcc.cc = "$(MINGW)/bin/mingw32-gcc"
  69. premake.gcc.cxx = "$(MINGW)/bin/mingw32-g++"
  70. premake.gcc.ar = "$(MINGW)/bin/ar"
  71. location (_buildDir .. "projects/" .. _ACTION .. "-mingw")
  72. end
  73. if "nacl" == _OPTIONS["gcc"] then
  74. if not os.getenv("NACL_SDK_ROOT") then
  75. print("Set NACL_SDK_ROOT enviroment variables.")
  76. end
  77. premake.gcc.cc = "$(NACL_SDK_ROOT)/toolchain/win_x86_newlib/bin/x86_64-nacl-gcc"
  78. premake.gcc.cxx = "$(NACL_SDK_ROOT)/toolchain/win_x86_newlib/bin/x86_64-nacl-g++"
  79. premake.gcc.ar = "$(NACL_SDK_ROOT)/toolchain/win_x86_newlib/bin/x86_64-nacl-ar"
  80. location (_buildDir .. "projects/" .. _ACTION .. "-nacl")
  81. end
  82. if "nacl-arm" == _OPTIONS["gcc"] then
  83. if not os.getenv("NACL_SDK_ROOT") then
  84. print("Set NACL_SDK_ROOT enviroment variables.")
  85. end
  86. premake.gcc.cc = "$(NACL_SDK_ROOT)/toolchain/win_arm_newlib/bin/arm-nacl-gcc"
  87. premake.gcc.cxx = "$(NACL_SDK_ROOT)/toolchain/win_arm_newlib/bin/arm-nacl-g++"
  88. premake.gcc.ar = "$(NACL_SDK_ROOT)/toolchain/win_arm_newlib/bin/arm-nacl-ar"
  89. location (_buildDir .. "projects/" .. _ACTION .. "-nacl-arm")
  90. end
  91. if "pnacl" == _OPTIONS["gcc"] then
  92. if not os.getenv("NACL_SDK_ROOT") then
  93. print("Set NACL_SDK_ROOT enviroment variables.")
  94. end
  95. premake.gcc.cc = "$(NACL_SDK_ROOT)/toolchain/win_x86_pnacl/newlib/bin/pnacl-clang"
  96. premake.gcc.cxx = "$(NACL_SDK_ROOT)/toolchain/win_x86_pnacl/newlib/bin/pnacl-clang++"
  97. premake.gcc.ar = "$(NACL_SDK_ROOT)/toolchain/win_x86_pnacl/newlib/bin/pnacl-ar"
  98. location (_buildDir .. "projects/" .. _ACTION .. "-pnacl")
  99. end
  100. if "osx" == _OPTIONS["gcc"] then
  101. location (_buildDir .. "projects/" .. _ACTION .. "-osx")
  102. end
  103. if "ios-arm" == _OPTIONS["gcc"] then
  104. premake.gcc.cc = "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2"
  105. premake.gcc.cxx = "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-g++-4.2"
  106. premake.gcc.ar = "ar"
  107. location (_buildDir .. "projects/" .. _ACTION .. "-ios-arm")
  108. end
  109. if "ios-simulator" == _OPTIONS["gcc"] then
  110. premake.gcc.cc = "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/i686-apple-darwin11-llvm-gcc-4.2"
  111. premake.gcc.cxx = "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/i686-apple-darwin11-llvm-g++-4.2"
  112. premake.gcc.ar = "ar"
  113. location (_buildDir .. "projects/" .. _ACTION .. "-ios-simulator")
  114. end
  115. if "qnx-arm" == _OPTIONS["gcc"] then
  116. if not os.getenv("QNX_HOST") then
  117. print("Set QNX_HOST enviroment variables.")
  118. end
  119. premake.gcc.cc = "$(QNX_HOST)/usr/bin/arm-unknown-nto-qnx8.0.0eabi-gcc"
  120. premake.gcc.cxx = "$(QNX_HOST)/usr/bin/arm-unknown-nto-qnx8.0.0eabi-g++"
  121. premake.gcc.ar = "$(QNX_HOST)/usr/bin/arm-unknown-nto-qnx8.0.0eabi-ar"
  122. location (_buildDir .. "projects/" .. _ACTION .. "-qnx-arm")
  123. end
  124. end
  125. flags {
  126. "StaticRuntime",
  127. "NoMinimalRebuild",
  128. "NoPCH",
  129. "NativeWChar",
  130. "NoRTTI",
  131. "NoExceptions",
  132. "NoEditAndContinue",
  133. "Symbols",
  134. }
  135. defines {
  136. "__STDC_LIMIT_MACROS",
  137. "__STDC_FORMAT_MACROS",
  138. "__STDC_CONSTANT_MACROS",
  139. }
  140. configuration "Debug"
  141. targetsuffix "Debug"
  142. configuration "Release"
  143. flags {
  144. "OptimizeSpeed",
  145. }
  146. targetsuffix "Release"
  147. configuration { "vs*" }
  148. flags {
  149. "EnableSSE2",
  150. }
  151. includedirs { bxDir .. "include/compat/msvc" }
  152. defines {
  153. "WIN32",
  154. "_WIN32",
  155. "_HAS_EXCEPTIONS=0",
  156. "_HAS_ITERATOR_DEBUGGING=0",
  157. "_SCL_SECURE=0",
  158. "_SECURE_SCL=0",
  159. "_SCL_SECURE_NO_WARNINGS",
  160. "_CRT_SECURE_NO_WARNINGS",
  161. "_CRT_SECURE_NO_DEPRECATE",
  162. }
  163. buildoptions {
  164. "/Oy-", -- Suppresses creation of frame pointers on the call stack.
  165. "/Ob2", -- The Inline Function Expansion
  166. }
  167. configuration { "x32", "vs*" }
  168. targetdir (_buildDir .. "win32_" .. _ACTION .. "/bin")
  169. objdir (_buildDir .. "win32_" .. _ACTION .. "/obj")
  170. libdirs {
  171. _libDir .. "lib/win32_" .. _ACTION,
  172. "$(DXSDK_DIR)/lib/x86",
  173. }
  174. configuration { "x64", "vs*" }
  175. defines { "_WIN64" }
  176. targetdir (_buildDir .. "win64_" .. _ACTION .. "/bin")
  177. objdir (_buildDir .. "win64_" .. _ACTION .. "/obj")
  178. libdirs {
  179. _libDir .. "lib/win64_" .. _ACTION,
  180. "$(DXSDK_DIR)/lib/x64",
  181. }
  182. configuration { "mingw" }
  183. defines { "WIN32" }
  184. includedirs { bxDir .. "include/compat/mingw" }
  185. buildoptions {
  186. "-std=c++0x",
  187. "-U__STRICT_ANSI__",
  188. "-Wunused-value",
  189. "-fdata-sections",
  190. "-ffunction-sections",
  191. }
  192. linkoptions {
  193. "-Wl,--gc-sections",
  194. }
  195. configuration { "x32", "mingw" }
  196. targetdir (_buildDir .. "win32_mingw" .. "/bin")
  197. objdir (_buildDir .. "win32_mingw" .. "/obj")
  198. libdirs {
  199. _libDir .. "lib/win32_mingw",
  200. "$(DXSDK_DIR)/lib/x86",
  201. }
  202. buildoptions { "-m32" }
  203. configuration { "x64", "mingw" }
  204. targetdir (_buildDir .. "win64_mingw" .. "/bin")
  205. objdir (_buildDir .. "win64_mingw" .. "/obj")
  206. libdirs {
  207. _libDir .. "lib/win64_mingw",
  208. "$(DXSDK_DIR)/lib/x64",
  209. "$(GLES_X64_DIR)",
  210. }
  211. buildoptions { "-m64" }
  212. configuration { "linux and not linux-clang" }
  213. buildoptions {
  214. "-mfpmath=sse", -- force SSE to get 32-bit and 64-bit builds deterministic.
  215. }
  216. configuration { "linux-clang" }
  217. buildoptions {
  218. "--analyze",
  219. }
  220. configuration { "linux or linux-clang" }
  221. buildoptions {
  222. "-std=c++0x",
  223. "-U__STRICT_ANSI__",
  224. "-Wunused-value",
  225. "-msse2",
  226. }
  227. links {
  228. "rt",
  229. }
  230. linkoptions {
  231. "-Wl,--gc-sections",
  232. }
  233. configuration { "linux", "x32" }
  234. targetdir (_buildDir .. "linux32_gcc" .. "/bin")
  235. objdir (_buildDir .. "linux32_gcc" .. "/obj")
  236. libdirs { _libDir .. "lib/linux32_gcc" }
  237. buildoptions {
  238. "-m32",
  239. }
  240. configuration { "linux", "x64" }
  241. targetdir (_buildDir .. "linux64_gcc" .. "/bin")
  242. objdir (_buildDir .. "linux64_gcc" .. "/obj")
  243. libdirs { _libDir .. "lib/linux64_gcc" }
  244. buildoptions {
  245. "-m64",
  246. }
  247. configuration { "linux-clang", "x32" }
  248. targetdir (_buildDir .. "linux32_clang" .. "/bin")
  249. objdir (_buildDir .. "linux32_clang" .. "/obj")
  250. libdirs { _libDir .. "lib/linux32_clang" }
  251. buildoptions {
  252. "-m32",
  253. }
  254. configuration { "linux-clang", "x64" }
  255. targetdir (_buildDir .. "linux64_clang" .. "/bin")
  256. objdir (_buildDir .. "linux64_clang" .. "/obj")
  257. libdirs { _libDir .. "lib/linux64_clang" }
  258. buildoptions {
  259. "-m64",
  260. }
  261. configuration { "android-arm" }
  262. targetdir (_buildDir .. "android-arm" .. "/bin")
  263. objdir (_buildDir .. "android-arm" .. "/obj")
  264. flags {
  265. "NoImportLib",
  266. }
  267. libdirs {
  268. _libDir .. "lib/android-arm",
  269. "$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.7/libs/armeabi-v7a",
  270. }
  271. includedirs {
  272. "$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.7/include",
  273. "$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.7/libs/armeabi-v7a/include",
  274. "$(ANDROID_NDK_ROOT)/sources/android/native_app_glue",
  275. }
  276. linkoptions {
  277. "--sysroot=$(ANDROID_NDK_ROOT)/platforms/android-14/arch-arm",
  278. "-nostdlib",
  279. "$(ANDROID_NDK_ROOT)/platforms/android-14/arch-arm/usr/lib/crtbegin_so.o",
  280. "$(ANDROID_NDK_ROOT)/platforms/android-14/arch-arm/usr/lib/crtend_so.o",
  281. "-march=armv7-a",
  282. -- "-Wl,-shared,-Bsymbolic",
  283. -- "-Wl,--gc-sections",
  284. "-Wl,--fix-cortex-a8",
  285. -- "-Wl,--no-undefined",
  286. "-static-libgcc",
  287. "-no-canonical-prefixes",
  288. "-Wl,--no-undefined",
  289. "-Wl,-z,noexecstack",
  290. "-Wl,-z,relro",
  291. "-Wl,-z,now",
  292. }
  293. links {
  294. "c",
  295. "m",
  296. "android",
  297. "log",
  298. "gnustl_static",
  299. "gcc",
  300. }
  301. buildoptions {
  302. "-std=c++0x",
  303. "-U__STRICT_ANSI__",
  304. "-Wno-psabi", -- note: the mangling of 'va_list' has changed in GCC 4.4.0
  305. "-fpic",
  306. "--sysroot=$(ANDROID_NDK_ROOT)/platforms/android-14/arch-arm",
  307. "-mthumb",
  308. "-march=armv7-a",
  309. "-mfloat-abi=softfp",
  310. "-mfpu=vfpv3-d16",
  311. }
  312. configuration { "emscripten-experimental" }
  313. targetdir (_buildDir .. "emscripten" .. "/bin")
  314. objdir (_buildDir .. "emscripten" .. "/obj")
  315. libdirs { _libDir .. "lib/emscripten" }
  316. includedirs { "$(EMSCRIPTEN)/system/include" }
  317. buildoptions {
  318. "-pthread",
  319. }
  320. configuration { "nacl or nacl-arm or pnacl" }
  321. includedirs {
  322. "$(NACL_SDK_ROOT)/include",
  323. bxDir .. "include/compat/nacl",
  324. }
  325. configuration { "nacl" }
  326. buildoptions {
  327. "-std=c++0x",
  328. "-U__STRICT_ANSI__",
  329. "-pthread",
  330. "-fno-stack-protector",
  331. "-fdiagnostics-show-option",
  332. "-Wunused-value",
  333. "-fdata-sections",
  334. "-ffunction-sections",
  335. "-mfpmath=sse", -- force SSE to get 32-bit and 64-bit builds deterministic.
  336. "-msse2",
  337. -- "-fmerge-all-constants",
  338. }
  339. linkoptions {
  340. "-Wl,--gc-sections",
  341. }
  342. configuration { "x32", "nacl" }
  343. targetdir (_buildDir .. "nacl-x86" .. "/bin")
  344. objdir (_buildDir .. "nacl-x86" .. "/obj")
  345. libdirs { _libDir .. "lib/nacl-x86" }
  346. linkoptions { "-melf32_nacl" }
  347. configuration { "x64", "nacl" }
  348. targetdir (_buildDir .. "nacl-x64" .. "/bin")
  349. objdir (_buildDir .. "nacl-x64" .. "/obj")
  350. libdirs { _libDir .. "lib/nacl-x64" }
  351. linkoptions { "-melf64_nacl" }
  352. configuration { "nacl-arm" }
  353. buildoptions {
  354. "-std=c++0x",
  355. "-U__STRICT_ANSI__",
  356. "-fno-stack-protector",
  357. "-fdiagnostics-show-option",
  358. "-Wunused-value",
  359. "-Wno-psabi", -- note: the mangling of 'va_list' has changed in GCC 4.4.0
  360. "-fdata-sections",
  361. "-ffunction-sections",
  362. }
  363. targetdir (_buildDir .. "nacl-arm" .. "/bin")
  364. objdir (_buildDir .. "nacl-arm" .. "/obj")
  365. libdirs { _libDir .. "lib/nacl-arm" }
  366. configuration { "pnacl" }
  367. buildoptions {
  368. "-std=c++0x",
  369. "-U__STRICT_ANSI__",
  370. "-fno-stack-protector",
  371. "-fdiagnostics-show-option",
  372. "-Wunused-value",
  373. "-fdata-sections",
  374. "-ffunction-sections",
  375. }
  376. targetdir (_buildDir .. "pnacl" .. "/bin")
  377. objdir (_buildDir .. "pnacl" .. "/obj")
  378. libdirs { _libDir .. "lib/pnacl" }
  379. includedirs { "$(PNACL)/sysroot/include" }
  380. configuration { "Xbox360" }
  381. targetdir (_buildDir .. "xbox360" .. "/bin")
  382. objdir (_buildDir .. "xbox360" .. "/obj")
  383. includedirs { bxDir .. "include/compat/msvc" }
  384. libdirs { _libDir .. "lib/xbox360" }
  385. defines {
  386. "NOMINMAX",
  387. "_XBOX",
  388. }
  389. configuration { "osx", "x32" }
  390. targetdir (_buildDir .. "osx32_gcc" .. "/bin")
  391. objdir (_buildDir .. "osx32_gcc" .. "/obj")
  392. libdirs { _libDir .. "lib/osx32_gcc" }
  393. buildoptions {
  394. "-m32",
  395. }
  396. configuration { "osx", "x64" }
  397. targetdir (_buildDir .. "osx64_gcc" .. "/bin")
  398. objdir (_buildDir .. "osx64_gcc" .. "/obj")
  399. libdirs { _libDir .. "lib/osx64_gcc" }
  400. buildoptions {
  401. "-m64",
  402. }
  403. configuration { "osx" }
  404. buildoptions {
  405. "-U__STRICT_ANSI__",
  406. "-Wfatal-errors",
  407. "-Wunused-value",
  408. "-msse2",
  409. }
  410. includedirs { bxDir .. "include/compat/osx" }
  411. configuration { "ios-arm" }
  412. targetdir (_buildDir .. "ios-arm" .. "/bin")
  413. objdir (_buildDir .. "ios-arm" .. "/obj")
  414. libdirs { _libDir .. "lib/ios-arm" }
  415. linkoptions {
  416. "--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk",
  417. "-march=armv7-a",
  418. "-L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/lib/system",
  419. "-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks",
  420. "-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/PrivateFrameworks",
  421. }
  422. buildoptions {
  423. "--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk",
  424. "-mthumb",
  425. "-march=armv7-a",
  426. "-mfloat-abi=softfp",
  427. "-mfpu=neon",
  428. "-U__STRICT_ANSI__",
  429. "-Wfatal-errors",
  430. "-Wunused-value",
  431. }
  432. includedirs { bxDir .. "include/compat/osx" }
  433. configuration { "ios-simulator" }
  434. targetdir (_buildDir .. "ios-simulator" .. "/bin")
  435. objdir (_buildDir .. "ios-simulator" .. "/obj")
  436. libdirs { _libDir .. "lib/ios-simulator" }
  437. linkoptions {
  438. "--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk",
  439. "-L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/usr/lib/system",
  440. "-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/System/Library/Frameworks",
  441. "-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/System/Library/PrivateFrameworks",
  442. }
  443. buildoptions {
  444. "--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk",
  445. "-miphoneos-version-min=3.0.0",
  446. "-fobjc-abi-version=2",
  447. "-fobjc-legacy-dispatch",
  448. "-U__STRICT_ANSI__",
  449. "-Wfatal-errors",
  450. "-Wunused-value",
  451. }
  452. includedirs { bxDir .. "include/compat/osx" }
  453. configuration { "qnx-arm" }
  454. targetdir (_buildDir .. "qnx-arm" .. "/bin")
  455. objdir (_buildDir .. "qnx-arm" .. "/obj")
  456. libdirs { _libDir .. "lib/qnx-arm" }
  457. -- includedirs { bxDir .. "include/compat/qnx" }
  458. buildoptions {
  459. "-std=c++0x",
  460. "-U__STRICT_ANSI__",
  461. "-Wno-psabi", -- note: the mangling of 'va_list' has changed in GCC 4.4.0
  462. }
  463. configuration {} -- reset configuration
  464. end
  465. function strip()
  466. configuration { "android*", "Release" }
  467. postbuildcommands {
  468. "@echo Stripping symbols.",
  469. "@$(ANDROID_NDK_ARM)/bin/arm-linux-androideabi-strip -s \"$(TARGET)\""
  470. }
  471. configuration { "linux", "Release" }
  472. postbuildcommands {
  473. "@echo Stripping symbols.",
  474. "@strip -s \"$(TARGET)\""
  475. }
  476. configuration { "mingw", "Release" }
  477. postbuildcommands {
  478. "@echo Stripping symbols.",
  479. "@$(MINGW)/bin/strip -s \"$(TARGET)\""
  480. }
  481. configuration { "nacl", "Release" }
  482. postbuildcommands {
  483. "@echo Stripping symbols.",
  484. "@$(NACL_SDK_ROOT)/toolchain/win_x86_newlib/bin/x86_64-nacl-strip -s \"$(TARGET)\""
  485. }
  486. configuration { "nacl-arm", "Release" }
  487. postbuildcommands {
  488. "@echo Stripping symbols.",
  489. "@$(NACL_SDK_ROOT)/toolchain/win_arm_newlib/bin/arm-nacl-strip -s \"$(TARGET)\""
  490. }
  491. configuration { "pnacl", "Release" }
  492. postbuildcommands {
  493. "@echo Stripping symbols.",
  494. "@$(NACL_SDK_ROOT)/toolchain/win_x86_pnacl/newlib/bin/pnacl-strip -s \"$(TARGET)\""
  495. }
  496. configuration {} -- reset configuration
  497. end