From ed2b7e5ef1626c0d6318b6ea71897efbb4356277 Mon Sep 17 00:00:00 2001 From: Julian Sikorski Date: Sun, 29 Sep 2019 15:30:18 +0200 Subject: 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 --- 3rdparty/genie/src/tools/gcc.lua | 49 +++++++++++++++++++++++++++++++++++----- 1 file changed, 43 insertions(+), 6 deletions(-) (limited to '3rdparty/genie/src/tools/gcc.lua') 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 @@ -258,6 +271,18 @@ return result 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 @@ -335,6 +360,18 @@ return result 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. -- cgit v1.2.3-70-g09d2