aboutsummaryrefslogtreecommitdiff
path: root/android-clang-toolchain
diff options
context:
space:
mode:
authorVishal Bhoj <vishal.bhoj@linaro.org>2016-11-11 15:36:41 +0530
committerFathi Boudra <fathi.boudra@linaro.org>2016-11-14 06:02:08 +0000
commit2dec8691e66d97aa77b286629d3ccad9253bdedd (patch)
treeb235cc738642612c34ffa6c038a2e321ef37595c /android-clang-toolchain
parent6a29f1f1581f8770a972e021a0c20970b457dafb (diff)
downloadconfigs-2dec8691e66d97aa77b286629d3ccad9253bdedd.tar.gz
android: add clang toolchain build
Change-Id: I5b884b507d0e774234827b0c1ba5d4674d2b6a04 Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
Diffstat (limited to 'android-clang-toolchain')
-rwxr-xr-xandroid-clang-toolchain/builders.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/android-clang-toolchain/builders.sh b/android-clang-toolchain/builders.sh
new file mode 100755
index 000000000..5ab9e6eb6
--- /dev/null
+++ b/android-clang-toolchain/builders.sh
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+sudo apt-get -q=2 update
+sudo apt-get -q=2 install -y libxml2-dev zlib1g-dev libtinfo-dev git-svn gawk libxml2-utils rsync pxz
+
+wget -q \
+ http://archive.ubuntu.com/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jre-headless_8u45-b14-1_amd64.deb \
+ http://archive.ubuntu.com/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jre_8u45-b14-1_amd64.deb \
+ http://archive.ubuntu.com/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jdk_8u45-b14-1_amd64.deb \
+ https://cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.sh
+sudo dpkg -i --force-all *.deb
+rm -f *.deb
+
+yes y | bash cmake-3.5.2-Linux-x86_64.sh
+export PATH=${PWD}/cmake-3.5.2-Linux-x86_64/bin/:${PATH}
+
+mkdir -p /home/buildslave/srv/aosp/${JOB_NAME}
+cd /home/buildslave/srv/aosp/${JOB_NAME}
+
+repo init -u https://android-git.linaro.org/git/platform/manifest.git -b clang-build
+repo sync -j16 -c
+cd llvm
+mkdir -p build/clang-4.0.0
+cd build
+cmake -G "Unix Makefiles" ../ \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DLLVM_BUILD_TESTS=True \
+ -DLLVM_ENABLE_ASSERTIONS=True \
+ -DPYTHON_EXECUTABLE=/usr/bin/python2 \
+ -DCMAKE_INSTALL_PREFIX=./clang-4.0.0 \
+ -DLLVM_TARGETS_TO_BUILD="ARM;X86;AArch64" \
+ -DBUILD_SHARED_LIBS=True
+make install -j"$(nproc)"
+
+tar -I pxz -cf clang-4.0.0.tar.xz clang-4.0.0
+
+echo "Build finished"