Hopefully fix msvc build.

This commit is contained in:
Relintai 2024-07-16 00:21:13 +02:00
parent 9d6680ce6d
commit 3cab5b1e09
2 changed files with 15 additions and 2 deletions

View File

@ -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"

View File

@ -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