-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[5.0] Build and install 'clang' and 'clangd' in the macOS & linux toolchains #22273
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
[5.0] Build and install 'clang' and 'clangd' in the macOS & linux toolchains #22273
Conversation
@swift-ci build toolchain |
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.
LGTM! We will need to also update the toolchain bots before merging this PR, I will merge it once bots have been updated.
@swift-ci test |
Build failed |
@swift-ci build toolchain |
@swift-ci test |
Linux Toolchain (Ubuntu 16.04) Install command |
macOS Toolchain Install command |
Build failed |
There's an issue with the libc++ header installation: https://bugs.swift.org/browse/SR-9861 |
Nevermind, that bug should not affect the swift-5 branch. |
@swift-ci test |
Build failed |
@swift-ci test |
Build failed |
@swift-ci test |
Build failed |
@swift-ci clean test |
Build failed |
Any news on when this might land? It will make a big improvement to the Swift 5 Docker images: https://forums.swift.org/t/which-clang-package-should-we-install/20542/12 |
@swift-ci clean test macos |
Build failed |
@swift-ci clean test macos |
Build failed |
Heads-up that we'll need #22911 too. |
Build failed |
Discussed with @shahmishal about the OSX bot failure, we think the additional PRs @benlangmuir suggested may help to resolve the failure, @hyp will cherry-pick them to this PR. |
Update: discussed with @benlangmuir and he says that clangd is problematic and is hitting an assertion hit. Given that clangd is not usable there's no reason to put all of clang+clangd in the swift-5.0 macOS toolchain, so @hyp is going to look into updating the PR to only put clang in the linux toolchain. |
That sounds great - thanks @akyrtzi @benlangmuir @hyp! |
- Build script now builds clang_tools_extra as part of LLVM's build. - Build script now has a new libc++ build step to allow libc++ headers to be installed in the resulting toolchain. - 'clang', 'clang-headers' & 'compiler-rt' targets are now installed for the package build configurations for linux. - 'clang-resource-dir-symlink' is used in the package build configuration for linux to avoid duplication of Clang's headers and compiler-rt archives. rdar://24912710 (cherry picked from commit 1941aaa)
dcf5e20
to
76e66e9
Compare
Updated the PR to only install clang on Linux |
@swift-ci please test |
Build failed |
Build failed |
@shahmishal Why do the builds fail immediately? |
@swift-ci build toolchain |
@hyp, it's due to force push
|
@shahmishal is macOS failure the same one we had the last time? I took out the Mac builds, but maybe the problem is in the build script? |
We need to cherry-pick these two PRs into #22273. Otherwise, we are going to try to install libcxx headers during PR testing. These two PRs enable support to only install libcxx headers in package preset, the current solution in PR#22273 will try to install the headers if libcxx directory exists. https://github.com/apple/swift/pull/22273/files#diff-65b44eb6cb88af2161d8e1176231aad0R1217
This is the reason we are seeing PR failing due to "--install-destdir is required to install products." |
@swift-ci please test |
Cherry-picked the changes |
Build failed |
Build failed |
Now we build libcxx if and only if --libcxx is passed, like with other optional products. This loses the intended "build if sources are checked out" behaviour, but behaves more predictably. (cherry picked from commit e180006) Revert "Revert "[build-script] Add Product for libc++"" add libcxx-cmake-options
71d88c5
to
c221dd6
Compare
error: unknown setting: libcxx-cmake-options, fixed. |
@swift-ci please test |
Build failed |
Build failed |
@swift-ci build toolchain |
@shahmishal tests passed, please merge |
Awesome, thanks @hyp and @shahmishal! |
resulting toolchain.
the package build configurations for macOS and linux.
to avoid duplication of Clang's headers and compiler-rt archives.
rdar://24912710
(cherry picked from commit 1941aaa)