4 # This script is for building clang.
7 CONFIGS
=$
(for c
; do echo -n " -c $GECKO_PATH/$c"; done)
11 if [ -d "$MOZ_FETCHES_DIR/binutils/bin" ]; then
12 export PATH
="$MOZ_FETCHES_DIR/binutils/bin:$PATH"
15 # Make the installed compiler-rt(s) available to clang.
16 UPLOAD_DIR
= taskcluster
/scripts
/misc
/repack-clang.sh
20 # cmake makes decisions based on the output of the mac-only sw_vers, which is
21 # obviously missing when cross-compiling, so create a fake one. The exact
22 # version doesn't really matter: as of writing, cmake checks at most for 10.5.
24 echo "#!/bin/sh" > $ORIGPWD/bin
/sw_vers
25 echo echo 10.12 >> $ORIGPWD/bin
/sw_vers
26 chmod +x
$ORIGPWD/bin
/sw_vers
27 # these variables are used in build-clang.py
28 export CROSS_SYSROOT
=$
(ls -d $MOZ_FETCHES_DIR/MacOSX1
*.sdk
)
29 export PATH
=$PATH:$ORIGPWD/bin
34 export UPLOAD_DIR
=$ORIGPWD/public
/build
35 # Set up all the Visual Studio paths.
36 . taskcluster
/scripts
/misc
/vs-setup.sh
38 # LLVM_ENABLE_DIA_SDK is set if the directory "$ENV{VSINSTALLDIR}DIA SDK"
40 export VSINSTALLDIR
="${VSPATH}/"
42 export PATH
="$(cd $MOZ_FETCHES_DIR/cmake && pwd)/bin:${PATH}"
43 export PATH
="$(cd $MOZ_FETCHES_DIR/ninja && pwd)/bin:${PATH}"
46 export VSINSTALLDIR
="$MOZ_FETCHES_DIR/vs"
53 echo Cannot figure out build configuration
for $CONFIGS
58 # gets a bit too verbose here
61 cd $MOZ_FETCHES_DIR/llvm-project
62 python3
$GECKO_PATH/build
/build-clang
/build-clang.py
$CONFIGS
66 if [ -f clang
*.
tar.zst
]; then
67 # Put a tarball in the artifacts dir
69 cp clang
*.
tar.zst
$UPLOAD_DIR
72 .
$GECKO_PATH/taskcluster
/scripts
/misc
/vs-cleanup.sh