From d99eed2541098b080bdcaa5d6beb66a3a9e7a094 Mon Sep 17 00:00:00 2001 From: otavepto <153766569+otavepto@users.noreply.github.com> Date: Wed, 29 May 2024 21:14:17 +0300 Subject: [PATCH] * enable the usage of compiler intrinsics * replace dynamic lib default visiblity flag & exception handling allowance flag with their premake equivalent options --- premake5.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/premake5.lua b/premake5.lua index 8ceedffc..3c02026e 100644 --- a/premake5.lua +++ b/premake5.lua @@ -341,6 +341,8 @@ flags { "RelativeLinks", } targetprefix "" -- prevent adding the prefix libxxx on linux +visibility "Hidden" -- hide all symbols by default on GCC (unless they are marked visible) +exceptionhandling "On" -- "Enable exception handling. ... although it does not affect execution." vpaths { -- just for visual niceness, see: https://premake.github.io/docs/vpaths/ ["headers/*"] = { "**.h", "**.hxx", "**.hpp", @@ -365,6 +367,7 @@ filter {} -- reset the filter and remove all active keywords -- debug/optimization flags --------- +intrinsics "On" filter { "configurations:*debug", } symbols "On" optimize "Off" @@ -389,7 +392,8 @@ filter { "action:vs*", } -- GNU make common compiler/linker options filter { "action:gmake*", } buildoptions { - "-fvisibility=hidden", "-fexceptions", "-fno-jump-tables" , "-Wno-switch", + -- https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html + "-fno-jump-tables" , "-Wno-switch", } linkoptions { "-Wl,--exclude-libs,ALL",