Skip to content

Commit 3ae4ffe

Browse files
committed
Runtimes: avoid ODR violations in _Concurrency
When building the standard libraries with the LLVM ADT types, we use the local definition which have been modified to avoid ODR violations. However, due to the intermingling of the compiler and runtime implementations, we cannot isolate the headers properly to ensure that the right definition is used. We need to ensure that we pass along `SWIFT_RUNTIME` when processing headers to avoid references to the unsafe references to the LLVM Support library.
1 parent 4686897 commit 3ae4ffe

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Runtimes/Core/Concurrency/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ add_library(swift_Concurrency
102102

103103
include(${SwiftCore_CONCURRENCY_GLOBAL_EXECUTOR}.cmake)
104104
target_compile_definitions(swift_Concurrency PRIVATE
105+
$<$<COMPILE_LANGUAGE:C,CXX>:-DSWIFT_RUNTIME>
105106
$<$<COMPILE_LANGUAGE:C,CXX>:-DSWIFT_TARGET_LIBRARY_NAME=swift_Concurrency>
106107
# NOTE: VS2017 <15.8 would round clamp alignment to alignof(max_align_t) which
107108
# was non-conformant. Indicate that we wish to use extended alignment.

0 commit comments

Comments
 (0)