Enable SDL_LEAN_AND_MEAN, SDL_RENDER_DISABLED, saves about 500kb in final exe

Build several projects that arent performance critical with /Os and /O1 under msvc windows
This commit is contained in:
chss95cs@gmail.com 2022-09-29 07:26:38 -07:00
parent 7e58a3b320
commit b4c175d8a3
13 changed files with 62 additions and 2 deletions

View File

@ -119,6 +119,11 @@ project("xenia-app")
"xenia-gpu-d3d12-trace-viewer",
"xenia-ui-window-d3d12-demo",
})
filter({"configurations:Release", "platforms:Windows"})
buildoptions({
"/Os",
"/O1"
})
filter("platforms:Windows")
-- Only create the .user file if it doesn't already exist.

View File

@ -10,6 +10,11 @@ project("xenia-cpu")
"xenia-base",
"mspack",
})
filter({"configurations:Release", "platforms:Windows"})
buildoptions({
"/Os",
"/O1"
})
includedirs({
project_root.."/third_party/llvm/include",
})

View File

@ -12,6 +12,11 @@ project("xenia-debug-ui")
"xenia-cpu",
"xenia-ui",
})
filter({"configurations:Release", "platforms:Windows"})
buildoptions({
"/Os",
"/O1"
})
defines({
})
includedirs({

View File

@ -38,7 +38,11 @@ project("xenia-hid-demo")
resincludedirs({
project_root,
})
filter({"configurations:Release", "platforms:Windows"})
buildoptions({
"/Os",
"/O1"
})
filter("platforms:not Android-*")
links({
"xenia-helper-sdl",

View File

@ -10,6 +10,11 @@ project("xenia-ui-d3d12")
"xenia-base",
"xenia-ui",
})
filter({"configurations:Release", "platforms:Windows"})
buildoptions({
"/Os",
"/O1"
})
local_platform_files()
files({
"../shaders/bytecode/d3d12_5_1/*.h",

View File

@ -14,7 +14,11 @@ project("xenia-ui")
local_platform_files()
removefiles({"*_demo.cc"})
removefiles({"windowed_app_main_*.cc"})
filter({"configurations:Release", "platforms:Windows"})
buildoptions({
"/Os",
"/O1"
})
filter("platforms:Android-*")
-- Exports JNI functions.
wholelib("On")

View File

@ -10,6 +10,11 @@ project("xenia-ui-vulkan")
"xenia-base",
"xenia-ui",
})
filter({"configurations:Release", "platforms:Windows"})
buildoptions({
"/Os",
"/O1"
})
includedirs({
project_root.."/third_party/Vulkan-Headers/include",
})

View File

@ -11,6 +11,11 @@ project("xenia-vfs")
})
defines({
})
filter({"configurations:Release", "platforms:Windows"})
buildoptions({
"/Os",
"/O1"
})
recursive_platform_files()
removefiles({"vfs_dump.cc"})

View File

@ -7,6 +7,8 @@ project("SDL2")
defines({
"HAVE_LIBC",
"SDL_LEAN_AND_MEAN=1",
"SDL_RENDER_DISABLED=1"
})
links({
"setupapi.lib",

View File

@ -11,6 +11,11 @@ project("capstone")
"CAPSTONE_USE_SYS_DYN_MEM",
"_LIB",
})
filter({"configurations:Release", "platforms:Windows"})
buildoptions({
"/Os",
"/O1"
})
includedirs({
"capstone",
"capstone/include",

5
third_party/fmt.lua vendored
View File

@ -8,6 +8,11 @@ project("fmt")
defines({
"_LIB",
})
filter({"configurations:Release", "platforms:Windows"})
buildoptions({
"/Os",
"/O1"
})
includedirs({
"fmt/include",
})

View File

@ -10,6 +10,11 @@ project("glslang-spirv")
})
includedirs({
})
filter({"configurations:Release", "platforms:Windows"})
buildoptions({
"/Os",
"/O1"
})
files({
"glslang/SPIRV/bitutils.h",
"glslang/SPIRV/disassemble.cpp",

View File

@ -11,6 +11,11 @@ project("imgui")
includedirs({
"imgui",
})
filter({"configurations:Release", "platforms:Windows"})
buildoptions({
"/Os",
"/O1"
})
files({
"imgui/imconfig.h",
"imgui/imgui.cpp",