aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryuzubot <yuzu@yuzu-emu.org>2022-01-30 13:02:17 +0000
committeryuzubot <yuzu@yuzu-emu.org>2022-01-30 13:02:17 +0000
commit6a1f0458b601268775c872f9f4de9c4f6f513e80 (patch)
treefda336a7eb91fef7d403e7cca3f0cdd0bec72499
parent60ae143f026b477dcbc452cd8523d04a3a49c034 (diff)
"Merge Tagged PR 7497"
-rw-r--r--.ci/templates/build-msvc.yml2
-rw-r--r--src/CMakeLists.txt5
-rw-r--r--src/common/assert.h8
3 files changed, 8 insertions, 7 deletions
diff --git a/.ci/templates/build-msvc.yml b/.ci/templates/build-msvc.yml
index f6e7557b2f..1756f5e8f5 100644
--- a/.ci/templates/build-msvc.yml
+++ b/.ci/templates/build-msvc.yml
@@ -8,7 +8,7 @@ steps:
displayName: 'Install vulkan-sdk'
- script: python -m pip install --upgrade pip conan
displayName: 'Install conan'
-- script: refreshenv && mkdir build && cd build && cmake -G "Visual Studio 16 2019" -A x64 -DYUZU_USE_BUNDLED_QT=1 -DYUZU_USE_BUNDLED_SDL2=1 -DYUZU_USE_QT_WEB_ENGINE=ON -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DYUZU_ENABLE_COMPATIBILITY_REPORTING=${COMPAT} -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON -DDISPLAY_VERSION=${{ parameters['version'] }} -DCMAKE_BUILD_TYPE=Release .. && cd ..
+- script: refreshenv && mkdir build && cd build && cmake -E env CXXFLAGS="/Gw /GA /Gr /Ob2" cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_POLICY_DEFAULT_CMP0069=NEW -DYUZU_USE_BUNDLED_QT=1 -DYUZU_USE_BUNDLED_SDL2=1 -DYUZU_USE_QT_WEB_ENGINE=ON -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DYUZU_ENABLE_COMPATIBILITY_REPORTING=${COMPAT} -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON -DDISPLAY_VERSION=${{ parameters['version'] }} -DCMAKE_BUILD_TYPE=Release .. && cd ..
displayName: 'Configure CMake'
- task: MSBuild@1
displayName: 'Build'
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1bdf70b76e..4ee98beba2 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -37,7 +37,8 @@ if (MSVC)
add_compile_options(
/MP
/Zi
- /Zm200
+ /Zm300
+ /Zf
/Zo
/permissive-
/EHsc
@@ -81,7 +82,7 @@ if (MSVC)
add_compile_options("$<$<CONFIG:Release>:/GS->")
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "/DEBUG /MANIFEST:NO" CACHE STRING "" FORCE)
- set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/DEBUG /MANIFEST:NO /INCREMENTAL:NO /OPT:REF,ICF" CACHE STRING "" FORCE)
+ set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG /MANIFEST:NO /INCREMENTAL:NO /OPT:REF,ICF" CACHE STRING "" FORCE)
else()
add_compile_options(
-Wall
diff --git a/src/common/assert.h b/src/common/assert.h
index 33060d865c..dedaa88e28 100644
--- a/src/common/assert.h
+++ b/src/common/assert.h
@@ -32,14 +32,14 @@ assert_noinline_call(const Fn& fn) {
#define ASSERT(_a_) \
do \
- if (!(_a_)) { \
+ if (!(_a_)) [[unlikely]] { \
assert_noinline_call([] { LOG_CRITICAL(Debug, "Assertion Failed!"); }); \
} \
while (0)
#define ASSERT_MSG(_a_, ...) \
do \
- if (!(_a_)) { \
+ if (!(_a_)) [[unlikely]] { \
assert_noinline_call([&] { LOG_CRITICAL(Debug, "Assertion Failed!\n" __VA_ARGS__); }); \
} \
while (0)
@@ -70,7 +70,7 @@ assert_noinline_call(const Fn& fn) {
#define ASSERT_OR_EXECUTE(_a_, _b_) \
do { \
ASSERT(_a_); \
- if (!(_a_)) { \
+ if (!(_a_)) [[unlikely]] { \
_b_ \
} \
} while (0)
@@ -79,7 +79,7 @@ assert_noinline_call(const Fn& fn) {
#define ASSERT_OR_EXECUTE_MSG(_a_, _b_, ...) \
do { \
ASSERT_MSG(_a_, __VA_ARGS__); \
- if (!(_a_)) { \
+ if (!(_a_)) [[unlikely]] { \
_b_ \
} \
} while (0)