File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,13 @@ target_compile_definitions(swiftDemangling PRIVATE
16
16
$< $< BOOL:${SwiftCore_ENABLE_CRASH_REPORTER_CLIENT} > :-DSWIFT_HAVE_CRASHREPORTERCLIENT>
17
17
$< $< BOOL:${SwiftCore_HAS_ASL} > :-DSWIFT_STDLIB_HAS_ASL> )
18
18
19
+ # Target libraries that include libDemangling must define the name to use for
20
+ # the inline namespace to distinguish symbols from those built for the
21
+ # compiler, in order to avoid possible ODR violations if both are statically
22
+ # linked into the same binary. (see also commit message for 5b1daa9055c99904c84862ecc313641fd9b26e63)
23
+ target_compile_definitions (swiftDemangling PUBLIC
24
+ $< $< COMPILE_LANGUAGE:C,CXX> :-DSWIFT_INLINE_NAMESPACE=__runtime> )
25
+
19
26
target_include_directories (swiftDemangling
20
27
PRIVATE
21
28
"${SwiftCore_SWIFTC_SOURCE_DIR} /include"
Original file line number Diff line number Diff line change @@ -108,7 +108,8 @@ target_include_directories(swiftRuntime PRIVATE
108
108
109
109
target_link_libraries (swiftRuntime PRIVATE
110
110
$< $< PLATFORM_ID:Windows> :User32>
111
- swiftShims )
111
+ swiftShims
112
+ swiftDemangling )
112
113
113
114
# FIXME: Refactor so that we're not pulling sources from the compiler files
114
115
target_sources (swiftRuntime PRIVATE
You can’t perform that action at this time.
0 commit comments