From ead2fbc115cf0b7f8019e3f1b7a172c1d3cb239d Mon Sep 17 00:00:00 2001 From: Ralph Sennhauser Date: Sat, 14 Jun 2025 06:53:16 +0200 Subject: [PATCH] Improve clang default toolset on BSD The gmake action has a separate idea as to what the default toolset should be, add that to the patch fixing the default for BSD. Signed-off-by: Ralph Sennhauser --- libraries/source/premake-core/build.sh | 2 +- ...1-Make-clang-default-toolset-for-BSD.patch | 39 ++++++++++++++++--- 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/libraries/source/premake-core/build.sh b/libraries/source/premake-core/build.sh index 10316e411c..f97c6cf4b5 100755 --- a/libraries/source/premake-core/build.sh +++ b/libraries/source/premake-core/build.sh @@ -9,7 +9,7 @@ set -e cd "$(dirname "$0")" PV=5.0.0-beta6 -LIB_VERSION=${PV}+wfg0 +LIB_VERSION=${PV}+wfg1 fetch() { diff --git a/libraries/source/premake-core/patches/0001-Make-clang-default-toolset-for-BSD.patch b/libraries/source/premake-core/patches/0001-Make-clang-default-toolset-for-BSD.patch index 96dc4e7828..d16f988b16 100644 --- a/libraries/source/premake-core/patches/0001-Make-clang-default-toolset-for-BSD.patch +++ b/libraries/source/premake-core/patches/0001-Make-clang-default-toolset-for-BSD.patch @@ -1,4 +1,4 @@ -From 4f02eba3f7279de3693aa2405e1c0700fcade23a Mon Sep 17 00:00:00 2001 +From a41fa4e94b479edfbab5312f68277f2573893510 Mon Sep 17 00:00:00 2001 From: Ralph Sennhauser Date: Mon, 25 Nov 2024 15:57:10 +0100 Subject: [PATCH] Make clang default toolset for *BSD @@ -7,14 +7,29 @@ https://github.com/premake/premake-core/issues/2338 Signed-off-by: Ralph Sennhauser --- - src/_premake_init.lua | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + modules/gmake/_preload.lua | 2 +- + src/_premake_init.lua | 2 +- + src/base/_foundation.lua | 1 + + 3 files changed, 3 insertions(+), 2 deletions(-) +diff --git a/modules/gmake/_preload.lua b/modules/gmake/_preload.lua +index 1ff42b77..e3e9a109 100644 +--- a/modules/gmake/_preload.lua ++++ b/modules/gmake/_preload.lua +@@ -13,7 +13,7 @@ + + local function defaultToolset() + local target = os.target() +- if target == p.MACOSX then ++ if target == p.MACOSX or target == p.BSD then + return "clang" + elseif target == p.EMSCRIPTEN then + return "emcc" diff --git a/src/_premake_init.lua b/src/_premake_init.lua -index 69f05fc9..c42c514f 100644 +index 4a6f080e..672252e5 100644 --- a/src/_premake_init.lua +++ b/src/_premake_init.lua -@@ -1441,7 +1441,7 @@ +@@ -1439,7 +1439,7 @@ filter { "kind:SharedLib", "system:not Windows" } pic "On" @@ -23,6 +38,18 @@ index 69f05fc9..c42c514f 100644 toolset "clang" filter { "system:emscripten" } +diff --git a/src/base/_foundation.lua b/src/base/_foundation.lua +index 9a09753e..0f7b7f9a 100644 +--- a/src/base/_foundation.lua ++++ b/src/base/_foundation.lua +@@ -26,6 +26,7 @@ + -- Define some commonly used symbols, for future-proofing. + -- + ++ premake.BSD = "bsd" + premake.C = "C" + premake.CLANG = "clang" + premake.CONSOLEAPP = "ConsoleApp" -- -2.45.2 +2.49.0