Skip to content

Commit c0d53c4

Browse files
committed
[CMake] Fixup build for compiler plugin support library
1 parent 66b7031 commit c0d53c4

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -911,6 +911,12 @@ function(add_swift_host_tool executable)
911911
endif()
912912
endif()
913913
914+
if(SWIFT_SWIFT_PARSER)
915+
set_property(
916+
TARGET ${executable}
917+
APPEND PROPERTY INSTALL_RPATH "@executable_path/../lib")
918+
endif()
919+
914920
if(ASHT_THINLTO_LD64_ADD_FLTO_CODEGEN_ONLY)
915921
string(CONCAT lto_codegen_only_link_options
916922
"$<"

lib/ASTGen/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ if (SWIFT_SWIFT_PARSER)
6868
$<TARGET_OBJECTS:SwiftSyntax::SwiftCompilerSupport>
6969

7070
swiftAST
71+
swift_CompilerPluginSupport
7172
)
7273

7374
target_include_directories(swiftASTGen PUBLIC

lib/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ list(APPEND LLVM_COMMON_DEPENDS swift-syntax-generated-headers)
1717
list(APPEND LLVM_COMMON_DEPENDS swift-ast-generated-headers)
1818
list(APPEND LLVM_COMMON_DEPENDS swift-parse-syntax-generated-headers)
1919

20+
add_subdirectory(CompilerPluginSupport)
2021
add_subdirectory(APIDigester)
2122
add_subdirectory(AST)
2223
add_subdirectory(ASTGen)
@@ -57,4 +58,3 @@ add_subdirectory(SymbolGraphGen)
5758
add_subdirectory(Syntax)
5859
add_subdirectory(SyntaxParse)
5960
add_subdirectory(Threading)
60-
add_subdirectory(CompilerPluginSupport)

tools/driver/CMakeLists.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
function(add_swift_parser_link_libraries target)
77
if(SWIFT_SWIFT_PARSER)
88
target_link_libraries(${target}
9-
PRIVATE
10-
swift_CompilerPluginSupport swiftCore)
9+
PRIVATE swiftCore)
1110
endif()
1211
endfunction()
1312

@@ -68,11 +67,6 @@ target_link_libraries(swift-frontend
6867
swiftCompilerModules)
6968

7069
add_swift_parser_link_libraries(swift-frontend)
71-
if(SWIFT_SWIFT_PARSER)
72-
set_property(
73-
TARGET swift-frontend
74-
APPEND PROPERTY INSTALL_RPATH "@executable_path/../lib")
75-
endif()
7670

7771
_add_swift_runtime_link_flags(swift-frontend "../../lib" "")
7872

0 commit comments

Comments
 (0)