File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -257,11 +257,18 @@ function(_add_variant_c_compile_flags)
257
257
list (APPEND result "-D_ENABLE_ATOMIC_ALIGNMENT_FIX" )
258
258
259
259
# msvcprt's std::function requires RTTI, but we do not want RTTI data.
260
- # Emulate /GR-
260
+ # Emulate /GR-.
261
+ # TODO(compnerd) when moving up to VS 2017 15.3 and newer, we can disable
262
+ # RTTI again
261
263
if (NOT SWIFT_COMPILER_IS_MSVC_LIKE )
262
264
list (APPEND result -frtti )
263
265
list (APPEND result -Xclang;-fno-rtti-data )
264
266
endif ()
267
+
268
+ # NOTE: VS 2017 15.3 introduced this to disable the static components of
269
+ # RTTI as well. This requires a newer SDK though and we do not have
270
+ # guarantees on the SDK version currently.
271
+ list (APPEND result "-D_HAS_STATIC_RTTI=0" )
265
272
endif ()
266
273
267
274
if (CFLAGS_ENABLE_ASSERTIONS )
You can’t perform that action at this time.
0 commit comments