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
1616 $<$<BOOL :${SwiftCore_ENABLE_CRASH_REPORTER_CLIENT} >:-DSWIFT_HAVE_CRASHREPORTERCLIENT>
1717 $<$<BOOL :${SwiftCore_HAS_ASL} >:-DSWIFT_STDLIB_HAS_ASL>)
1818
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+
1926target_include_directories (swiftDemangling
2027 PRIVATE
2128 "${SwiftCore_SWIFTC_SOURCE_DIR} /include"
Original file line number Diff line number Diff line change @@ -108,7 +108,8 @@ target_include_directories(swiftRuntime PRIVATE
108108
109109target_link_libraries (swiftRuntime PRIVATE
110110 $<$<PLATFORM_ID:Windows>:User32>
111- swiftShims)
111+ swiftShims
112+ swiftDemangling)
112113
113114# FIXME: Refactor so that we're not pulling sources from the compiler files
114115target_sources (swiftRuntime PRIVATE
You can’t perform that action at this time.
0 commit comments