Use static TLS implementation#1165
Use static TLS implementation#1165jensmeindertsma wants to merge 27 commits intovolta-cli:mainfrom jensmeindertsma:use-static-tls-impl
Conversation
|
This pull request is ready for review, just not ready to be merged yet until I completed the last few tasks. Requesting for reviewReviews from anyone else would be welcome as well 😊 Have a good day! |
|
As requested by @charlespierce it may be better to switch back to Docker-based builds as that way we can support older Linux distro's. We should base the Docker image off of CentOS 6, this will take some adjustment to the |
|
@charlespierce what do you think about the change in upload URL's? There's no longer a version of OpenSSL bundled, so we don't need that in the upload URL anymore. I've removed the OpenSSL version from the upload URL, but does this break installing older Volta versions? |
ci/install-build-tools.sh
Outdated
| use_clang=1 | ||
| install_packages \ | ||
| qemu-user \ | ||
| gcc-aarch64-linux-gnu \ | ||
| libc6-dev-arm64-cross | ||
| ;; | ||
| --target=aarch64-unknown-linux-musl) | ||
| use_clang=1 | ||
| install_packages \ | ||
| qemu-user | ||
| ;; | ||
| --target=x86_64-unknown-linux-musl) | ||
| use_clang=1 | ||
| ;; | ||
| --target=*) | ||
| ;; | ||
| esac | ||
|
|
||
| if [ -n "$use_clang" ]; then | ||
| # https://github.com/rustls/rustls/pull/1009 upgraded Rust's LLVM version to | ||
| # 14 | ||
| llvm_version=14 | ||
| sudo apt-key add ./ci/llvm-snapshot.gpg.key | ||
| sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-$llvm_version main" | ||
| sudo apt-get update | ||
| install_packages clang-$llvm_version llvm-$llvm_version | ||
| fi |
There was a problem hiding this comment.
@charlespierce my biggest concern with building in a Docker image based on CentOS 6 is whether these lines here will still work. Surely I can update this to use yum, but a major issue is that LLVM-14 and Clang-14 may not be available for CentOS 6. I can try https://www.vultr.com/docs/how-to-install-llvm-and-clang-on-centos-6 but there may be problems with building from source on such an old Linux distro.
This reverts commit b3546fa.
|
Reduced the scope of this PR to purely the use of the static TLS implementation, we can figure out ARM and MUSL later in a different PR. |
|
FYI @jensmeindertsma I just updated our existing Dockerfile to use a mirror of the CentOS vault provided by CERN, rather than the default |
|
Thanks! I've spend quite some hours now struggling with this. It looks like we need to compile GCC from source but after having tried that I've ran into problems. Not to mention, to support ARM and MUSL we'll need to build LLVM and CLang from source as well. I'm going to let this PR rest for a little bit, can you add a |
|
I wonder if it's possible to use the Vault versions of the "Software Collections" repo to get a more up-to-date version of GCC to enable And related, I found some descriptions of how to update GCC from a different repo: That may enable us to avoid having to build from source (which should significantly speed things up). Also, for ARM / MUSL, since it's a new platform that we didn't support before, I think it's reasonable to base it on a more recent Linux distro version, to simplify that process. Then when we get to releasing Volta 2.0, we can include pulling the build toolchain up to parity with that version, to unify the build steps across the board. |
|
See also this comment for how to get |
|
@charlespierce that's a start, but since Rust now requires clang14, and devtools7 doesn't include clang14, we still need to build that from source. Which is where I'm getting stuck. |
|
If you'd like to learn more about what's required, check the setup and build files used in ring's CI |
|
Which would be https://github.com/briansmith/ring/blob/main/mk/install-build-tools.sh and the cargo.sh file in the same directory |
This pull request implements volta-cli/rfcs#47.
Tasks
rustlsfeature ofattohttpcx86_64-unknown-linux-gnubinary on CentOS 6