[premake] Remove redundant vectorextensions
Make clang version into a variable.
This commit is contained in:
@@ -126,7 +126,6 @@ filter({"configurations:Release", "platforms:Windows"}) -- "toolset:msc"
|
|||||||
filter("platforms:Linux")
|
filter("platforms:Linux")
|
||||||
system("linux")
|
system("linux")
|
||||||
toolset("clang")
|
toolset("clang")
|
||||||
vectorextensions("AVX")
|
|
||||||
--buildoptions({
|
--buildoptions({
|
||||||
-- "-mlzcnt", -- (don't) Assume lzcnt is supported.
|
-- "-mlzcnt", -- (don't) Assume lzcnt is supported.
|
||||||
--})
|
--})
|
||||||
@@ -185,14 +184,15 @@ filter({"language:C++", "toolset:clang"}) -- "platforms:Linux"
|
|||||||
})
|
})
|
||||||
CLANG_BIN = os.getenv("CC") or _OPTIONS["cc"] or "clang"
|
CLANG_BIN = os.getenv("CC") or _OPTIONS["cc"] or "clang"
|
||||||
if os.istarget("linux") and string.contains(CLANG_BIN, "clang") then
|
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
|
CLANG_VER = tonumber(string.match(os.outputof(CLANG_BIN.." --version"), "version (%d%d)"))
|
||||||
|
if CLANG_VER >= 20 then
|
||||||
filter({"language:C++", "toolset:clang"}) -- "platforms:Linux"
|
filter({"language:C++", "toolset:clang"}) -- "platforms:Linux"
|
||||||
disablewarnings({
|
disablewarnings({
|
||||||
"deprecated-literal-operator", -- Needed only for tabulate
|
"deprecated-literal-operator", -- Needed only for tabulate
|
||||||
"nontrivial-memcall",
|
"nontrivial-memcall",
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
if tonumber(string.match(os.outputof(CLANG_BIN.." --version"), "version (%d%d)")) >= 21 then
|
if CLANG_VER >= 21 then
|
||||||
filter({"language:C++", "toolset:clang"}) -- "platforms:Linux"
|
filter({"language:C++", "toolset:clang"}) -- "platforms:Linux"
|
||||||
disablewarnings({
|
disablewarnings({
|
||||||
"character-conversion", -- Needed for utfcpp third-party library
|
"character-conversion", -- Needed for utfcpp third-party library
|
||||||
|
|||||||
Reference in New Issue
Block a user