diff options
author | 2019-09-29 15:30:18 +0200 | |
---|---|---|
committer | 2019-09-29 09:30:18 -0400 | |
commit | ed2b7e5ef1626c0d6318b6ea71897efbb4356277 (patch) | |
tree | 62a84a4a2c804922839dbfa60ec664b84beaaee0 /3rdparty/genie/src/tools/gcc.lua | |
parent | 1bd1288c9e17bdba9544d1e56be7618106fece7e (diff) |
Synced with GENie upstream revision e78d6c1 (#5631)
* Synced with GENie upstream revision e78d6c1
* Add Visual Studio 2019 support
* Fix hardcoded -m64
* Switch appveyor to Visual Studio 2019
* Fix genie being built as 32-bit
* MSVC build is known to be broken currently. Let it fail until all the known issues are fixed.
* Update the packages before building
* Build with 3 threads
Appveyor VMs have only 2 cores and 8 GB RAM.
* Enable caching of pacman cache
Diffstat (limited to '3rdparty/genie/src/tools/gcc.lua')
-rw-r--r-- | 3rdparty/genie/src/tools/gcc.lua | 49 |
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. -- |