* enable the usage of compiler intrinsics

* replace dynamic lib default visiblity flag & exception handling allowance flag with their premake equivalent options
This commit is contained in:
otavepto 2024-05-29 21:14:17 +03:00
parent 648fe373c7
commit d99eed2541

View File

@ -341,6 +341,8 @@ flags {
"RelativeLinks", "RelativeLinks",
} }
targetprefix "" -- prevent adding the prefix libxxx on linux 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/ vpaths { -- just for visual niceness, see: https://premake.github.io/docs/vpaths/
["headers/*"] = { ["headers/*"] = {
"**.h", "**.hxx", "**.hpp", "**.h", "**.hxx", "**.hpp",
@ -365,6 +367,7 @@ filter {} -- reset the filter and remove all active keywords
-- debug/optimization flags -- debug/optimization flags
--------- ---------
intrinsics "On"
filter { "configurations:*debug", } filter { "configurations:*debug", }
symbols "On" symbols "On"
optimize "Off" optimize "Off"
@ -389,7 +392,8 @@ filter { "action:vs*", }
-- GNU make common compiler/linker options -- GNU make common compiler/linker options
filter { "action:gmake*", } filter { "action:gmake*", }
buildoptions { 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 { linkoptions {
"-Wl,--exclude-libs,ALL", "-Wl,--exclude-libs,ALL",