Skip to content

Commit

Permalink
Try with --export-dynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
redsun82 committed Mar 31, 2023
1 parent 35995ef commit 7c12cb5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions patches/swift/04-allow-plugging-in-observer.patch
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ index 184e6196918..ef5c3eafe69 100644
// progress.
};
diff --git a/lib/AST/CMakeLists.txt b/lib/AST/CMakeLists.txt
index ec3fa2c853b..dcd3e95c5ae 100644
index ec3fa2c853b..1d4a7172508 100644
--- a/lib/AST/CMakeLists.txt
+++ b/lib/AST/CMakeLists.txt
@@ -58,7 +58,6 @@ add_swift_host_library(swiftAST STATIC
Expand All @@ -69,7 +69,7 @@ index ec3fa2c853b..dcd3e95c5ae 100644
ImportCache.cpp
IndexSubset.cpp
InlinableText.cpp
@@ -122,6 +121,13 @@ add_swift_host_library(swiftAST STATIC
@@ -122,6 +121,17 @@ add_swift_host_library(swiftAST STATIC
${SWIFTAST_LLVM_LINK_COMPONENTS}
)

Expand All @@ -79,11 +79,15 @@ index ec3fa2c853b..dcd3e95c5ae 100644
+ core support)
+
+target_link_libraries(swiftIdentifier PUBLIC clangBasic)
+
+if(${SWIFT_HOST_VARIANT_SDK} IN_LIST SWIFT_DARWIN_PLATFORMS)
+ target_link_options(swiftIdentifier PRIVATE "LINKER:-undefined,dynamic_lookup")
+endif()
+
if(SWIFT_FORCE_OPTIMIZED_TYPECHECKER)
if(CMAKE_CXX_COMPILER_ID STREQUAL MSVC OR CMAKE_CXX_SIMULATE_ID STREQUAL MSVC)
target_compile_options(swiftAST PRIVATE /O2 /Ob2)
@@ -152,7 +158,7 @@ if(NOT SWIFT_BUILD_ONLY_SYNTAXPARSERLIB)
@@ -152,7 +162,7 @@ if(NOT SWIFT_BUILD_ONLY_SYNTAXPARSERLIB)
endif()

target_link_libraries(swiftAST
Expand Down

0 comments on commit 7c12cb5

Please sign in to comment.