Skip to content

Commit 0f6908e

Browse files
committed
Define SWIFT_INLINE_NAMESPACE for swiftDemangling inclusions.
swiftlang/swift#30733 will begin requiring this in a change that allows the swiftDemangling symbols to be conditionally renamed using an inline namespace so that compiler and runtime symbols don't collide if statically linked in the same binary. The namespace `compiler` was chosen for lldb since that's what would have been used if its build was properly inheriting the public definition from the Swift CMake target.
1 parent 06099c0 commit 0f6908e

File tree

5 files changed

+25
-0
lines changed

5 files changed

+25
-0
lines changed

lldb/source/Core/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ add_lldb_library(lldbCore
9090
Demangle
9191
)
9292

93+
# Necessary to ensure that the SWIFT_INLINE_NAMESPACE macro is defined for
94+
# swiftDemangling inclusions.
95+
target_compile_definitions(lldbCore PRIVATE
96+
SWIFT_INLINE_NAMESPACE=compiler)
97+
9398
add_dependencies(lldbCore
9499
LLDBCorePropertiesGen
95100
LLDBCorePropertiesEnumGen)

lldb/source/Plugins/ExpressionParser/Swift/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,8 @@ add_lldb_library(lldbPluginExpressionParserSwift PLUGIN
4343
Support
4444
Core
4545
)
46+
47+
# Necessary to ensure that the SWIFT_INLINE_NAMESPACE macro is defined for
48+
# swiftDemangling inclusions.
49+
target_compile_definitions(lldbPluginExpressionParserSwift PRIVATE
50+
SWIFT_INLINE_NAMESPACE=compiler)

lldb/source/Plugins/SymbolFile/DWARF/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,8 @@ add_lldb_library(lldbPluginSymbolFileDWARF PLUGIN
6565
add_dependencies(lldbPluginSymbolFileDWARF
6666
LLDBPluginSymbolFileDWARFPropertiesGen
6767
LLDBPluginSymbolFileDWARFPropertiesEnumGen)
68+
69+
# Necessary to ensure that the SWIFT_INLINE_NAMESPACE macro is defined for
70+
# swiftDemangling inclusions.
71+
target_compile_definitions(lldbPluginSymbolFileDWARF PRIVATE
72+
SWIFT_INLINE_NAMESPACE=compiler)

lldb/source/Symbol/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,8 @@ add_lldb_library(lldbSymbol
7979
if(CMAKE_CXX_COMPILER_ID STREQUAL Clang AND NOT SWIFT_COMPILER_IS_MSVC_LIKE)
8080
target_compile_options(lldbSymbol PRIVATE -Wno-dollar-in-identifier-extension)
8181
endif()
82+
83+
# Necessary to ensure that the SWIFT_INLINE_NAMESPACE macro is defined for
84+
# swiftDemangling inclusions.
85+
target_compile_definitions(lldbSymbol PRIVATE
86+
SWIFT_INLINE_NAMESPACE=compiler)

lldb/source/Target/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,8 @@ endif()
9898
add_dependencies(lldbTarget
9999
LLDBTargetPropertiesGen
100100
LLDBTargetPropertiesEnumGen)
101+
102+
# Necessary to ensure that the SWIFT_INLINE_NAMESPACE macro is defined for
103+
# swiftDemangling inclusions.
104+
target_compile_definitions(lldbTarget PRIVATE
105+
SWIFT_INLINE_NAMESPACE=compiler)

0 commit comments

Comments
 (0)