Skip to content

Commit

Permalink
Merge pull request #6337 from mozilla/mergify/bp/release-v130/pr-6335
Browse files Browse the repository at this point in the history
Update clang-dist-toolchain [ci full] (backport #6335)
  • Loading branch information
DonalMe authored Aug 6, 2024
2 parents 1d1c98a + 49b7009 commit b206ca1
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions taskcluster/scripts/toolchain/cross-compile-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ export PATH=$PATH:/builds/worker/clang/bin
export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_X86_64_APPLE_DARWIN_NSS_STATIC=1
export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_X86_64_APPLE_DARWIN_NSS_DIR=/builds/worker/checkouts/vcs/libs/desktop/darwin/nss
# x86_64 Darwin
export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_X86_64_APPLE_DARWIN_CC=/builds/worker/clang/bin/clang
export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_X86_64_APPLE_DARWIN_CC=/builds/worker/clang/bin/clang-18
export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_X86_64_APPLE_DARWIN_TOOLCHAIN_PREFIX=/builds/worker/cctools/bin
export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_X86_64_APPLE_DARWIN_AR=/builds/worker/cctools/bin/x86_64-apple-darwin-ar
export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_X86_64_APPLE_DARWIN_RANLIB=/builds/worker/cctools/bin/x86_64-apple-darwin-ranlib
export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_X86_64_APPLE_DARWIN_LD_LIBRARY_PATH=/builds/worker/clang/lib
export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_X86_64_APPLE_DARWIN_RUSTFLAGS="-C linker=/builds/worker/clang/bin/clang -C link-arg=-fuse-ld=/builds/worker/cctools/bin/x86_64-apple-darwin-ld -C link-arg=-B -C link-arg=/builds/worker/cctools/bin -C link-arg=-target -C link-arg=x86_64-apple-darwin -C link-arg=-isysroot -C link-arg=/tmp/MacOSX11.0.sdk -C link-arg=-Wl,-syslibroot,/tmp/MacOSX11.0.sdk -C link-arg=-Wl,-dead_strip"
export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_X86_64_APPLE_DARWIN_RUSTFLAGS="-C linker=/builds/worker/clang/bin/clang-18 -C link-arg=-fuse-ld=/builds/worker/cctools/bin/x86_64-apple-darwin-ld -C link-arg=-B -C link-arg=/builds/worker/cctools/bin -C link-arg=-target -C link-arg=x86_64-apple-darwin -C link-arg=-isysroot -C link-arg=/tmp/MacOSX11.0.sdk -C link-arg=-Wl,-syslibroot,/tmp/MacOSX11.0.sdk -C link-arg=-Wl,-dead_strip"
# For ring's use of `cc`.
export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_X86_64_APPLE_DARWIN_CFLAGS_x86_64_apple_darwin="-B /builds/worker/cctools/bin -target x86_64-apple-darwin -isysroot /tmp/MacOSX11.0.sdk -Wl,-syslibroot,/tmp/MacOSX11.0.sdk -Wl,-dead_strip"

Expand All @@ -27,11 +27,12 @@ export TARGET_CFLAGS="-DNDEBUG"
# cribbed from glean https://github.com/mozilla/glean/blob/b5faa56305a3a500e49fc02509001c95fde32ee6/taskcluster/scripts/cross-compile-setup.sh
pushd /builds/worker
curl -sfSL --retry 5 --retry-delay 10 \
https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/gecko.cache.level-3.toolchains.v3.linux64-cctools-port.hash.bec815dd1e64cd75ba803c1f002c646e151c784d804791bffbc23b2ae41f545f/artifacts/public/build/cctools.tar.zst > cctools.tar.zst
tar -I zstd -xf cctools.tar.zst
https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/gecko.cache.level-3.toolchains.v3.linux64-cctools-port.pushdate.2024.07.23.20240723071212/artifacts/public%2Fbuild%2Fcctools.tar.zst > cctools.tar.zst
unzstd cctools.tar.zst
tar -xf cctools.tar
rm cctools.tar.zst
curl -sfSL --retry 5 --retry-delay 10 \
https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/gecko.cache.level-3.toolchains.v3.clang-dist-toolchain.hash.9e5dd392eefd9eb1ef3ff7aa40d2823f60b280cb54d716e0f85f0b50573e0d69/artifacts/public/build/clang-dist-toolchain.tar.xz > clang-dist-toolchain.tar.xz
https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/gecko.cache.level-3.toolchains.v3.clang-dist-toolchain.pushdate.2024.07.30.20240730145721/artifacts/public%2Fbuild%2Fclang-dist-toolchain.tar.xz > clang-dist-toolchain.tar.xz
tar -xf clang-dist-toolchain.tar.xz
mv builds/worker/toolchains/clang clang
rm clang-dist-toolchain.tar.xz
Expand All @@ -50,4 +51,14 @@ tar -I zstd -xf "MacOSX11.0.sdk.tar.zst"

popd || exit

# Verify the permissions of clang symlink and the actual binary
chmod +x builds/worker/toolchains/clang/bin/clang
chmod +x builds/worker/toolchains/clang/bin/clang-18

# Verify paths after extraction and permission changes
echo "Verifying paths after extraction"
ls -la builds/worker/toolchains/clang/bin
file builds/worker/toolchains/clang/bin/clang
file builds/worker/toolchains/clang/bin/clang-18

set +eu

0 comments on commit b206ca1

Please sign in to comment.