toolchain.lua 15 KB

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