summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Cowering <cowering@users.noreply.github.com>2015-05-29 17:43:09 -0500
committer Cowering <cowering@users.noreply.github.com>2015-05-29 17:43:09 -0500
commitf115ab2dd2fd42c3d90bdbd3ce16e091839df24e (patch)
treeef6e89d2f56844571b8dc5eec3826baafd18723b
parentb834a345750804ebf1afc80ff47215beffcb939d (diff)
Let subtarget MESS (not MAME, yet) compile with Windows GCC 5.1 and lto. I am told 'any' recent GCC for Windows has gcc-ar wrapper, if not, change back the line in toolchain.lua (NW)
-rw-r--r--scripts/genie.lua23
-rw-r--r--scripts/toolchain.lua3
2 files changed, 11 insertions, 15 deletions
diff --git a/scripts/genie.lua b/scripts/genie.lua
index 004016c916f..356d4d8d3dc 100644
--- a/scripts/genie.lua
+++ b/scripts/genie.lua
@@ -725,24 +725,19 @@ if _OPTIONS["OPTIMIZE"] then
}
end
if _OPTIONS["LTO"]=="1" then
+-- -flto=4 -> 4 threads
buildoptions {
- "-flto",
+ "-flto=4",
+ }
+ buildoptions {
+ "-fno-fat-lto-objects",
+ }
+ linkoptions {
+ "-flto=4",
}
--- buildoptions {
--- "-ffat-lto-objects",
--- }
--- buildoptions {
--- "-flto-partition=1to1",
--- }
linkoptions {
- "-flto",
+ "-fno-fat-lto-objects",
}
--- linkoptions {
--- "-flto-partition=1to1",
--- }
--- linkoptions {
--- "-ffat-lto-objects",
--- }
end
diff --git a/scripts/toolchain.lua b/scripts/toolchain.lua
index 91d1f29884e..d86c3d53f8f 100644
--- a/scripts/toolchain.lua
+++ b/scripts/toolchain.lua
@@ -199,7 +199,8 @@ 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"
+-- premake.gcc.ar = "$(MINGW64)/bin/ar"
+ premake.gcc.ar = "$(MINGW64)/bin/gcc-ar"
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-mingw64-gcc")
end