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.lua49
1 files changed, 43 insertions, 6 deletions
diff --git a/3rdparty/genie/src/tools/gcc.lua b/3rdparty/genie/src/tools/gcc.lua
index 2188bc82070..44b2edb2a0f 100644
--- a/3rdparty/genie/src/tools/gcc.lua
+++ b/3rdparty/genie/src/tools/gcc.lua
@@ -43,17 +43,20 @@
local cxxflags =
{
- NoExceptions = "-fno-exceptions",
- NoRTTI = "-fno-rtti",
- UnsignedChar = "-funsigned-char",
+ Cpp11 = "-std=c++11",
+ Cpp14 = "-std=c++14",
+ Cpp17 = "-std=c++17",
+ CppLatest = "-std=c++2a",
+ NoExceptions = "-fno-exceptions",
+ NoRTTI = "-fno-rtti",
+ UnsignedChar = "-funsigned-char",
}
local objcflags =
{
- ObjcARC = "-fobjc-arc",
+ ObjcARC = "-fobjc-arc",
}
-
--
-- Map platforms to flags
--
@@ -106,6 +109,12 @@
cxx = "orbis-clang++",
ar = "orbis-ar",
cppflags = "-MMD -MP",
+ },
+ Emscripten = {
+ cc = "$(EMSCRIPTEN)/emcc",
+ cxx = "$(EMSCRIPTEN)/em++",
+ ar = "$(EMSCRIPTEN)/emar",
+ cppflags = "-MMD -MP",
}
}
@@ -169,6 +178,10 @@
end
end
+ if cfg.kind == "Bundle" then
+ table.insert(result, "-bundle")
+ end
+
if cfg.kind == "SharedLib" then
if cfg.system == "macosx" then
table.insert(result, "-dynamiclib")
@@ -202,7 +215,7 @@
function premake.gcc.getlibdirflags(cfg)
local result = { }
for _, value in ipairs(premake.getlinks(cfg, "all", "directory")) do
- table.insert(result, '-L' .. _MAKE.esc(value))
+ table.insert(result, '-L\"' .. value .. '\"')
end
return result
end
@@ -259,6 +272,18 @@
end
--
+-- Get the arguments for whole-archive linking.
+--
+
+ function premake.gcc.wholearchive(lib)
+ if premake.gcc.llvm then
+ return {"-force_load", lib}
+ else
+ return {"-Wl,--whole-archive", lib, "-Wl,--no-whole-archive"}
+ end
+ end
+
+--
-- Get flags for passing to AR before the target is appended to the commandline
-- prj: project
-- cfg: configuration
@@ -336,6 +361,18 @@
end
--
+-- Decorate system include file search paths for the GCC command line.
+--
+
+ function premake.gcc.getsystemincludedirs(includedirs)
+ local result = { }
+ for _,dir in ipairs(includedirs) do
+ table.insert(result, "-isystem \"" .. dir .. "\"")
+ end
+ return result
+ end
+
+--
-- Return platform specific project and configuration level
-- makesettings blocks.
--