File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -464,7 +464,8 @@ function(add_swift_host_library name)
464464 SHARED
465465 STATIC
466466 OBJECT
467- PURE_SWIFT)
467+ PURE_SWIFT
468+ HAS_LIBSWIFT)
468469 set (single_parameter_options)
469470 set (multiple_parameter_options
470471 LLVM_LINK_COMPONENTS)
@@ -510,6 +511,12 @@ function(add_swift_host_library name)
510511
511512 add_library (${name} ${libkind} ${ASHL_SOURCES} )
512513
514+ if (ASHL_HAS_LIBSWIFT AND SWIFT_TOOLS_ENABLE_LIBSWIFT)
515+ # Workaround for a linker crash related to autolinking: rdar://77839981
516+ set_property (TARGET ${name} APPEND_STRING PROPERTY
517+ LINK_FLAGS " -lobjc " )
518+ endif ()
519+
513520 # Respect LLVM_COMMON_DEPENDS if it is set.
514521 #
515522 # LLVM_COMMON_DEPENDS if a global variable set in ./lib that provides targets
Original file line number Diff line number Diff line change @@ -9,7 +9,8 @@ set(LLVM_EXPORTED_SYMBOL_FILE
99
1010add_swift_host_library(libSwiftScan SHARED
1111 libSwiftScan.cpp
12- c-include -check.c)
12+ c-include -check.c
13+ HAS_LIBSWIFT)
1314
1415add_dependencies (libSwiftScan
1516 clang
You can’t perform that action at this time.
0 commit comments