File tree 2 files changed +10
-2
lines changed
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)
464
464
SHARED
465
465
STATIC
466
466
OBJECT
467
- PURE_SWIFT)
467
+ PURE_SWIFT
468
+ HAS_LIBSWIFT)
468
469
set (single_parameter_options)
469
470
set (multiple_parameter_options
470
471
LLVM_LINK_COMPONENTS)
@@ -510,6 +511,12 @@ function(add_swift_host_library name)
510
511
511
512
add_library (${name} ${libkind} ${ASHL_SOURCES} )
512
513
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
+
513
520
# Respect LLVM_COMMON_DEPENDS if it is set.
514
521
#
515
522
# 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
9
9
10
10
add_swift_host_library(libSwiftScan SHARED
11
11
libSwiftScan.cpp
12
- c-include -check.c)
12
+ c-include -check.c
13
+ HAS_LIBSWIFT)
13
14
14
15
add_dependencies (libSwiftScan
15
16
clang
You can’t perform that action at this time.
0 commit comments