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:
16
premake5.lua
16
premake5.lua
@@ -159,12 +159,28 @@ filter({"platforms:Linux", "language:C++", "toolset:clang"})
|
|||||||
"deprecated-enum-enum-conversion",
|
"deprecated-enum-enum-conversion",
|
||||||
"attributes",
|
"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"})
|
filter({"platforms:Linux", "language:C++", "toolset:clang", "files:*.cc or *.cpp"})
|
||||||
buildoptions({
|
buildoptions({
|
||||||
"-stdlib=libstdc++",
|
"-stdlib=libstdc++",
|
||||||
"-std=c++20", -- clang doesn't respect cppdialect(?)
|
"-std=c++20", -- clang doesn't respect cppdialect(?)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
filter("files:third_party/tabulate/**")
|
||||||
|
defines({
|
||||||
|
"USE_CPP17",
|
||||||
|
})
|
||||||
|
|
||||||
filter("platforms:Android-*")
|
filter("platforms:Android-*")
|
||||||
system("android")
|
system("android")
|
||||||
systemversion("24")
|
systemversion("24")
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
#include "xenia/base/cvar.h"
|
#include "xenia/base/cvar.h"
|
||||||
#include "xenia/base/logging.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();
|
xe::ConsoleAppEntryInfo entry_info = xe::GetConsoleAppEntryInfo();
|
||||||
|
|
||||||
if (!entry_info.transparent_options) {
|
if (!entry_info.transparent_options) {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
#include "xenia/ui/windowed_app.h"
|
#include "xenia/ui/windowed_app.h"
|
||||||
#include "xenia/ui/windowed_app_context_gtk.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,
|
// Before touching anything GTK+, make sure that when running on Wayland,
|
||||||
// we'll still get an X11 (Xwayland) window
|
// we'll still get an X11 (Xwayland) window
|
||||||
setenv("GDK_BACKEND", "x11", 1);
|
setenv("GDK_BACKEND", "x11", 1);
|
||||||
|
|||||||
2
third_party/date
vendored
2
third_party/date
vendored
Submodule third_party/date updated: 5bdb7e6f31...f94b8f36c6
2
third_party/tomlplusplus
vendored
2
third_party/tomlplusplus
vendored
Submodule third_party/tomlplusplus updated: 30172438ce...708fff700f
Reference in New Issue
Block a user