Skip to content

Commit 04ca723

Browse files
committed
build: enable ABI breaking std::atomic changes on MSVC
The std::atomic implementation in MSVC broke ABI compatibility across a minor update (VS2015U2). Permit the ABI breaking change for the use in the runtime.
1 parent bf25f8d commit 04ca723

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,8 @@ function(_add_variant_c_compile_flags)
241241
list(APPEND result "-D_CRT_USE_WINAPI_FAMILY_DESKTOP_APP")
242242
# TODO(compnerd) handle /MT
243243
list(APPEND result "-D_DLL")
244+
# NOTE: We assume that we are using VS 2015 U2+
245+
list(APPEND result "-D_ENABLE_ATOMIC_ALIGNMENT_FIX")
244246
endif()
245247

246248
if(CFLAGS_ENABLE_ASSERTIONS)

0 commit comments

Comments
 (0)