diff options
| author | 2015-09-13 09:55:03 -0500 | |
|---|---|---|
| committer | 2015-09-13 09:55:03 -0500 | |
| commit | c9d6609bf055a125445ac03368e961e0f45f8aab (patch) | |
| tree | 6e2ead6a543aa14247a6700e3db5e6e7f053cfc8 /scripts | |
| parent | ce83817f7e1d2f9a5288fb402d555efc4a8374f9 (diff) | |
fix cross compile paths, make ar work with lto until Windows GCC fixed
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/toolchain.lua | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/scripts/toolchain.lua b/scripts/toolchain.lua index e04c8199003..76d3ab5c4b7 100644 --- a/scripts/toolchain.lua +++ b/scripts/toolchain.lua @@ -195,9 +195,14 @@ function toolchain(_buildDir, _subDir) end premake.gcc.cc = "$(MINGW32)/bin/i686-w64-mingw32-gcc" premake.gcc.cxx = "$(MINGW32)/bin/i686-w64-mingw32-g++" - premake.gcc.ar = "$(MINGW32)/bin/ar" --- lto docs say to use gcc-ar so that plugin is completely setup, but this doesn't work in windows with the current build tools' copy of gcc-ar.exe --- premake.gcc.ar = "$(MINGW32)/bin/gcc-ar" +-- lto docs say to use gcc-ar so that plugin is completely setup, but this doesn't work in Windows with the current buildtool's version of gcc-ar.exe +-- if you are using LTO=1 you must have GCC 5.0+ + + if _OPTIONS["LTO"]=="1" then + premake.gcc.ar = "$(MINGW32)/bin/i686-w64-mingw32-gcc-ar" + else + premake.gcc.ar = "$(MINGW32)/bin/i686-w64-mingw32-ar" + end location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-mingw32-gcc") end @@ -207,9 +212,15 @@ function toolchain(_buildDir, _subDir) end premake.gcc.cc = "$(MINGW64)/bin/x86_64-w64-mingw32-gcc" premake.gcc.cxx = "$(MINGW64)/bin/x86_64-w64-mingw32-g++" - premake.gcc.ar = "$(MINGW64)/bin/ar" --- lto docs say to use gcc-ar so that plugin is completely setup, but this doesn't work in windows with the current build tools' copy of gcc-ar.exe --- premake.gcc.ar = "$(MINGW64)/bin/gcc-ar" +-- lto docs say to use gcc-ar so that plugin is completely setup, but this doesn't work in Windows with the current buildtool's version of gcc-ar.exe +-- if you are using LTO=1 you must have GCC 5.0+ + + if _OPTIONS["LTO"]=="1" then + premake.gcc.ar = "$(MINGW64)/bin/x86_64-w64-mingw32-gcc-ar" + else + premake.gcc.ar = "$(MINGW64)/bin/x86_64-w64-mingw32-ar" + end + location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-mingw64-gcc") end |
