From 250f0d487090fd9010372792b788e4d7512c06ac Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Thu, 4 Feb 2021 14:36:12 +0000 Subject: [PATCH] Bug 1690757 - Change compiler-rt cmake flags to better share with upcoming new platforms. r=firefox-build-system-reviewers,mhentges - Switch to use llvm-ar and llvm-ranlib - Use CMAKE_*_COMPILER_TARGET for --target - Use CMAKE_OSX_SYSROOT for -isysroot - Limit the compiler wrapper to adding -mcpu=apple-a12 on arm64 - Remove -DLLVM_DEFAULT_TARGET_TRIPLE and add -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON - Group all the flags that are OSX-only Differential Revision: https://phabricator.services.mozilla.com/D104011 --- taskcluster/scripts/misc/build-compiler-rt.sh | 37 ++++++++++--------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/taskcluster/scripts/misc/build-compiler-rt.sh b/taskcluster/scripts/misc/build-compiler-rt.sh index 1b2cb3df35eb..b00b260bfdee 100755 --- a/taskcluster/scripts/misc/build-compiler-rt.sh +++ b/taskcluster/scripts/misc/build-compiler-rt.sh @@ -5,11 +5,19 @@ set -e target=$1 shift +clang=$MOZ_FETCHES_DIR/clang/bin/clang + case "$target" in aarch64-apple-darwin) arch=arm64 sdk=11.0 - extra_flags="-mcpu=apple-a12" + compiler_wrapper() { + echo exec \$MOZ_FETCHES_DIR/clang/bin/$1 -mcpu=apple-a12 \"\$@\" > $1 + chmod +x $1 + } + compiler_wrapper clang + compiler_wrapper clang++ + clang=$PWD/clang ;; x86_64-apple-darwin) arch=x86_64 @@ -30,15 +38,6 @@ fi mkdir compiler-rt cd compiler-rt -compiler_wrapper() { -cat > $1 <