Skip to content

Commit

Permalink
Yet another shot at solving linking on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
redsun82 committed Mar 30, 2023
1 parent 01f52a8 commit 35995ef
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 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..7ea1a1763b9 100644
index ec3fa2c853b..dcd3e95c5ae 100644
--- a/lib/AST/CMakeLists.txt
+++ b/lib/AST/CMakeLists.txt
@@ -58,7 +58,6 @@ add_swift_host_library(swiftAST STATIC
Expand All @@ -69,22 +69,21 @@ index ec3fa2c853b..7ea1a1763b9 100644
ImportCache.cpp
IndexSubset.cpp
InlinableText.cpp
@@ -122,6 +121,14 @@ add_swift_host_library(swiftAST STATIC
@@ -122,6 +121,13 @@ add_swift_host_library(swiftAST STATIC
${SWIFTAST_LLVM_LINK_COMPONENTS}
)

+add_swift_host_library(swiftIdentifier SHARED
+ Identifier.cpp
+ )
+ LLVM_LINK_COMPONENTS
+ core support)
+
+if(${SWIFT_HOST_VARIANT_SDK} IN_LIST SWIFT_DARWIN_PLATFORMS)
+ target_link_options(swiftIdentifier PRIVATE "LINKER:-undefined,dynamic_lookup")
+endif()
+target_link_libraries(swiftIdentifier PUBLIC clangBasic)
+
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 +159,7 @@ if(NOT SWIFT_BUILD_ONLY_SYNTAXPARSERLIB)
@@ -152,7 +158,7 @@ if(NOT SWIFT_BUILD_ONLY_SYNTAXPARSERLIB)
endif()

target_link_libraries(swiftAST
Expand Down

0 comments on commit 35995ef

Please sign in to comment.