mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-09 12:51:09 +02:00
This creates a new toolchain artifact that repacks a combination of the linux64-clang compiler along with parts of the win64-clang-cl compiler. This has multiple advantages: - It removes some convoluted parts of build task definitions (limiting that to only occur on the win-cross toolchain itself). - It simplifies the build setup by not requiring to prepare for where clang-cl.exe is. - It speeds up getting compiler artifacts because the win64-clang-cl artifact is very large (due to there not being a llvm shared library) and bzipped, which is slow to decompress. Here, we only take what we need for the cross builds. - It adds the runtime files that e.g. PGO will require, and that linux clang-cl insists lives in the clang directory, not the win64-clang-cl one, and that would require some convoluted setup to make it work with the two separate toolchains. Differential Revision: https://phabricator.services.mozilla.com/D66543 --HG-- extra : moz-landing-system : lando
18 lines
559 B
Bash
Executable file
18 lines
559 B
Bash
Executable file
#!/bin/bash
|
|
set -x -e -v
|
|
|
|
# This script is to repack a linux clang with Windows clang-cl.exe and compiler runtime.
|
|
|
|
cd $MOZ_FETCHES_DIR
|
|
|
|
# We already have the Linux clang extracted in $MOZ_FETCHES_DIR/clang by fetch-content
|
|
# We have a non-extracted clang.tar.bz2 for Windows clang-cl that we need to extract
|
|
# files from.
|
|
|
|
tar -jxf clang.tar.bz2 --wildcards clang/lib/clang/*/lib/windows clang/bin/clang-cl.exe
|
|
chmod +x clang/bin/clang-cl.exe
|
|
tar -Jcf clang.tar.xz clang
|
|
|
|
# Put a tarball in the artifacts dir
|
|
mkdir -p $UPLOAD_DIR
|
|
cp clang.tar.xz $UPLOAD_DIR
|