Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Side by Side Diff: tools/clang/scripts/update.sh

Issue 1263213002: Support Android x86 ASan build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« build/common.gypi ('K') | « build/common.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env bash 1 #!/usr/bin/env bash
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # This script will check out llvm and clang into third_party/llvm and build it. 6 # This script will check out llvm and clang into third_party/llvm and build it.
7 7
8 # Do NOT CHANGE this if you don't know what you're doing -- see 8 # Do NOT CHANGE this if you don't know what you're doing -- see
9 # https://code.google.com/p/chromium/wiki/UpdatingClang 9 # https://code.google.com/p/chromium/wiki/UpdatingClang
10 # Reverting problematic clang rolls is safe, though. 10 # Reverting problematic clang rolls is safe, though.
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 -DLLVM_CONFIG_PATH=${PWD}/../bin/llvm-config \ 702 -DLLVM_CONFIG_PATH=${PWD}/../bin/llvm-config \
703 -DCMAKE_C_FLAGS="--target=arm-linux-androideabi --sysroot=${PWD}/../androi d-toolchain/sysroot -B${PWD}/../android-toolchain" \ 703 -DCMAKE_C_FLAGS="--target=arm-linux-androideabi --sysroot=${PWD}/../androi d-toolchain/sysroot -B${PWD}/../android-toolchain" \
704 -DCMAKE_CXX_FLAGS="--target=arm-linux-androideabi --sysroot=${PWD}/../andr oid-toolchain/sysroot -B${PWD}/../android-toolchain" \ 704 -DCMAKE_CXX_FLAGS="--target=arm-linux-androideabi --sysroot=${PWD}/../andr oid-toolchain/sysroot -B${PWD}/../android-toolchain" \
705 -DANDROID=1 \ 705 -DANDROID=1 \
706 "${ABS_COMPILER_RT_DIR}" 706 "${ABS_COMPILER_RT_DIR}"
707 ninja libclang_rt.asan-arm-android.so 707 ninja libclang_rt.asan-arm-android.so
708 708
709 # And copy it into the main build tree. 709 # And copy it into the main build tree.
710 cp "$(find -name libclang_rt.asan-arm-android.so)" "${ABS_LLVM_CLANG_LIB_DIR}/ lib/linux/" 710 cp "$(find -name libclang_rt.asan-arm-android.so)" "${ABS_LLVM_CLANG_LIB_DIR}/ lib/linux/"
711 popd 711 popd
712
713 # Do the same for x86
Nico 2015/07/31 16:56:54 maybe a for loop over desired archs instead of cop
Oliver Chang 2015/07/31 17:46:31 Done.
714 ${ANDROID_NDK_DIR}/build/tools/make-standalone-toolchain.sh \
715 --platform=android-19 \
716 --install-dir="${LLVM_BUILD_DIR}/android-toolchain-x86" \
717 --system=linux-x86_64 \
718 --stl=stlport \
719 --toolchain=x86-4.9
720
721 # Android NDK r9d copies a broken unwind.h into the toolchain, see
722 # http://crbug.com/357890
723 rm -v "${LLVM_BUILD_DIR}"/android-toolchain-x86/include/c++/*/unwind.h
724
725 mkdir -p ${LLVM_BUILD_DIR}/android-x86
726 pushd ${LLVM_BUILD_DIR}/android-x86
727 rm -fv CMakeCache.txt
728 MACOSX_DEPLOYMENT_TARGET=${deployment_target} cmake -GNinja \
729 -DCMAKE_BUILD_TYPE=Release \
730 -DLLVM_ENABLE_ASSERTIONS=ON \
731 -DLLVM_ENABLE_THREADS=OFF \
732 -DCMAKE_C_COMPILER=${PWD}/../bin/clang \
733 -DCMAKE_CXX_COMPILER=${PWD}/../bin/clang++ \
734 -DLLVM_CONFIG_PATH=${PWD}/../bin/llvm-config \
735 -DCMAKE_C_FLAGS="--target=i686-linux-androideabi --sysroot=${PWD}/../andro id-toolchain-x86/sysroot -B${PWD}/../android-toolchain-x86" \
736 -DCMAKE_CXX_FLAGS="--target=i686-linux-androideabi --sysroot=${PWD}/../and roid-toolchain-x86/sysroot -B${PWD}/../android-toolchain-x86" \
737 -DANDROID=1 \
738 "${ABS_COMPILER_RT_DIR}"
739 ninja libclang_rt.asan-i686-android.so
740
741 # And copy it into the main build tree.
742 cp "$(find -name libclang_rt.asan-i686-android.so)" "${ABS_LLVM_CLANG_LIB_DIR} /lib/linux/"
743 popd
712 fi 744 fi
713 745
714 if [[ -n "$run_tests" || -n "${LLVM_FORCE_HEAD_REVISION:-''}" ]]; then 746 if [[ -n "$run_tests" || -n "${LLVM_FORCE_HEAD_REVISION:-''}" ]]; then
715 # Run Chrome tool tests. 747 # Run Chrome tool tests.
716 ninja -C "${LLVM_BUILD_DIR}" cr-check-all 748 ninja -C "${LLVM_BUILD_DIR}" cr-check-all
717 fi 749 fi
718 if [[ -n "$run_tests" ]]; then 750 if [[ -n "$run_tests" ]]; then
719 # Run the LLVM and Clang tests. 751 # Run the LLVM and Clang tests.
720 ninja -C "${LLVM_BUILD_DIR}" check-all 752 ninja -C "${LLVM_BUILD_DIR}" check-all
721 fi 753 fi
722 754
723 # After everything is done, log success for this revision. 755 # After everything is done, log success for this revision.
724 echo "${PACKAGE_VERSION}" > "${STAMP_FILE}" 756 echo "${PACKAGE_VERSION}" > "${STAMP_FILE}"
OLDNEW
« build/common.gypi ('K') | « build/common.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698