From 3acf3fdcd1525198120a0d2c0c36db666d80946f Mon Sep 17 00:00:00 2001 From: Margen67 Date: Thu, 12 Dec 2024 20:52:37 -0800 Subject: [PATCH] Never specify /O1 Leaving it as /O2 might improve performance. Stops this from being spammed: cl : command line warning D9025: overriding '/O2' with '/O1' [D:\a\xenia-canary\xenia-canary\build\glslang-spirv.vcxproj] /Os is implied by /O1; https://learn.microsoft.com/en-us/cpp/build/reference/o1-o2-minimize-size-maximize-speed?view=msvc-170 --- src/xenia/app/premake5.lua | 9 ++++----- src/xenia/cpu/premake5.lua | 9 ++++----- src/xenia/debug/ui/premake5.lua | 11 +++++------ src/xenia/ui/d3d12/premake5.lua | 11 +++++------ src/xenia/ui/premake5.lua | 9 ++++----- src/xenia/ui/vulkan/premake5.lua | 11 +++++------ src/xenia/vfs/premake5.lua | 12 +++++------- third_party/capstone.lua | 11 +++++------ third_party/fmt.lua | 11 +++++------ third_party/glslang-spirv.lua | 11 +++++------ third_party/imgui.lua | 11 +++++------ 11 files changed, 52 insertions(+), 64 deletions(-) diff --git a/src/xenia/app/premake5.lua b/src/xenia/app/premake5.lua index 4fd767c05..11a7a0100 100644 --- a/src/xenia/app/premake5.lua +++ b/src/xenia/app/premake5.lua @@ -119,11 +119,10 @@ project("xenia-app") "xenia-gpu-d3d12-trace-viewer", "xenia-ui-window-d3d12-demo", }) - filter({"configurations:Release", "platforms:Windows"}) - buildoptions({ - "/Os", - "/O1" - }) +-- filter({"configurations:Release", "platforms:Windows"}) +-- buildoptions({ +-- "/O1", +-- }) filter("platforms:Windows") -- Only create the .user file if it doesn't already exist. diff --git a/src/xenia/cpu/premake5.lua b/src/xenia/cpu/premake5.lua index c689ff8d3..14a423126 100644 --- a/src/xenia/cpu/premake5.lua +++ b/src/xenia/cpu/premake5.lua @@ -23,8 +23,7 @@ project("xenia-cpu") include("testing") include("ppc/testing") -filter({"configurations:Release", "platforms:Windows"}) -buildoptions({ - "/Os", - "/O1" -}) \ No newline at end of file +-- filter({"configurations:Release", "platforms:Windows"}) +-- buildoptions({ +-- "/O1", +-- }) diff --git a/src/xenia/debug/ui/premake5.lua b/src/xenia/debug/ui/premake5.lua index dc3724ce9..2afdeabd5 100644 --- a/src/xenia/debug/ui/premake5.lua +++ b/src/xenia/debug/ui/premake5.lua @@ -12,12 +12,11 @@ project("xenia-debug-ui") "xenia-cpu", "xenia-ui", }) - filter({"configurations:Release", "platforms:Windows"}) - buildoptions({ - "/Os", - "/O1" - }) - filter{} +-- filter({"configurations:Release", "platforms:Windows"}) +-- buildoptions({ +-- "/O1", +-- }) +-- filter{} defines({ }) includedirs({ diff --git a/src/xenia/ui/d3d12/premake5.lua b/src/xenia/ui/d3d12/premake5.lua index c650b1b0f..9e667bbe9 100644 --- a/src/xenia/ui/d3d12/premake5.lua +++ b/src/xenia/ui/d3d12/premake5.lua @@ -10,12 +10,11 @@ project("xenia-ui-d3d12") "xenia-base", "xenia-ui", }) - filter({"configurations:Release", "platforms:Windows"}) - buildoptions({ - "/Os", - "/O1" - }) - filter {} +-- filter({"configurations:Release", "platforms:Windows"}) +-- buildoptions({ +-- "/O1", +-- }) +-- filter {} local_platform_files() files({ "../shaders/bytecode/d3d12_5_1/*.h", diff --git a/src/xenia/ui/premake5.lua b/src/xenia/ui/premake5.lua index b6254938a..fcb782b45 100644 --- a/src/xenia/ui/premake5.lua +++ b/src/xenia/ui/premake5.lua @@ -14,11 +14,10 @@ project("xenia-ui") local_platform_files() removefiles({"*_demo.cc"}) removefiles({"windowed_app_main_*.cc"}) - filter({"configurations:Release", "platforms:Windows"}) - buildoptions({ - "/Os", - "/O1" - }) +-- filter({"configurations:Release", "platforms:Windows"}) +-- buildoptions({ +-- "/O1", +-- }) filter("platforms:Android-*") -- Exports JNI functions. wholelib("On") diff --git a/src/xenia/ui/vulkan/premake5.lua b/src/xenia/ui/vulkan/premake5.lua index f732bcf24..3c1bfb2a3 100644 --- a/src/xenia/ui/vulkan/premake5.lua +++ b/src/xenia/ui/vulkan/premake5.lua @@ -10,12 +10,11 @@ project("xenia-ui-vulkan") "xenia-base", "xenia-ui", }) - filter({"configurations:Release", "platforms:Windows"}) - buildoptions({ - "/Os", - "/O1" - }) - filter {} +-- filter({"configurations:Release", "platforms:Windows"}) +-- buildoptions({ +-- "/O1", +-- }) +-- filter {} includedirs({ project_root.."/third_party/Vulkan-Headers/include", }) diff --git a/src/xenia/vfs/premake5.lua b/src/xenia/vfs/premake5.lua index e33df18f6..214f18864 100644 --- a/src/xenia/vfs/premake5.lua +++ b/src/xenia/vfs/premake5.lua @@ -11,12 +11,11 @@ project("xenia-vfs") }) defines({ }) - filter({"configurations:Release", "platforms:Windows"}) - buildoptions({ - "/Os", - "/O1" - }) - filter {} +-- filter({"configurations:Release", "platforms:Windows"}) +-- buildoptions({ +-- "/O1", +-- }) +-- filter {} recursive_platform_files() removefiles({"vfs_dump.cc"}) @@ -40,4 +39,3 @@ project("xenia-vfs-dump") project_root, }) include("testing") - diff --git a/third_party/capstone.lua b/third_party/capstone.lua index a29e4e879..f22713909 100644 --- a/third_party/capstone.lua +++ b/third_party/capstone.lua @@ -11,12 +11,11 @@ project("capstone") "CAPSTONE_USE_SYS_DYN_MEM", "_LIB", }) - filter({"configurations:Release", "platforms:Windows"}) - buildoptions({ - "/Os", - "/O1" - }) - filter {} +-- filter({"configurations:Release", "platforms:Windows"}) +-- buildoptions({ +-- "/O1", +-- }) +-- filter {} includedirs({ "capstone", diff --git a/third_party/fmt.lua b/third_party/fmt.lua index 5aa8bad70..5e8ce2d84 100644 --- a/third_party/fmt.lua +++ b/third_party/fmt.lua @@ -8,12 +8,11 @@ project("fmt") defines({ "_LIB", }) - filter({"configurations:Release", "platforms:Windows"}) - buildoptions({ - "/Os", - "/O1" - }) - filter {} +-- filter({"configurations:Release", "platforms:Windows"}) +-- buildoptions({ +-- "/O1", +-- }) +-- filter {} includedirs({ "fmt/include", diff --git a/third_party/glslang-spirv.lua b/third_party/glslang-spirv.lua index d3b1d40d9..38d8ad7f0 100644 --- a/third_party/glslang-spirv.lua +++ b/third_party/glslang-spirv.lua @@ -10,12 +10,11 @@ project("glslang-spirv") }) includedirs({ }) - filter({"configurations:Release", "platforms:Windows"}) - buildoptions({ - "/Os", - "/O1" - }) - filter {} +-- filter({"configurations:Release", "platforms:Windows"}) +-- buildoptions({ +-- "/O1", +-- }) +-- filter {} files({ "glslang/SPIRV/bitutils.h", diff --git a/third_party/imgui.lua b/third_party/imgui.lua index ccdaa4864..253133621 100644 --- a/third_party/imgui.lua +++ b/third_party/imgui.lua @@ -11,12 +11,11 @@ project("imgui") includedirs({ "imgui", }) - filter({"configurations:Release", "platforms:Windows"}) - buildoptions({ - "/Os", - "/O1" - }) - filter{} +-- filter({"configurations:Release", "platforms:Windows"}) +-- buildoptions({ +-- "/O1", +-- }) +-- filter{} files({ "imgui/imconfig.h", "imgui/imgui.cpp",