From 3cab5b1e09ef96a2e425c5bbd6d07bee2ba35a2a Mon Sep 17 00:00:00 2001 From: Relintai Date: Tue, 16 Jul 2024 00:21:13 +0200 Subject: [PATCH] Hopefully fix msvc build. --- editor_modules/denoise/SCsub | 8 +++++++- editor_modules/raycast/SCsub | 9 ++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/editor_modules/denoise/SCsub b/editor_modules/denoise/SCsub index b3e5953af..ef36aab91 100644 --- a/editor_modules/denoise/SCsub +++ b/editor_modules/denoise/SCsub @@ -124,7 +124,13 @@ env.modules_sources += thirdparty_obj if env["platform"] == "windows" and not env.msvc: env_thirdparty.Append(CPPFLAGS=["-mstackrealign"]) -env_thirdparty.Append(CPPFLAGS=["-frtti"]) + +if not env.msvc: + env_thirdparty["CXXFLAGS"].remove("-fno-rtti") + env_thirdparty.Append(CXXFLAGS=["-frtti"]) +else: + env_thirdparty["CXXFLAGS"].remove("/GR-") + env_thirdparty.Append(CXXFLAGS=["/GR"]) weights_in_path = thirdparty_dir + "weights/rtlightmap_hdr.tza" weights_out_path = thirdparty_dir + "weights/rtlightmap_hdr.gen.cpp" diff --git a/editor_modules/raycast/SCsub b/editor_modules/raycast/SCsub index 393522e1e..69acc4652 100644 --- a/editor_modules/raycast/SCsub +++ b/editor_modules/raycast/SCsub @@ -103,9 +103,16 @@ if env["builtin_embree"]: "-fno-tree-vectorize", "-fvisibility=hidden", "-fvisibility-inlines-hidden", - "-frtti" # embree needs it ] ) + + + if not env.msvc: + env_thirdparty["CXXFLAGS"].remove("-fno-rtti") + env_thirdparty.Append(CXXFLAGS=["-frtti"]) + else: + env_thirdparty["CXXFLAGS"].remove("/GR-") + env_thirdparty.Append(CXXFLAGS=["/GR"]) env.modules_sources += thirdparty_obj