Skip to content

Build and install 'clang' and 'clangd' in the macOS & linux toolchains #22184

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
merged 1 commit into from
Jan 30, 2019

Conversation

hyp
Copy link
Contributor

@hyp hyp commented Jan 28, 2019

  • 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', 'clangd', 'clang-headers' & 'compiler-rt' targets are now installed for
    the package build configurations for macOS and linux.
  • 'clang-resource-dir-symlink' is used in the package build configuration for macOS and linux
    to avoid duplication of Clang's headers and compiler-rt archives.

rdar://24912710

@hyp
Copy link
Contributor Author

hyp commented Jan 28, 2019

@swift-ci Please test

@hyp hyp requested a review from shahmishal January 28, 2019 22:23
@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 3ddec28675ca94ec0d57f3e52581f3e718653bce

@shahmishal
Copy link
Member

@swift-ci build toolchain

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 3ddec28675ca94ec0d57f3e52581f3e718653bce

- 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', 'clangd', 'clang-headers' & 'compiler-rt' targets are now installed for
  the package build configurations for macOS and linux.
- 'clang-resource-dir-symlink' is used in the package build configuration for macOS and linux
  to avoid duplication of Clang's headers and compiler-rt archives.

rdar://24912710
@swift-ci
Copy link
Contributor

Linux Toolchain (Ubuntu 16.04)
Download Toolchain
Git Sha - 3ddec28675ca94ec0d57f3e52581f3e718653bce

Install command
tar zxf swift-PR-22184-139-ubuntu16.04.tar.gz
More info

@hyp hyp force-pushed the buildInstallClangAndClangd branch from 3ddec28 to 1941aaa Compare January 29, 2019 02:08
@hyp
Copy link
Contributor Author

hyp commented Jan 29, 2019

@swift-ci build toolchain

@hyp
Copy link
Contributor Author

hyp commented Jan 29, 2019

@shahmishal I removed the clang driver tool line

@shahmishal
Copy link
Member

@swift-ci build toolchain

@swift-ci
Copy link
Contributor

Linux Toolchain (Ubuntu 16.04)
Download Toolchain
Git Sha - 1941aaa

Install command
tar zxf swift-PR-22184-141-ubuntu16.04.tar.gz
More info

@compnerd
Copy link
Member

Hmm, does update-checkout need to be updated to checkout the fork of clang-tools-extra? I've had to maintain a patch on top of the upstream tree for clang-tools-extra to build.

@shahmishal
Copy link
Member

@compnerd I updated the config few weeks ago - #21389

@shahmishal
Copy link
Member

@swift-ci build toolchain macOS

@swift-ci
Copy link
Contributor

macOS Toolchain
Download Toolchain
Git Sha - 1941aaa

Install command
tar -zxf swift-PR-22184-188-osx.tar.gz --directory ~/

Copy link
Member

@shahmishal shahmishal left a comment

Choose a reason for hiding this comment

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

LGTM!

@hyp
Copy link
Contributor Author

hyp commented Jan 30, 2019

@swift-ci please smoke-test

@hyp
Copy link
Contributor Author

hyp commented Jan 30, 2019

@swift-ci smoke test

@hyp hyp merged commit 78d759a into swiftlang:master Jan 30, 2019
PRODUCTS=(cmark llvm)
if [[ ! "${SKIP_BUILD_LIBCXX}" ]] ; then
PRODUCTS=("${PRODUCTS[@]}" libcxx)
fi
Copy link
Contributor

Choose a reason for hiding this comment

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

Because I turned on --no-legacy-impl by default, this won't be enough. You need to add a Product for libcxx in build-script (the python code) so that this will be triggered. Right now it will be skipped by the check for $(should_execute_host_actions_for_phase ${host} build) below.

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.

6 participants