Skip to content

[CMake] In LLVM unified builds, depend on the generation of Clang headers #70144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

drodriguez
Copy link
Contributor

If one is building a LLVM unified build, with Swift as an external project, SwiftCompilerSources can compile before the .td files that generate Clang headers are finished, which will make the compilation fail to find some files (the .inc files derived from those .td). Make the library that uses the header depend on clang-tablegen-targets to ensure those are done before the library is tried to be used.

This is not a problem in the normal build-script builds because in those cases, the LLVM/Clang headers are build way before Swift is started to be build.

…ders

If one is building a LLVM unified build, with Swift as an external
project, SwiftCompilerSources can compile before the `.td` files that
generate Clang headers are finished, which will make the compilation
fail to find some files (the `.inc` files derived from those `.td`).
Make the library that uses the header depend on `clang-tablegen-targets`
to ensure those are done before the library is tried to be used.

This is not a problem in the normal `build-script` builds because in
those cases, the LLVM/Clang headers are build way before Swift is
started to be build.
@drodriguez
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@eeckstein eeckstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@drodriguez drodriguez merged commit d8127eb into swiftlang:main Dec 2, 2023
@drodriguez drodriguez deleted the unified-swift-compiler-sources branch December 2, 2023 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants