summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/genie/src/tools/gcc.lua
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2017-12-01 13:22:27 +0100
committer Miodrag Milanovic <mmicko@gmail.com>2017-12-01 13:22:27 +0100
commit39176274946d70ff520f265dee8fbd16d5fe0000 (patch)
tree318801d93146752050c9a492654ae3738820e3b9 /3rdparty/genie/src/tools/gcc.lua
parent6829ecb3b037d6bfbe0b84e818d17d712f71bce6 (diff)
Updated GENie, BGFX, BX, added BIMG since it is separated now, updated all shader binaries and MAME part of code to support new interfaces [Miodrag Milanovic]
Diffstat (limited to '3rdparty/genie/src/tools/gcc.lua')
-rw-r--r--3rdparty/genie/src/tools/gcc.lua46
1 files changed, 28 insertions, 18 deletions
diff --git a/3rdparty/genie/src/tools/gcc.lua b/3rdparty/genie/src/tools/gcc.lua
index d03c6e411a2..2188bc82070 100644
--- a/3rdparty/genie/src/tools/gcc.lua
+++ b/3rdparty/genie/src/tools/gcc.lua
@@ -25,19 +25,20 @@
local cflags =
{
- EnableSSE = "-msse",
- EnableSSE2 = "-msse2",
- EnableAVX = "-mavx",
- EnableAVX2 = "-mavx2",
- ExtraWarnings = "-Wall -Wextra",
- FatalWarnings = "-Werror",
- FloatFast = "-ffast-math",
- FloatStrict = "-ffloat-store",
- NoFramePointer = "-fomit-frame-pointer",
- Optimize = "-O2",
- OptimizeSize = "-Os",
- OptimizeSpeed = "-O3",
- Symbols = "-g",
+ EnableSSE = "-msse",
+ EnableSSE2 = "-msse2",
+ EnableAVX = "-mavx",
+ EnableAVX2 = "-mavx2",
+ PedanticWarnings = "-Wall -Wextra -pedantic",
+ ExtraWarnings = "-Wall -Wextra",
+ FatalWarnings = "-Werror",
+ FloatFast = "-ffast-math",
+ FloatStrict = "-ffloat-store",
+ NoFramePointer = "-fomit-frame-pointer",
+ Optimize = "-O2",
+ OptimizeSize = "-Os",
+ OptimizeSpeed = "-O3",
+ Symbols = "-g",
}
local cxxflags =
@@ -47,6 +48,11 @@
UnsignedChar = "-funsigned-char",
}
+ local objcflags =
+ {
+ ObjcARC = "-fobjc-arc",
+ }
+
--
-- Map platforms to flags
@@ -140,6 +146,11 @@
end
+ function premake.gcc.getobjcflags(cfg)
+ return table.translate(cfg.flags, objcflags)
+ end
+
+
--
-- Returns a list of linker flags, based on the supplied configuration.
--
@@ -236,6 +247,7 @@
local result = {}
for _, value in ipairs(premake.getlinks(cfg, "system", "fullpath")) do
if premake.gcc.islibfile(value) then
+ value = path.rebase(value, cfg.project.location, cfg.location)
table.insert(result, _MAKE.esc(value))
elseif path.getextension(value) == ".framework" then
table.insert(result, '-framework ' .. _MAKE.esc(path.getbasename(value)))
@@ -294,13 +306,11 @@
function premake.gcc.getdefines(defines)
local result = { }
for _,def in ipairs(defines) do
- table.insert(result, '-D' .. def)
+ table.insert(result, "-D" .. def)
end
return result
end
-
-
--
-- Decorate include file search paths for the GCC command line.
--
@@ -308,7 +318,7 @@
function premake.gcc.getincludedirs(includedirs)
local result = { }
for _,dir in ipairs(includedirs) do
- table.insert(result, "-I" .. _MAKE.esc(dir))
+ table.insert(result, "-I\"" .. dir .. "\"")
end
return result
end
@@ -320,7 +330,7 @@
function premake.gcc.getquoteincludedirs(includedirs)
local result = { }
for _,dir in ipairs(includedirs) do
- table.insert(result, "-iquote " .. _MAKE.esc(dir))
+ table.insert(result, "-iquote \"" .. dir .. "\"")
end
return result
end