summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/genie/src/tools/gcc.lua
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/genie/src/tools/gcc.lua')
-rw-r--r--3rdparty/genie/src/tools/gcc.lua58
1 files changed, 51 insertions, 7 deletions
diff --git a/3rdparty/genie/src/tools/gcc.lua b/3rdparty/genie/src/tools/gcc.lua
index 7e54e492347..46afa976ac8 100644
--- a/3rdparty/genie/src/tools/gcc.lua
+++ b/3rdparty/genie/src/tools/gcc.lua
@@ -52,33 +52,36 @@
premake.gcc.platforms =
{
Native = {
- cppflags = "-MMD",
+ cppflags = "-MMD -MP",
},
x32 = {
- cppflags = "-MMD",
+ cppflags = "-MMD -MP",
flags = "-m32",
},
x64 = {
- cppflags = "-MMD",
+ cppflags = "-MMD -MP",
flags = "-m64",
},
Universal = {
- cppflags = "",
+ ar = "libtool",
+ cppflags = "-MMD -MP",
flags = "-arch i386 -arch x86_64 -arch ppc -arch ppc64",
},
Universal32 = {
- cppflags = "",
+ ar = "libtool",
+ cppflags = "-MMD -MP",
flags = "-arch i386 -arch ppc",
},
Universal64 = {
- cppflags = "",
+ ar = "libtool",
+ cppflags = "-MMD -MP",
flags = "-arch x86_64 -arch ppc64",
},
PS3 = {
cc = "ppu-lv2-g++",
cxx = "ppu-lv2-g++",
ar = "ppu-lv2-ar",
- cppflags = "-MMD",
+ cppflags = "-MMD -MP",
},
WiiDev = {
cppflags = "-MMD -MP -I$(LIBOGC_INC) $(MACHDEP)",
@@ -213,6 +216,47 @@
--
+-- Get flags for passing to AR before the target is appended to the commandline
+-- prj: project
+-- cfg: configuration
+-- ndx: true if the final step of a split archive
+--
+
+ function premake.gcc.getarchiveflags(prj, cfg, ndx)
+ local result = {}
+ if cfg.platform:startswith("Universal") then
+ if prj.options.ArchiveSplit then
+ error("gcc tool 'Universal*' platforms do not support split archives")
+ end
+ table.insert(result, '-o')
+ else
+ if (not prj.options.ArchiveSplit) then
+ if premake.gcc.llvm then
+ table.insert(result, 'rcs')
+ else
+ table.insert(result, '-rcs')
+ end
+ else
+ if premake.gcc.llvm then
+ if (not ndx) then
+ table.insert(result, 'qc')
+ else
+ table.insert(result, 'cs')
+ end
+ else
+ if (not ndx) then
+ table.insert(result, '-qc')
+ else
+ table.insert(result, '-cs')
+ end
+ end
+ end
+ end
+ return result
+ end
+
+
+--
-- Decorate defines for the GCC command line.
--