From 128d5254cae478c69fd0d699594eb48321ee5249 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Mon, 9 Sep 2024 19:22:41 +1000 Subject: [PATCH] MSBuild: Disable RTTI on Windows builds It's not used. --- CMakeLists.txt | 3 +++ dep/msvc/vsprops/Base.props | 2 ++ src/duckstation-qt/duckstation-qt.vcxproj | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7eaa3b4fb..27832e706 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,6 +84,9 @@ if(MSVC) string(REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D_HAS_EXCEPTIONS=0 /permissive-") + if(COMPILER_CLANG_CL) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /clang:-fno-rtti") + endif() else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-rtti") endif() diff --git a/dep/msvc/vsprops/Base.props b/dep/msvc/vsprops/Base.props index fa05c047e..798d758c5 100644 --- a/dep/msvc/vsprops/Base.props +++ b/dep/msvc/vsprops/Base.props @@ -35,6 +35,8 @@ -flto=thin %(AdditionalOptions) 4324;%(DisableSpecificWarnings) false + false + /clang:-fno-rtti %(AdditionalOptions) true diff --git a/src/duckstation-qt/duckstation-qt.vcxproj b/src/duckstation-qt/duckstation-qt.vcxproj index 39e2b30bb..c4c424dfa 100644 --- a/src/duckstation-qt/duckstation-qt.vcxproj +++ b/src/duckstation-qt/duckstation-qt.vcxproj @@ -392,6 +392,10 @@ QT_NO_EXCEPTIONS=1;%(PreprocessorDefinitions) 4127;%(DisableSpecificWarnings) %(AdditionalIncludeDirectories);$(SolutionDir)dep\minizip\include + + + true + %(AdditionalOptions) /clang:-frtti