mirror of
https://github.com/holub/mame
synced 2025-06-30 07:58:56 +03:00
Clean up clang options now that clang 5 is a hard requirement, and suppress xor-used-as-pow warning introduced in clang 10
This commit is contained in:
parent
c2ea83fc91
commit
c8218dabdb
@ -1062,8 +1062,8 @@ end
|
|||||||
|
|
||||||
local version = str_to_version(_OPTIONS["gcc_version"])
|
local version = str_to_version(_OPTIONS["gcc_version"])
|
||||||
if string.find(_OPTIONS["gcc"], "clang") or string.find(_OPTIONS["gcc"], "pnacl") or string.find(_OPTIONS["gcc"], "asmjs") or string.find(_OPTIONS["gcc"], "android") then
|
if string.find(_OPTIONS["gcc"], "clang") or string.find(_OPTIONS["gcc"], "pnacl") or string.find(_OPTIONS["gcc"], "asmjs") or string.find(_OPTIONS["gcc"], "android") then
|
||||||
if (version < 30400) then
|
if (version < 50000) then
|
||||||
print("Clang version 3.4 or later needed")
|
print("Clang version 5.0 or later needed")
|
||||||
os.exit(-1)
|
os.exit(-1)
|
||||||
end
|
end
|
||||||
buildoptions {
|
buildoptions {
|
||||||
@ -1072,28 +1072,24 @@ end
|
|||||||
"-Wno-unused-value",
|
"-Wno-unused-value",
|
||||||
"-Wno-constant-logical-operand",
|
"-Wno-constant-logical-operand",
|
||||||
"-fdiagnostics-show-note-include-stack",
|
"-fdiagnostics-show-note-include-stack",
|
||||||
|
"-Wno-unknown-warning-option",
|
||||||
|
"-Wno-extern-c-compat",
|
||||||
|
"-Wno-unknown-attributes",
|
||||||
|
"-Wno-ignored-qualifiers"
|
||||||
}
|
}
|
||||||
if (version >= 30500) then
|
|
||||||
buildoptions {
|
|
||||||
"-Wno-unknown-warning-option",
|
|
||||||
"-Wno-extern-c-compat",
|
|
||||||
"-Wno-unknown-attributes",
|
|
||||||
"-Wno-ignored-qualifiers"
|
|
||||||
}
|
|
||||||
end
|
|
||||||
if (version >= 60000) then
|
if (version >= 60000) then
|
||||||
buildoptions {
|
buildoptions {
|
||||||
"-Wno-pragma-pack" -- clang 6.0 complains when the packing change lifetime is not contained within a header file.
|
"-Wno-pragma-pack" -- clang 6.0 complains when the packing change lifetime is not contained within a header file.
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
if ((version < 60000) or (_OPTIONS["targetos"]=="macosx" and (version <= 90000))) then
|
if (version >= 100000) and (_OPTIONS["targetos"] ~= 'macosx') then -- TODO when Xcode includes clang 10, update this to detect the vanity version number
|
||||||
buildoptions {
|
buildoptions {
|
||||||
"-Wno-missing-braces" -- std::array brace initialization not fixed until 6.0.0 (https://reviews.llvm.org/rC314838)
|
"-Wno-xor-used-as-pow " -- clang 10.0 complains that expressions like 10 ^ 7 look like exponention
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
if (_OPTIONS["targetos"]=="macosx" and (version < 80000)) then
|
if (version < 60000) or ((_OPTIONS["targetos"] == "macosx") and (version <= 90000)) then
|
||||||
defines {
|
buildoptions {
|
||||||
"TARGET_OS_OSX=1",
|
"-Wno-missing-braces" -- std::array brace initialization not fixed until 6.0.0 (https://reviews.llvm.org/rC314838)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user