diff --git a/.gitmodules b/.gitmodules index 8d0922e5c..2bf62e6b1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,9 +16,6 @@ [submodule "third_party/catch"] path = third_party/catch url = https://github.com/catchorg/Catch2.git -[submodule "third_party/gflags"] - path = third_party/gflags - url = https://github.com/benvanik/gflags.git [submodule "third_party/premake-core"] path = third_party/premake-core url = https://github.com/xenia-project/premake-core.git diff --git a/premake5.lua b/premake5.lua index ca0e6dadc..c8990f421 100644 --- a/premake5.lua +++ b/premake5.lua @@ -192,30 +192,9 @@ filter("platforms:Windows") "shlwapi", }) --- Create scratch/ path and dummy flags file if needed. +-- Create scratch/ path if not os.isdir("scratch") then os.mkdir("scratch") - local flags_file = io.open("scratch/flags.txt", "w") - flags_file:write("# Put flags, one on each line.\n") - flags_file:write("# Launch executables with --flags_file=scratch/flags.txt\n") - flags_file:write("\n") - flags_file:write("--cpu=x64\n") - flags_file:write("#--enable_haswell_instructions=false\n") - flags_file:write("\n") - flags_file:write("--debug\n") - flags_file:write("#--protect_zero=false\n") - flags_file:write("\n") - flags_file:write("#--mute\n") - flags_file:write("\n") - flags_file:write("--fast_stdout\n") - flags_file:write("#--flush_stdout=false\n") - flags_file:write("\n") - flags_file:write("#--vsync=false\n") - flags_file:write("#--trace_gpu_prefix=scratch/gpu/gpu_trace_\n") - flags_file:write("#--trace_gpu_stream\n") - flags_file:write("#--disable_framebuffer_readback\n") - flags_file:write("\n") - flags_file:close() end solution("xenia") @@ -229,12 +208,10 @@ solution("xenia") end configurations({"Checked", "Debug", "Release"}) - -- Include third party files first so they don't have to deal with gflags. include("third_party/aes_128.lua") include("third_party/capstone.lua") include("third_party/discord-rpc.lua") include("third_party/cxxopts.lua") - include("third_party/gflags.lua") include("third_party/cpptoml.lua") include("third_party/glew.lua") include("third_party/glslang-spirv.lua") diff --git a/src/xenia/app/premake5.lua b/src/xenia/app/premake5.lua index 2db66ffeb..874ed20e4 100644 --- a/src/xenia/app/premake5.lua +++ b/src/xenia/app/premake5.lua @@ -11,7 +11,6 @@ project("xenia-app") "aes_128", "capstone", "discord-rpc", - "gflags", "glew", "glslang-spirv", "imgui", @@ -45,9 +44,6 @@ project("xenia-app") "XBYAK_NO_OP_NAMES", "XBYAK_ENABLE_OMITTED_OPERAND", }) - includedirs({ - project_root.."/third_party/gflags/src", - }) local_platform_files() files({ "xenia_main.cc", @@ -89,6 +85,5 @@ project("xenia-app") if not os.isfile(user_file) then debugdir(project_root) debugargs({ - "--flagfile=scratch/flags.txt", }) end diff --git a/src/xenia/apu/nop/premake5.lua b/src/xenia/apu/nop/premake5.lua index 21eb100e8..8c16c8a65 100644 --- a/src/xenia/apu/nop/premake5.lua +++ b/src/xenia/apu/nop/premake5.lua @@ -12,7 +12,4 @@ project("xenia-apu-nop") }) defines({ }) - includedirs({ - project_root.."/third_party/gflags/src", - }) local_platform_files() diff --git a/src/xenia/apu/premake5.lua b/src/xenia/apu/premake5.lua index 17ecd8834..a3284fe0e 100644 --- a/src/xenia/apu/premake5.lua +++ b/src/xenia/apu/premake5.lua @@ -14,7 +14,6 @@ project("xenia-apu") defines({ }) includedirs({ - project_root.."/third_party/gflags/src", project_root.."/third_party/libav/", }) local_platform_files() diff --git a/src/xenia/apu/xaudio2/premake5.lua b/src/xenia/apu/xaudio2/premake5.lua index 57bd6e1ef..9198a9a4a 100644 --- a/src/xenia/apu/xaudio2/premake5.lua +++ b/src/xenia/apu/xaudio2/premake5.lua @@ -12,7 +12,4 @@ project("xenia-apu-xaudio2") }) defines({ }) - includedirs({ - project_root.."/third_party/gflags/src", - }) local_platform_files() diff --git a/src/xenia/base/main_win.cc b/src/xenia/base/main_win.cc index 6ecbba83a..3c373a7df 100644 --- a/src/xenia/base/main_win.cc +++ b/src/xenia/base/main_win.cc @@ -89,7 +89,6 @@ int Main() { auto entry_info = xe::GetEntryInfo(); // Convert command line to an argv-like format so we can share code/use - // gflags. auto command_line = GetCommandLineW(); int argc; wchar_t** argv = CommandLineToArgvW(command_line, &argc); @@ -97,7 +96,7 @@ int Main() { return 1; } - // Convert all args to narrow, as gflags doesn't support wchar. + // Convert all args to narrow, as cxxopts doesn't support wchar. int argca = argc; char** argva = reinterpret_cast(alloca(sizeof(char*) * argca)); for (int n = 0; n < argca; n++) { diff --git a/src/xenia/base/premake5.lua b/src/xenia/base/premake5.lua index 960a6500c..3459f66ad 100644 --- a/src/xenia/base/premake5.lua +++ b/src/xenia/base/premake5.lua @@ -7,9 +7,6 @@ project("xenia-base") language("C++") defines({ }) - includedirs({ - project_root.."/third_party/gflags/src", - }) local_platform_files() removefiles({"main_*.cc"}) files({ diff --git a/src/xenia/base/testing/premake5.lua b/src/xenia/base/testing/premake5.lua index e432d7ec4..9570a76f5 100644 --- a/src/xenia/base/testing/premake5.lua +++ b/src/xenia/base/testing/premake5.lua @@ -2,9 +2,6 @@ project_root = "../../../.." include(project_root.."/tools/build") test_suite("xenia-base-tests", project_root, ".", { - includedirs = { - project_root.."/third_party/gflags/src", - }, links = { "xenia-base", }, diff --git a/src/xenia/cpu/backend/x64/premake5.lua b/src/xenia/cpu/backend/x64/premake5.lua index b0d397a2c..ebbc19765 100644 --- a/src/xenia/cpu/backend/x64/premake5.lua +++ b/src/xenia/cpu/backend/x64/premake5.lua @@ -27,6 +27,5 @@ project("xenia-cpu-backend-x64") includedirs({ project_root.."/third_party/capstone/include", - project_root.."/third_party/gflags/src", }) local_platform_files() diff --git a/src/xenia/cpu/ppc/testing/premake5.lua b/src/xenia/cpu/ppc/testing/premake5.lua index d2d5549cd..e318d8db5 100644 --- a/src/xenia/cpu/ppc/testing/premake5.lua +++ b/src/xenia/cpu/ppc/testing/premake5.lua @@ -11,7 +11,6 @@ project("xenia-cpu-ppc-tests") "xenia-cpu-backend-x64", "xenia-cpu", "xenia-base", - "gflags", "capstone", -- cpu-backend-x64 "mspack", }) @@ -22,15 +21,11 @@ project("xenia-cpu-ppc-tests") files({ "*.s", }) - includedirs({ - project_root.."/third_party/gflags/src", - }) filter("files:*.s") flags({"ExcludeFromBuild"}) filter("platforms:Windows") debugdir(project_root) debugargs({ - "--flagfile=scratch/flags.txt", "2>&1", "1>scratch/stdout-testing.txt", }) @@ -46,7 +41,6 @@ project("xenia-cpu-ppc-nativetests") language("C++") links({ "xenia-base", - "gflags", }) files({ "ppc_testing_native_main.cc", @@ -59,9 +53,6 @@ project("xenia-cpu-ppc-nativetests") filter("files:instr_*.s", "files:seq_*.s") flags({"ExcludeFromBuild"}) filter({}) - includedirs({ - project_root.."/third_party/gflags/src", - }) buildoptions({ "-Wa,-mregnames", -- Tell GAS to accept register names. }) diff --git a/src/xenia/cpu/premake5.lua b/src/xenia/cpu/premake5.lua index 96a41f6e0..748602659 100644 --- a/src/xenia/cpu/premake5.lua +++ b/src/xenia/cpu/premake5.lua @@ -12,7 +12,6 @@ project("xenia-cpu") }) includedirs({ project_root.."/third_party/llvm/include", - project_root.."/third_party/gflags/src", }) local_platform_files() local_platform_files("backend") diff --git a/src/xenia/cpu/testing/premake5.lua b/src/xenia/cpu/testing/premake5.lua index 30e60604f..a3c2b8566 100644 --- a/src/xenia/cpu/testing/premake5.lua +++ b/src/xenia/cpu/testing/premake5.lua @@ -2,9 +2,6 @@ project_root = "../../../.." include(project_root.."/tools/build") test_suite("xenia-cpu-tests", project_root, ".", { - includedirs = { - project_root.."/third_party/gflags/src", - }, links = { "capstone", "xenia-base", diff --git a/src/xenia/debug/ui/premake5.lua b/src/xenia/debug/ui/premake5.lua index e631f7f5b..84ca9bbd8 100644 --- a/src/xenia/debug/ui/premake5.lua +++ b/src/xenia/debug/ui/premake5.lua @@ -16,7 +16,6 @@ project("xenia-debug-ui") defines({ }) includedirs({ - project_root.."/third_party/gflags/src", project_root.."/third_party/yaml-cpp/include/", }) local_platform_files() diff --git a/src/xenia/gpu/null/premake5.lua b/src/xenia/gpu/null/premake5.lua index 4d902b992..0b4ed0e66 100644 --- a/src/xenia/gpu/null/premake5.lua +++ b/src/xenia/gpu/null/premake5.lua @@ -15,7 +15,4 @@ project("xenia-gpu-null") }) defines({ }) - includedirs({ - project_root.."/third_party/gflags/src", - }) local_platform_files() diff --git a/src/xenia/gpu/premake5.lua b/src/xenia/gpu/premake5.lua index d0ce85820..c541eb547 100644 --- a/src/xenia/gpu/premake5.lua +++ b/src/xenia/gpu/premake5.lua @@ -19,7 +19,6 @@ project("xenia-gpu") }) includedirs({ project_root.."/third_party/spirv-tools/external/include", - project_root.."/third_party/gflags/src", }) local_platform_files() -- local_platform_files("spirv") @@ -31,7 +30,6 @@ project("xenia-gpu-shader-compiler") kind("ConsoleApp") language("C++") links({ - "gflags", "glslang-spirv", "spirv-tools", "xenia-base", @@ -40,9 +38,6 @@ project("xenia-gpu-shader-compiler") }) defines({ }) - includedirs({ - project_root.."/third_party/gflags/src", - }) files({ "shader_compiler_main.cc", "../base/main_"..platform_suffix..".cc", @@ -54,7 +49,6 @@ project("xenia-gpu-shader-compiler") if not os.isfile(user_file) then debugdir(project_root) debugargs({ - "--flagfile=scratch/flags.txt", "2>&1", "1>scratch/stdout-shader-compiler.txt", }) diff --git a/src/xenia/gpu/vulkan/premake5.lua b/src/xenia/gpu/vulkan/premake5.lua index 82b843b59..2be22502e 100644 --- a/src/xenia/gpu/vulkan/premake5.lua +++ b/src/xenia/gpu/vulkan/premake5.lua @@ -17,9 +17,6 @@ project("xenia-gpu-vulkan") }) defines({ }) - includedirs({ - project_root.."/third_party/gflags/src", - }) local_platform_files() files({ "shaders/bin/*.h", @@ -34,7 +31,6 @@ project("xenia-gpu-vulkan-trace-viewer") links({ "aes_128", "capstone", - "gflags", "glslang-spirv", "imgui", "libavcodec", @@ -62,9 +58,6 @@ project("xenia-gpu-vulkan-trace-viewer") }) defines({ }) - includedirs({ - project_root.."/third_party/gflags/src", - }) files({ "vulkan_trace_viewer_main.cc", "../../base/main_"..platform_suffix..".cc", @@ -91,7 +84,6 @@ project("xenia-gpu-vulkan-trace-viewer") if not os.isfile(user_file) then debugdir(project_root) debugargs({ - "--flagfile=scratch/flags.txt", "2>&1", "1>scratch/stdout-trace-viewer.txt", }) @@ -105,7 +97,6 @@ project("xenia-gpu-vulkan-trace-dump") links({ "aes_128", "capstone", - "gflags", "glslang-spirv", "imgui", "libavcodec", @@ -133,9 +124,6 @@ project("xenia-gpu-vulkan-trace-dump") }) defines({ }) - includedirs({ - project_root.."/third_party/gflags/src", - }) files({ "vulkan_trace_dump_main.cc", "../../base/main_"..platform_suffix..".cc", @@ -156,7 +144,6 @@ project("xenia-gpu-vulkan-trace-dump") if not os.isfile(user_file) then debugdir(project_root) debugargs({ - "--flagfile=scratch/flags.txt", "2>&1", "1>scratch/stdout-trace-dump.txt", }) diff --git a/src/xenia/hid/nop/premake5.lua b/src/xenia/hid/nop/premake5.lua index b953b1773..53fefaee5 100644 --- a/src/xenia/hid/nop/premake5.lua +++ b/src/xenia/hid/nop/premake5.lua @@ -12,7 +12,4 @@ project("xenia-hid-nop") }) defines({ }) - includedirs({ - project_root.."/third_party/gflags/src", - }) local_platform_files() diff --git a/src/xenia/hid/premake5.lua b/src/xenia/hid/premake5.lua index ea7b6afbf..37f96f414 100644 --- a/src/xenia/hid/premake5.lua +++ b/src/xenia/hid/premake5.lua @@ -11,9 +11,6 @@ project("xenia-hid") }) defines({ }) - includedirs({ - project_root.."/third_party/gflags/src", - }) local_platform_files() removefiles({"*_demo.cc"}) @@ -23,7 +20,6 @@ project("xenia-hid-demo") kind("WindowedApp") language("C++") links({ - "gflags", "glew", "imgui", "volk", @@ -37,9 +33,6 @@ project("xenia-hid-demo") "GLEW_STATIC=1", "GLEW_MX=1", }) - includedirs({ - project_root.."/third_party/gflags/src", - }) files({ "hid_demo.cc", "../base/main_"..platform_suffix..".cc", diff --git a/src/xenia/hid/winkey/premake5.lua b/src/xenia/hid/winkey/premake5.lua index d0edd8fb6..0e3b86580 100644 --- a/src/xenia/hid/winkey/premake5.lua +++ b/src/xenia/hid/winkey/premake5.lua @@ -13,7 +13,4 @@ project("xenia-hid-winkey") }) defines({ }) - includedirs({ - project_root.."/third_party/gflags/src", - }) local_platform_files() diff --git a/src/xenia/hid/xinput/premake5.lua b/src/xenia/hid/xinput/premake5.lua index 506ea5e25..6247cf98c 100644 --- a/src/xenia/hid/xinput/premake5.lua +++ b/src/xenia/hid/xinput/premake5.lua @@ -12,7 +12,4 @@ project("xenia-hid-xinput") }) defines({ }) - includedirs({ - project_root.."/third_party/gflags/src", - }) local_platform_files() diff --git a/src/xenia/kernel/premake5.lua b/src/xenia/kernel/premake5.lua index 0aba1a30e..808dc8899 100644 --- a/src/xenia/kernel/premake5.lua +++ b/src/xenia/kernel/premake5.lua @@ -16,9 +16,6 @@ project("xenia-kernel") }) defines({ }) - includedirs({ - project_root.."/third_party/gflags/src", - }) recursive_platform_files() files({ "debug_visualizers.natvis", diff --git a/src/xenia/premake5.lua b/src/xenia/premake5.lua index 1d674f198..b403f42f9 100644 --- a/src/xenia/premake5.lua +++ b/src/xenia/premake5.lua @@ -11,7 +11,4 @@ project("xenia-core") }) defines({ }) - includedirs({ - project_root.."/third_party/gflags/src", - }) files({"*.h", "*.cc"}) diff --git a/src/xenia/ui/premake5.lua b/src/xenia/ui/premake5.lua index 6fe5ebfc8..c5dbd84af 100644 --- a/src/xenia/ui/premake5.lua +++ b/src/xenia/ui/premake5.lua @@ -11,8 +11,5 @@ project("xenia-ui") }) defines({ }) - includedirs({ - project_root.."/third_party/gflags/src", - }) local_platform_files() removefiles({"*_demo.cc"}) diff --git a/src/xenia/ui/spirv/premake5.lua b/src/xenia/ui/spirv/premake5.lua index 423ad7bb6..9988a051a 100644 --- a/src/xenia/ui/spirv/premake5.lua +++ b/src/xenia/ui/spirv/premake5.lua @@ -14,7 +14,6 @@ project("xenia-ui-spirv") defines({ }) includedirs({ - project_root.."/third_party/gflags/src", project_root.."/third_party/spirv-tools/external/include", }) local_platform_files() diff --git a/src/xenia/ui/vulkan/premake5.lua b/src/xenia/ui/vulkan/premake5.lua index 8246ef249..5d04b98d2 100644 --- a/src/xenia/ui/vulkan/premake5.lua +++ b/src/xenia/ui/vulkan/premake5.lua @@ -14,7 +14,6 @@ project("xenia-ui-vulkan") defines({ }) includedirs({ - project_root.."/third_party/gflags/src", project_root.."/third_party/vulkan/", }) local_platform_files() @@ -29,7 +28,6 @@ project("xenia-ui-window-vulkan-demo") kind("WindowedApp") language("C++") links({ - "gflags", "imgui", "volk", "xenia-base", @@ -40,7 +38,6 @@ project("xenia-ui-window-vulkan-demo") defines({ }) includedirs({ - project_root.."/third_party/gflags/src", project_root.."/third_party/vulkan/", }) files({ diff --git a/src/xenia/vfs/premake5.lua b/src/xenia/vfs/premake5.lua index ea174e3e0..fc8b4a545 100644 --- a/src/xenia/vfs/premake5.lua +++ b/src/xenia/vfs/premake5.lua @@ -11,9 +11,6 @@ project("xenia-vfs") }) defines({ }) - includedirs({ - project_root.."/third_party/gflags/src", - }) recursive_platform_files() removefiles({"vfs_dump.cc"}) @@ -22,14 +19,10 @@ project("xenia-vfs-dump") kind("ConsoleApp") language("C++") links({ - "gflags", "xenia-base", "xenia-vfs", }) defines({}) - includedirs({ - project_root.."/third_party/gflags/src", - }) files({ "vfs_dump.cc", diff --git a/third_party/gflags b/third_party/gflags deleted file mode 160000 index 78b15171a..000000000 --- a/third_party/gflags +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 78b15171a7fce5815df58a919ab593ce80222028 diff --git a/third_party/gflags.lua b/third_party/gflags.lua deleted file mode 100644 index edb9a4eb6..000000000 --- a/third_party/gflags.lua +++ /dev/null @@ -1,41 +0,0 @@ -group("third_party") -project("gflags") - uuid("e319da87-75ed-4517-8f65-bd25e9cc02a3") - kind("StaticLib") - language("C++") - - -- These win32-specific overrides must come before others. - filter("platforms:Windows") - defines({ - "PATH_SEPARATOR=%%27\\\\%%27", - }) - includedirs({ - "gflags/src/windows", - }) - filter({}) - - defines({ - "GFLAGS_DLL_DECL=", - "GFLAGS_DLL_DEFINE_FLAG=", - "GFLAGS_DLL_DECLARE_FLAG=", - "_LIB", - }) - includedirs({ - "gflags/src", - }) - files({ - "gflags/src/gflags.cc", - "gflags/src/gflags_completions.cc", - "gflags/src/gflags_reporting.cc", - "gflags/src/mutex.h", - "gflags/src/util.h", - }) - filter("platforms:Windows") - files({ - "gflags/src/windows/config.h", - "gflags/src/windows/gflags/gflags.h", - "gflags/src/windows/gflags/gflags_completions.h", - "gflags/src/windows/gflags/gflags_declare.h", - "gflags/src/windows/port.cc", - "gflags/src/windows/port.h", - }) diff --git a/tools/build/scripts/test_suite.lua b/tools/build/scripts/test_suite.lua index 78e46aa4f..096968f7c 100644 --- a/tools/build/scripts/test_suite.lua +++ b/tools/build/scripts/test_suite.lua @@ -25,7 +25,6 @@ local function combined_test_suite(test_suite_name, project_root, base_path, con project_root.."/"..build_bin, })) links(merge_arrays(config["links"], { - "gflags", })) files({ project_root.."/"..build_tools_src.."/test_suite_main.cc", @@ -50,7 +49,6 @@ local function split_test_suite(test_suite_name, project_root, base_path, config project_root.."/"..build_bin, })) links(merge_arrays(config["links"], { - "gflags", })) files({ project_root.."/"..build_tools_src.."/test_suite_main.cc",