Bug 1328199 - Part 2: Add a TaskCluster job to build clang-tidy for OSX on Linux; r=dustin
This commit is contained in:
40
taskcluster/scripts/misc/build-clang-tidy-macosx.sh
Executable file
40
taskcluster/scripts/misc/build-clang-tidy-macosx.sh
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
set -x -e -v
|
||||
|
||||
# This script is for building clang for Mac OS X on Linux.
|
||||
|
||||
WORKSPACE=$HOME/workspace
|
||||
HOME_DIR=$WORKSPACE/build
|
||||
UPLOAD_DIR=$WORKSPACE/artifacts
|
||||
|
||||
cd $HOME_DIR/src
|
||||
|
||||
chmod +x taskcluster/docker/recipes/tooltool.py
|
||||
: TOOLTOOL_CACHE ${TOOLTOOL_CACHE:=/home/worker/tooltool-cache}
|
||||
export TOOLTOOL_CACHE
|
||||
|
||||
|
||||
TOOLTOOL_MANIFEST=browser/config/tooltool-manifests/macosx64/cross-clang.manifest
|
||||
./taskcluster/docker/recipes/tooltool.py --url=http://relengapi/tooltool/ -m "${TOOLTOOL_MANIFEST}" fetch
|
||||
|
||||
# ld needs libLTO.so from llvm
|
||||
export LD_LIBRARY_PATH=$HOME_DIR/src/clang/lib
|
||||
# these variables are used in build-clang.py
|
||||
export CROSS_CCTOOLS_PATH=$HOME_DIR/src/cctools
|
||||
export CROSS_SYSROOT=$HOME_DIR/src/MacOSX10.10.sdk
|
||||
export LIBCXX_INCLUDE_PATH=$HOME_DIR/src/clang/include/c++/v1
|
||||
# cmake doesn't allow us to specify a path to lipo on the command line.
|
||||
ln -sf $CROSS_CCTOOLS_PATH/bin/x86_64-apple-darwin10-lipo /usr/bin/lipo
|
||||
|
||||
# gets a bit too verbose here
|
||||
set +x
|
||||
|
||||
cd build/build-clang
|
||||
# |mach python| sets up a virtualenv for us!
|
||||
../../mach python ./build-clang.py -c clang-tidy-macosx64.json
|
||||
|
||||
set -x
|
||||
|
||||
# Put a tarball in the artifacts dir
|
||||
mkdir -p $UPLOAD_DIR
|
||||
cp clang-tidy.tar.* $UPLOAD_DIR
|
||||
Reference in New Issue
Block a user