From 3ab5ba5d81db200546e493d6e4e908f478738808 Mon Sep 17 00:00:00 2001 From: David Hummel <6109326+hummeltech@users.noreply.github.com> Date: Tue, 8 Jul 2025 20:46:11 -0700 Subject: [PATCH] Allow premake5 --cc argument to be optional --- premake5.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/premake5.lua b/premake5.lua index 309f64e36..64c33c7e2 100644 --- a/premake5.lua +++ b/premake5.lua @@ -159,8 +159,8 @@ filter({"platforms:Linux", "language:C++", "toolset:clang"}) "deprecated-enum-enum-conversion", "attributes", }) -if os.istarget("linux") and string.contains(_OPTIONS["cc"], "clang") then - CLANG_BIN = os.getenv("CC") or _OPTIONS["cc"] +CLANG_BIN = os.getenv("CC") or _OPTIONS["cc"] or "clang" +if os.istarget("linux") and string.contains(CLANG_BIN, "clang") then if tonumber(string.match(os.outputof(CLANG_BIN.." --version"), "version (%d%d)")) >= 20 then filter({"platforms:Linux", "language:C++", "toolset:clang"}) disablewarnings({