File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -485,6 +485,13 @@ function(add_swift_host_library name)
485485 message (FATAL_ERROR "One of SHARED/STATIC/OBJECT must be specified" )
486486 endif ()
487487
488+ # Using `support` llvm component ends up adding `-Xlinker /path/to/lib/libLLVMDemangle.a`
489+ # to `LINK_FLAGS` but `libLLVMDemangle.a` is not added as an input to the linking ninja statement.
490+ # As a workaround, include `demangle` component whenever `support` is mentioned.
491+ if ("support" IN_LIST ASHL_LLVM_LINK_COMPONENTS)
492+ list (APPEND ASHL_LLVM_LINK_COMPONENTS "demangle" )
493+ endif ()
494+
488495 if (XCODE)
489496 get_filename_component (base_dir ${CMAKE_CURRENT_SOURCE_DIR} NAME )
490497
@@ -794,6 +801,12 @@ function(add_swift_host_tool executable)
794801 precondition(ASHT_SWIFT_COMPONENT
795802 MESSAGE "Swift Component is required to add a host tool" )
796803
804+ # Using `support` llvm component ends up adding `-Xlinker /path/to/lib/libLLVMDemangle.a`
805+ # to `LINK_FLAGS` but `libLLVMDemangle.a` is not added as an input to the linking ninja statement.
806+ # As a workaround, include `demangle` component whenever `support` is mentioned.
807+ if ("support" IN_LIST ASHT_LLVM_LINK_COMPONENTS)
808+ list (APPEND ASHT_LLVM_LINK_COMPONENTS "demangle" )
809+ endif ()
797810
798811 add_executable (${executable} ${ASHT_UNPARSED_ARGUMENTS} )
799812 _add_host_variant_c_compile_flags(${executable} )
You can’t perform that action at this time.
0 commit comments