diff options
Diffstat (limited to '3rdparty/genie/src/tools/valac.lua')
-rw-r--r-- | 3rdparty/genie/src/tools/valac.lua | 54 |
1 files changed, 35 insertions, 19 deletions
diff --git a/3rdparty/genie/src/tools/valac.lua b/3rdparty/genie/src/tools/valac.lua index 4101c2e04fd..43f65818cf4 100644 --- a/3rdparty/genie/src/tools/valac.lua +++ b/3rdparty/genie/src/tools/valac.lua @@ -12,7 +12,8 @@ -- premake.valac.valac = "valac" - premake.valac.cc = "gcc" + premake.valac.cc = premake.gcc.cc + premake.valac.glibrc = "glib-compile-resources" -- @@ -30,20 +31,37 @@ EnableExperimentalNonNull = "--enable-experimental-non-null", -- Enable experimental enhancements for non-null types EnableGObjectTracing = "--enable-gobject-tracing", -- Enable GObject creation tracing EnableMemProfiler = "--enable-mem-profiler", -- Enable GLib memory profiler - EnableThreading = "--thread", -- Enable multithreading support FatalWarnings = "--fatal-warnings", -- Treat warnings as fatal HideInternal = "--hide-internal", -- Hide symbols marked as internal NoStdPkg = "--nostdpkg", -- Do not include standard packages - Optimize = "-X -O2", - OptimizeSize = "-X -Os", - OptimizeSpeed = "-X -O3", Symbols = "-g", -- Produce debug information } - premake.valac.platforms = {} + local valaccflags = + { + Optimize = "-O2", + OptimizeSize = "-Os", + OptimizeSpeed = "-O3", + Symbols = "-g", -- Produce debug information + } -- --- Returns a list of compiler flags, based on the supplied configuration. +-- Map platforms to flags +-- + + premake.valac.platforms = + { + Native = { + }, + x64 = { + flags = "-m64" + }, + } + + + +-- +-- Returns a list of compiler flags for `valac`, based on the supplied configuration. -- function premake.valac.getvalaflags(cfg) @@ -53,6 +71,16 @@ -- +-- Returns a list of compiler flags for `cc`, based on the supplied configuration. +-- + + function premake.valac.getvalaccflags(cfg) + return table.translate(cfg.flags, valaccflags) + end + + + +-- -- Decorate pkgs for the Vala command line. -- @@ -81,18 +109,6 @@ -- --- Decorate C flags for the Vala command line. --- - - function premake.valac.getbuildoptions(buildoptions) - local result = { } - for _, def in ipairs(buildoptions) do - table.insert(result, '-X ' .. def) - end - return result - end - --- -- Decorate vapidirs for the Vala command line. -- |