Fix building with Clang 20

date: 3.0.4
tomlplusplus: Latest master as of writing since there's no stable release with the build fixes.
This commit is contained in:
Margen67 2025-07-05 01:34:05 -07:00
parent 79509828f0
commit 0aeac841b8
5 changed files with 20 additions and 4 deletions

View File

@ -159,12 +159,28 @@ 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"]
if tonumber(string.match(os.outputof(CLANG_BIN.." --version"), "version (%d%d)")) >= 20 then
filter({"platforms:Linux", "language:C++", "toolset:clang"})
disablewarnings({
"deprecated-literal-operator", -- Needed only for tabulate
"nontrivial-memcall",
})
end
end
filter({"platforms:Linux", "language:C++", "toolset:clang", "files:*.cc or *.cpp"})
buildoptions({
"-stdlib=libstdc++",
"-std=c++20", -- clang doesn't respect cppdialect(?)
})
filter("files:third_party/tabulate/**")
defines({
"USE_CPP17",
})
filter("platforms:Android-*")
system("android")
systemversion("24")

View File

@ -14,7 +14,7 @@
#include "xenia/base/cvar.h"
#include "xenia/base/logging.h"
extern "C" int main(int argc, char** argv) {
int main(int argc, char** argv) {
xe::ConsoleAppEntryInfo entry_info = xe::GetConsoleAppEntryInfo();
if (!entry_info.transparent_options) {

View File

@ -17,7 +17,7 @@
#include "xenia/ui/windowed_app.h"
#include "xenia/ui/windowed_app_context_gtk.h"
extern "C" int main(int argc_pre_gtk, char** argv_pre_gtk) {
int main(int argc_pre_gtk, char** argv_pre_gtk) {
// Before touching anything GTK+, make sure that when running on Wayland,
// we'll still get an X11 (Xwayland) window
setenv("GDK_BACKEND", "x11", 1);

2
third_party/date vendored

@ -1 +1 @@
Subproject commit 5bdb7e6f31fac909c090a46dbd9fea27b6e609a4
Subproject commit f94b8f36c6180be0021876c4a397a054fe50c6f2

@ -1 +1 @@
Subproject commit 30172438cee64926dc41fdd9c11fb3ba5b2ba9de
Subproject commit 708fff700f36ab3c2ab107b984ec9f3b8be5f055