Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if there's a way with CMake to link
SourceKitSwiftLang
such that its own dependencies don't need to be listed again here? 🤔There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I wondered that as well. I was surprised I had to do this, to be honest. Maybe @llvm-beanz would know?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You shouldn't have to do this. CMake understands transitive dependencies between static archives, it should do the right thing.
I suspect this is caused by the way Swift builds out-of-tree with LLVM & Clang. My "stab in the dark" here is that it handles static libraries specified by full path differently than libraries that are specified by target.
I wonder if this could be fixed in a minimally invasive way by having Swift include the CMake Exports lists from Clang and LLVM. Then the LLVM and Clang targets would be exposed more cleanly in Swift's build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are already using the LLVM exports list. I am going to be looking into doing the Clang side of it in a bit. It is causing us problems on master-next.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you elaborate on the problem? Including LLVMExports.cmake and ClangTargets.cmake should setup all the transitive dependencies correctly.