Skip to content

Commit 3821089

Browse files
authored
[ExternalGenericMetadataBuilder] Fix install invocation. Add dependency. (#71872)
The call `swift_install_in_component` does not support multiple component depending on the `TARGET` pieces, so providing it several times is only confusing for humans. Deduplicate the repeated component and move it outside of the `ARCHIVE` and `LIBRARY` pieces. Additionally, `add_swift_host_library` does not provide a `INSTALL_IN_COMPONENT` like `add_swift_target_library` does, so there is a missing dependency between the `compiler` component and the library. This is not a problem with `build-script` because the target is part of `all`, but it is a problem when using `ninja compiler`, for example.`
1 parent d50b00e commit 3821089

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/ExternalGenericMetadataBuilder/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ target_link_libraries(swiftGenericMetadataBuilder
1313
swiftDemangling)
1414

1515
swift_install_in_component(TARGETS swiftGenericMetadataBuilder
16+
COMPONENT compiler
1617
LIBRARY
1718
DESTINATION "lib${LLVM_LIBDIR_SUFFIX}"
18-
COMPONENT compiler
1919
ARCHIVE
20-
DESTINATION "lib${LLVM_LIBDIR_SUFFIX}"
21-
COMPONENT compiler)
20+
DESTINATION "lib${LLVM_LIBDIR_SUFFIX}")
21+
add_dependencies(compiler swiftGenericMetadataBuilder)

0 commit comments

Comments
 (0)