[tbb-commits] [builders/tor-browser-build] 06/08: Bug 40433: Bumped LLVM to 13.0.1 for android builds
gitolite role
git at cupani.torproject.org
Fri Apr 22 13:41:15 UTC 2022
This is an automated email from the git hooks/post-receive script.
boklm pushed a commit to branch master
in repository builders/tor-browser-build.
commit b74ca3addf6719cc8f8170396a8f09f99ae82948
Author: Pier Angelo Vendrame <pierov at torproject.org>
AuthorDate: Thu Apr 21 11:29:23 2022 +0200
Bug 40433: Bumped LLVM to 13.0.1 for android builds
---
projects/clang/build | 38 ++++++++++++++++++++++++++++++++++++++
projects/clang/config | 2 +-
2 files changed, 39 insertions(+), 1 deletion(-)
diff --git a/projects/clang/build b/projects/clang/build
index 33c89d5..d913c6d 100644
--- a/projects/clang/build
+++ b/projects/clang/build
@@ -12,6 +12,9 @@ export PATH="/var/tmp/dist/cmake/bin:$PATH"
ln -s gcc /var/tmp/dist/gcc/bin/cc
[% pc('python', 'var/setup', { python_tarfile => c('input_files_by_name/python') }) %]
[% END -%]
+[% IF c("var/android") %]
+ [% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]
+[% END -%]
[% IF c("var/linux") || c("var/android") -%]
tar -C /var/tmp/dist -xf [% c('input_files_by_name/binutils') %]
export PATH="/var/tmp/dist/binutils/bin:$PATH"
@@ -32,6 +35,41 @@ cmake ../llvm -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=$distdir \
-DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;compiler-rt;libcxx;libcxxabi;lld"
make -j[% c("buildconf/num_procs") %]
make install
+
+[% IF c("var/android") -%]
+ rtdistdir=/var/tmp/build/rtdist
+ mkdir $rtdistdir
+
+ make_compilerrt () {
+ cd ..
+ mkdir "build-compilerrt-$1"
+ cd "build-compilerrt-$1"
+ cmake ../compiler-rt/ -G "Unix Makefiles" \
+ -DCMAKE_INSTALL_PREFIX=$rtdistdir \
+ -DCMAKE_SYSTEM_NAME=Android \
+ -DCMAKE_ANDROID_ARCH_ABI=$1 \
+ -DCMAKE_ANDROID_NDK="/var/tmp/dist/android-toolchain/android-sdk-linux/ndk/android-ndk-r21d" \
+ -DCMAKE_C_FLAGS="$3 -fuse-ld=lld --rtlib=compiler-rt" \
+ -DCMAKE_CXX_FLAGS="$3 -fuse-ld=lld --rtlib=compiler-rt" \
+ -DCMAKE_EXE_LINKER_FLAGS="-L/var/tmp/dist/android-toolchain/android-sdk-linux/ndk/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/$2" \
+ -DCOMPILER_RT_BUILD_BUILTINS=ON \
+ -DCOMPILER_RT_BUILD_LIBFUZZER=OFF \
+ -DCOMPILER_RT_BUILD_MEMPROF=OFF \
+ -DCOMPILER_RT_BUILD_PROFILE=OFF \
+ -DCOMPILER_RT_BUILD_SANITIZERS=OFF \
+ -DCOMPILER_RT_BUILD_XRAY=OFF
+ make -j[% c("buildconf/num_procs") %]
+ make install
+ }
+
+ make_compilerrt "armeabi-v7a" "arm-linux-androideabi/lib" "-DARMEABI_V7A"
+ make_compilerrt "arm64-v8a" "aarch64-linux-android/lib64"
+ make_compilerrt "x86" "i686-linux-android/lib"
+ make_compilerrt "x86_64" "x86_64-linux-android/lib64"
+
+ mv $rtdistdir/lib/android/*.a $distdir/lib/clang/[% c("var/llvm_version") %]/lib/linux/
+[% END -%]
+
cd /var/tmp/dist
[% c('tar', {
tar_src => [ project ],
diff --git a/projects/clang/config b/projects/clang/config
index aeefc7a..0524420 100644
--- a/projects/clang/config
+++ b/projects/clang/config
@@ -11,7 +11,7 @@ input_files:
- project: container-image
- name: '[% c("var/compiler") %]'
project: '[% c("var/compiler") %]'
- enable: '[% c("var/linux") %]'
+ enable: '[% c("var/linux") || c("var/android") %]'
- name: binutils
project: binutils
enable: '[% c("var/linux") || c("var/android") %]'
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the tbb-commits
mailing list