summaryrefslogtreecommitdiff
path: root/build_profile_rt.sh
blob: 0d823163b3befd5ef8854571634ea53eef3a55f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash -e

export SKIP_LLVM_TESTS=true

build_profile_rt() {
  echo Building for target $1
  cd $ANDROID_BUILD_TOP
  source build/envsetup.sh
  lunch $1

  # Build only compiler-rt to get the runtime libraries
  echo Building compiler-rt for target $1
  cd $ANDROID_BUILD_TOP/external/compiler-rt && mma -j$NUM_CORES || exit 1
}

# Only build the host tools once
cd $ANDROID_BUILD_TOP
source build/envsetup.sh
lunch aosp_arm64-userdebug
# Build only llvm, clang and compiler-rt
cd $ANDROID_BUILD_TOP/external/llvm && mma -j$NUM_CORES || exit 1
cd $ANDROID_BUILD_TOP/external/clang && mma -j$NUM_CORES || exit 1
cd $ANDROID_BUILD_TOP/external/compiler-rt && mma -j$NUM_CORES || exit 1

# Skip arm64, since we used that for our host tool build
# build_profile_rt aosp_arm64-userdebug
build_profile_rt aosp_arm-userdebug
build_profile_rt aosp_mips-userdebug
build_profile_rt aosp_mips64-userdebug
build_profile_rt aosp_x86-userdebug
build_profile_rt aosp_x86_64-userdebug