mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Backed out 6 changesets (bug 1685599) for WR bustages. CLOSED TREE
Backed out changeset 29eab2f84c77 (bug 1685599) Backed out changeset 2839d8d39881 (bug 1685599) Backed out changeset 3ba2f1c048c3 (bug 1685599) Backed out changeset c7d4ecfc689a (bug 1685599) Backed out changeset 5483ce4f5f4c (bug 1685599) Backed out changeset 68fa5ecf205c (bug 1685599)
This commit is contained in:
parent
6d618366d7
commit
891da67475
@ -3,7 +3,7 @@ ac_add_options --enable-debug
|
||||
. $topsrcdir/build/mozconfig.wasm-sandboxing
|
||||
. $topsrcdir/build/unix/mozconfig.linux
|
||||
|
||||
export LLVM_SYMBOLIZER="$MOZ_FETCHES_DIR/llvm-symbolizer/llvm-symbolizer"
|
||||
export LLVM_SYMBOLIZER="$MOZ_FETCHES_DIR/clang/bin/llvm-symbolizer"
|
||||
|
||||
# Package js shell.
|
||||
export MOZ_PACKAGE_JSSHELL=1
|
||||
|
24
build/build-clang/clang-macosx64.json
Normal file
24
build/build-clang/clang-macosx64.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"stages": "1",
|
||||
"build_libcxx": true,
|
||||
"build_type": "Release",
|
||||
"assertions": false,
|
||||
"osx_cross_compile": true,
|
||||
"python_path": "/usr/bin/python2.7",
|
||||
"gcc_dir": "{MOZ_FETCHES_DIR}/gcc",
|
||||
"cc": "{MOZ_FETCHES_DIR}/clang/bin/clang",
|
||||
"cxx": "{MOZ_FETCHES_DIR}/clang/bin/clang++",
|
||||
"as": "{MOZ_FETCHES_DIR}/clang/bin/clang",
|
||||
"ar": "{MOZ_FETCHES_DIR}/cctools/bin/x86_64-apple-darwin-ar",
|
||||
"ranlib": "{MOZ_FETCHES_DIR}/cctools/bin/x86_64-apple-darwin-ranlib",
|
||||
"libtool": "{MOZ_FETCHES_DIR}/cctools/bin/x86_64-apple-darwin-libtool",
|
||||
"ld": "{MOZ_FETCHES_DIR}/clang/bin/clang",
|
||||
"patches": [
|
||||
"static-llvm-symbolizer.patch",
|
||||
"rename_gcov_flush.patch",
|
||||
"critical_section_on_gcov_flush-rG02ce9d8ef5a8.patch",
|
||||
"rG7e18aeba5062.patch",
|
||||
"compiler-rt-cross-compile.patch",
|
||||
"compiler-rt-no-codesign.patch"
|
||||
]
|
||||
}
|
@ -52,7 +52,7 @@ if CONFIG["MOZ_ASAN"] and CONFIG["CC_TYPE"] == "clang-cl":
|
||||
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android" and CONFIG["MOZ_ASAN"]:
|
||||
FINAL_TARGET_FILES += ["%" + CONFIG["MOZ_CLANG_RT_ASAN_LIB_PATH"]]
|
||||
|
||||
if CONFIG["MOZ_WIDGET_TOOLKIT"] != "android" and CONFIG["LLVM_SYMBOLIZER"]:
|
||||
if CONFIG["LLVM_SYMBOLIZER"]:
|
||||
FINAL_TARGET_FILES += ["/" + CONFIG["LLVM_SYMBOLIZER"]]
|
||||
|
||||
if CONFIG["MOZ_APP_BASENAME"]:
|
||||
|
@ -1,6 +1,6 @@
|
||||
. "$topsrcdir/build/unix/mozconfig.unix"
|
||||
|
||||
export LLVM_SYMBOLIZER="$MOZ_FETCHES_DIR/llvm-symbolizer/llvm-symbolizer"
|
||||
export LLVM_SYMBOLIZER="$MOZ_FETCHES_DIR/clang/bin/llvm-symbolizer"
|
||||
#
|
||||
# Enable ASan specific code and build workarounds
|
||||
ac_add_options --enable-address-sanitizer
|
||||
|
@ -1,6 +1,6 @@
|
||||
. "$topsrcdir/build/unix/mozconfig.unix"
|
||||
|
||||
export LLVM_SYMBOLIZER="$MOZ_FETCHES_DIR/llvm-symbolizer/llvm-symbolizer"
|
||||
export LLVM_SYMBOLIZER="$MOZ_FETCHES_DIR/clang/bin/llvm-symbolizer"
|
||||
|
||||
# Enable TSan specific code and build workarounds
|
||||
ac_add_options --enable-thread-sanitizer
|
||||
|
@ -7,7 +7,7 @@ if [ -d "$MOZ_FETCHES_DIR/clang" ]; then
|
||||
export LDFLAGS="clang_rt.asan_dynamic-x86_64.lib clang_rt.asan_dynamic_runtime_thunk-x86_64.lib"
|
||||
|
||||
export MOZ_COPY_PDBS=1
|
||||
export LLVM_SYMBOLIZER="$MOZ_FETCHES_DIR/llvm-symbolizer/llvm-symbolizer.exe"
|
||||
export LLVM_SYMBOLIZER="$MOZ_FETCHES_DIR/clang/bin/llvm-symbolizer.exe"
|
||||
export MOZ_CLANG_RT_ASAN_LIB_PATH="${CLANG_LIB_DIR}/clang_rt.asan_dynamic-x86_64.dll"
|
||||
fi
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
"debug": false,
|
||||
"compiler": "clang",
|
||||
"env": {
|
||||
"LLVM_SYMBOLIZER": "{MOZ_FETCHES_DIR}/llvm-symbolizer/llvm-symbolizer"
|
||||
"LLVM_SYMBOLIZER": "{MOZ_FETCHES_DIR}/clang/bin/llvm-symbolizer"
|
||||
},
|
||||
"use_minidump": false
|
||||
}
|
||||
|
@ -6,8 +6,8 @@
|
||||
"env": {
|
||||
"JITTEST_EXTRA_ARGS": "--jitflags=none",
|
||||
"JSTESTS_EXTRA_ARGS": "--jitflags=none",
|
||||
"LLVM_SYMBOLIZER": "{MOZ_FETCHES_DIR}/llvm-symbolizer/llvm-symbolizer",
|
||||
"ASAN_SYMBOLIZER_PATH": "{MOZ_FETCHES_DIR}/llvm-symbolizer/llvm-symbolizer"
|
||||
"LLVM_SYMBOLIZER": "{MOZ_FETCHES_DIR}/clang/bin/llvm-symbolizer",
|
||||
"ASAN_SYMBOLIZER_PATH": "{MOZ_FETCHES_DIR}/clang/bin/llvm-symbolizer"
|
||||
},
|
||||
"use_minidump": false
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
"debug": false,
|
||||
"compiler": "clang",
|
||||
"env": {
|
||||
"LLVM_SYMBOLIZER": "{MOZ_FETCHES_DIR}/llvm-symbolizer/llvm-symbolizer",
|
||||
"LLVM_SYMBOLIZER": "{MOZ_FETCHES_DIR}/clang/bin/llvm-symbolizer",
|
||||
"JITTEST_EXTRA_ARGS": "--jitflags=tsan --ignore-timeouts={DIR}/cgc-jittest-timeouts.txt --unusable-error-status --exclude-from={DIR}/tsan-slow.txt",
|
||||
"JSTESTS_EXTRA_ARGS": "--exclude-file={DIR}/cgc-jstests-slow.txt"
|
||||
},
|
||||
|
@ -120,7 +120,6 @@ linux64-fuzzing/debug:
|
||||
- linux64-clang
|
||||
- linux64-cbindgen
|
||||
- linux64-dump-syms
|
||||
- linux64-llvm-symbolizer
|
||||
- linux64-sccache
|
||||
- linux64-rust
|
||||
- linux64-rust-size
|
||||
@ -683,7 +682,6 @@ linux64-asan/opt:
|
||||
- linux64-rust-size
|
||||
- linux64-cbindgen
|
||||
- linux64-dump-syms
|
||||
- linux64-llvm-symbolizer
|
||||
- linux64-sccache
|
||||
- linux64-nasm
|
||||
- linux64-node
|
||||
@ -725,7 +723,6 @@ linux64-tsan/opt:
|
||||
- linux64-rust-size
|
||||
- linux64-cbindgen
|
||||
- linux64-dump-syms
|
||||
- linux64-llvm-symbolizer
|
||||
- linux64-sccache
|
||||
- linux64-nasm
|
||||
- linux64-node
|
||||
@ -770,7 +767,6 @@ linux64-tsan-fuzzing/opt:
|
||||
- linux64-rust-size
|
||||
- linux64-cbindgen
|
||||
- linux64-dump-syms
|
||||
- linux64-llvm-symbolizer
|
||||
- linux64-sccache
|
||||
- linux64-nasm
|
||||
- linux64-node
|
||||
@ -818,7 +814,6 @@ linux64-asan-fuzzing/opt:
|
||||
- linux64-rust-size
|
||||
- linux64-cbindgen
|
||||
- linux64-dump-syms
|
||||
- linux64-llvm-symbolizer
|
||||
- linux64-sccache
|
||||
- linux64-nasm
|
||||
- linux64-node
|
||||
@ -866,7 +861,6 @@ linux64-asan-fuzzing-ccov/opt:
|
||||
- linux64-rust-size
|
||||
- linux64-cbindgen
|
||||
- linux64-dump-syms
|
||||
- linux64-llvm-symbolizer
|
||||
- linux64-sccache
|
||||
- linux64-nasm
|
||||
- linux64-node
|
||||
@ -968,7 +962,6 @@ linux64-asan-reporter-shippable/opt:
|
||||
- linux64-rust-size
|
||||
- linux64-cbindgen
|
||||
- linux64-dump-syms
|
||||
- linux64-llvm-symbolizer
|
||||
- linux64-nasm
|
||||
- linux64-node
|
||||
- linux64-lucetc
|
||||
@ -1009,7 +1002,6 @@ linux64-asan/debug:
|
||||
- linux64-rust-size
|
||||
- linux64-cbindgen
|
||||
- linux64-dump-syms
|
||||
- linux64-llvm-symbolizer
|
||||
- linux64-sccache
|
||||
- linux64-nasm
|
||||
- linux64-node
|
||||
|
@ -109,7 +109,6 @@ macosx64-asan-fuzzing/opt:
|
||||
- linux64-cctools-port
|
||||
- linux64-clang-macosx-cross
|
||||
- linux64-sccache
|
||||
- macosx64-llvm-symbolizer
|
||||
- wasi-sysroot
|
||||
optimization:
|
||||
skip-unless-expanded: null
|
||||
@ -213,7 +212,7 @@ macosx64-aarch64-devedition/opt:
|
||||
fetches:
|
||||
toolchain:
|
||||
- linux64-cctools-port
|
||||
- linux64-clang-macosx-cross
|
||||
- linux64-clang-macosx-aarch64-cross
|
||||
- macosx64-sdk-11.0
|
||||
|
||||
macosx64-devedition/opt:
|
||||
@ -469,7 +468,7 @@ macosx64-aarch64-shippable/opt:
|
||||
fetches:
|
||||
toolchain:
|
||||
- linux64-cctools-port
|
||||
- linux64-clang-macosx-cross
|
||||
- linux64-clang-macosx-aarch64-cross
|
||||
- macosx64-sdk-11.0
|
||||
|
||||
macosx64-shippable/opt:
|
||||
|
@ -941,7 +941,6 @@ win64-asan/debug:
|
||||
- linux64-wine
|
||||
- linux64-liblowercase
|
||||
- linux64-winchecksec
|
||||
- win64-llvm-symbolizer
|
||||
fetch:
|
||||
- nsis-3.01-win
|
||||
- upx-3.95-win
|
||||
@ -995,7 +994,6 @@ win64-asan/opt:
|
||||
- linux64-wine
|
||||
- linux64-liblowercase
|
||||
- linux64-winchecksec
|
||||
- win64-llvm-symbolizer
|
||||
fetch:
|
||||
- nsis-3.01-win
|
||||
- upx-3.95-win
|
||||
@ -1058,7 +1056,6 @@ win64-asan-reporter-shippable/opt:
|
||||
- linux64-wine
|
||||
- linux64-liblowercase
|
||||
- linux64-winchecksec
|
||||
- win64-llvm-symbolizer
|
||||
fetch:
|
||||
- nsis-3.01-win
|
||||
- upx-3.95-win
|
||||
@ -1108,7 +1105,6 @@ win64-asan-fuzzing/opt:
|
||||
- linux64-wine
|
||||
- linux64-liblowercase
|
||||
- linux64-winchecksec
|
||||
- win64-llvm-symbolizer
|
||||
fetch:
|
||||
- nsis-3.01-win
|
||||
- upx-3.95-win
|
||||
|
@ -172,13 +172,6 @@ sm-asan-linux64/opt:
|
||||
MOZ_AUTOMATION_UPLOAD: "1"
|
||||
run:
|
||||
spidermonkey-variant: asan
|
||||
fetches:
|
||||
toolchain:
|
||||
- linux64-clang
|
||||
- linux64-gcc
|
||||
- linux64-rust
|
||||
- linux64-dump-syms
|
||||
- linux64-llvm-symbolizer
|
||||
|
||||
sm-compacting-linux64/debug:
|
||||
description: "Spidermonkey Compacting"
|
||||
@ -224,7 +217,6 @@ sm-tsan-linux64/opt:
|
||||
- linux64-clang
|
||||
- linux64-rust-nightly
|
||||
- linux64-dump-syms
|
||||
- linux64-llvm-symbolizer
|
||||
|
||||
sm-rootanalysis-linux64/debug:
|
||||
description: "Spidermonkey Root Analysis"
|
||||
@ -265,13 +257,6 @@ sm-fuzzing-linux64/opt:
|
||||
MOZ_AUTOMATION_UPLOAD: "1"
|
||||
run:
|
||||
spidermonkey-variant: fuzzing
|
||||
fetches:
|
||||
toolchain:
|
||||
- linux64-clang
|
||||
- linux64-gcc
|
||||
- linux64-rust
|
||||
- linux64-dump-syms
|
||||
- linux64-llvm-symbolizer
|
||||
|
||||
sm-gdb-linux64/debug:
|
||||
description: "Spidermonkey GDB Pretty-printers"
|
||||
|
@ -120,6 +120,26 @@ linux64-clang-11-mingw-x64:
|
||||
- linux64-gcc-7
|
||||
- linux64-binutils
|
||||
|
||||
linux64-clang-9-macosx-cross:
|
||||
description: "Clang 9 toolchain repack with MacOS Compiler RT libs"
|
||||
treeherder:
|
||||
symbol: TL(clang9-macosx-cross)
|
||||
worker-type: b-linux
|
||||
worker:
|
||||
max-run-time: 600
|
||||
run:
|
||||
script: repack-clang-linux-macosx-cross.sh
|
||||
toolchain-artifact: public/build/clang.tar.zst
|
||||
dependencies:
|
||||
macosx64-clang-9: toolchain-macosx64-clang-9
|
||||
fetches:
|
||||
toolchain:
|
||||
- linux64-clang-9
|
||||
macosx64-clang-9:
|
||||
# Put this into a new directory so it doesn't conflict with the linux toolchain
|
||||
- artifact: clang.tar.zst
|
||||
dest: clang-mac
|
||||
|
||||
linux64-clang-10:
|
||||
description: "Clang 10 toolchain build"
|
||||
treeherder:
|
||||
@ -140,6 +160,38 @@ linux64-clang-10:
|
||||
- linux64-gcc-7
|
||||
- wasi-sysroot
|
||||
|
||||
macosx64-clang-9:
|
||||
description: "Clang 9 toolchain build"
|
||||
attributes:
|
||||
local-toolchain: true
|
||||
treeherder:
|
||||
symbol: TM(clang-9)
|
||||
worker-type: b-linux-large
|
||||
worker:
|
||||
max-run-time: 3600
|
||||
env:
|
||||
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/macosx64/cross-releng.manifest"
|
||||
run-on-projects:
|
||||
- trunk
|
||||
run:
|
||||
script: build-clang.sh
|
||||
tooltool-downloads: internal
|
||||
arguments:
|
||||
- 'build/build-clang/clang-macosx64.json'
|
||||
resources:
|
||||
- 'build/build-clang/clang-macosx64.json'
|
||||
- 'taskcluster/scripts/misc/tooltool-download.sh'
|
||||
toolchain-artifact: public/build/clang.tar.zst
|
||||
fetches:
|
||||
fetch:
|
||||
- clang-9
|
||||
toolchain:
|
||||
- linux64-binutils
|
||||
- linux64-cctools-port-clang-9
|
||||
- linux64-clang-9
|
||||
- linux64-gcc-7
|
||||
- linux64-node
|
||||
|
||||
linux64-clang-11:
|
||||
description: "Clang 11 toolchain build"
|
||||
attributes:
|
||||
@ -221,18 +273,30 @@ linux64-clang-11-macosx-cross:
|
||||
toolchain-alias: linux64-clang-macosx-cross
|
||||
toolchain-artifact: public/build/clang.tar.zst
|
||||
dependencies:
|
||||
macosx64-aarch64-compiler-rt-11: toolchain-macosx64-aarch64-compiler-rt-11
|
||||
macosx64-x64-compiler-rt-11: toolchain-macosx64-x64-compiler-rt-11
|
||||
macosx64-clang-11: toolchain-macosx64-clang-11
|
||||
fetches:
|
||||
toolchain:
|
||||
- linux64-cctools-port-clang-11
|
||||
- linux64-clang-11
|
||||
macosx64-aarch64-compiler-rt-11:
|
||||
- artifact: compiler-rt.tar.zst
|
||||
dest: aarch64
|
||||
macosx64-x64-compiler-rt-11:
|
||||
- artifact: compiler-rt.tar.zst
|
||||
dest: x86_64
|
||||
macosx64-clang-11:
|
||||
# Put this into a new directory so it doesn't conflict with the linux toolchain
|
||||
- artifact: clang.tar.zst
|
||||
dest: clang-mac
|
||||
|
||||
linux64-clang-11-macosx-aarch64-cross:
|
||||
description: "Clang 11 toolchain repack with MacOS aarch64 Compiler RT libs"
|
||||
treeherder:
|
||||
symbol: TL(clang11-macosx-aarch64)
|
||||
worker-type: b-linux
|
||||
worker:
|
||||
max-run-time: 600
|
||||
run:
|
||||
script: repack-clang-linux-macosx-aarch64-cross.sh
|
||||
toolchain-alias: linux64-clang-macosx-aarch64-cross
|
||||
toolchain-artifact: public/build/clang.tar.zst
|
||||
fetches:
|
||||
toolchain:
|
||||
- linux64-clang-11
|
||||
- macosx64-aarch64-compiler-rt-11
|
||||
|
||||
linux64-clang-11-win-cross:
|
||||
description: "Clang 11 toolchain repack with Windows Compiler RT libs"
|
||||
@ -283,9 +347,14 @@ macosx64-clang-11:
|
||||
fetch:
|
||||
- clang-11
|
||||
toolchain:
|
||||
# Note: clang-9 below is not a typo. Indirectly due to SDK changes,
|
||||
# we need to build with a linux64-...-macosx-cross toolchain rather
|
||||
# than a simple linux64-clang. linux64-clang-11-macosx-cross is
|
||||
# not an option because it would create a circular dependency on
|
||||
# this toolchain. So we have to start from something older.
|
||||
- linux64-binutils
|
||||
- linux64-cctools-port-clang-11
|
||||
- linux64-clang-11-macosx-cross
|
||||
- linux64-cctools-port-clang-9
|
||||
- linux64-clang-9-macosx-cross
|
||||
- linux64-gcc-7
|
||||
- linux64-node
|
||||
|
||||
|
@ -34,7 +34,6 @@ jobs-from:
|
||||
- geckodriver.yml
|
||||
- gn.yml
|
||||
- grcov.yml
|
||||
- llvm-symbolizer.yml
|
||||
- mingw.yml
|
||||
- minidump_stackwalk.yml
|
||||
- misc.yml
|
||||
|
@ -1,35 +0,0 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
---
|
||||
job-defaults:
|
||||
worker-type: b-linux
|
||||
worker:
|
||||
max-run-time: 1800
|
||||
run:
|
||||
script: repack-llvm-symbolizer.sh
|
||||
toolchain-artifact: public/build/llvm-symbolizer.tar.zst
|
||||
|
||||
linux64-llvm-symbolizer:
|
||||
description: "llvm-symbolizer for Linux"
|
||||
treeherder:
|
||||
symbol: TL(llvm-symbolizer)
|
||||
fetches:
|
||||
toolchain:
|
||||
- linux64-clang
|
||||
|
||||
macosx64-llvm-symbolizer:
|
||||
description: "llvm-symbolizer for Linux"
|
||||
treeherder:
|
||||
symbol: TM(llvm-symbolizer)
|
||||
fetches:
|
||||
toolchain:
|
||||
- macosx64-clang
|
||||
|
||||
win64-llvm-symbolizer:
|
||||
description: "llvm-symbolizer for Linux"
|
||||
treeherder:
|
||||
symbol: TW64(llvm-symbolizer)
|
||||
fetches:
|
||||
toolchain:
|
||||
- win64-clang-cl
|
@ -359,27 +359,6 @@ macosx64-sdk-11.0:
|
||||
# Expiry similar to that of fetches
|
||||
expires-after: 1000 years
|
||||
|
||||
macosx64-x64-compiler-rt-11:
|
||||
description: "macOS x64 Compiler-rt for Clang 11 toolchain build"
|
||||
treeherder:
|
||||
symbol: TM(x64-crt)
|
||||
worker:
|
||||
env:
|
||||
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/macosx64/cross-releng.manifest"
|
||||
run:
|
||||
using: toolchain-script
|
||||
script: build-compiler-rt.sh
|
||||
arguments:
|
||||
- x86_64-apple-darwin
|
||||
toolchain-artifact: public/build/compiler-rt.tar.zst
|
||||
tooltool-downloads: internal
|
||||
fetches:
|
||||
fetch:
|
||||
- clang-11
|
||||
toolchain:
|
||||
- linux64-cctools-port-clang-11
|
||||
- linux64-clang-11
|
||||
|
||||
macosx64-aarch64-compiler-rt-11:
|
||||
description: "macOS aarch64 Compiler-rt for Clang 11 toolchain build"
|
||||
treeherder:
|
||||
@ -395,5 +374,5 @@ macosx64-aarch64-compiler-rt-11:
|
||||
- clang-11
|
||||
toolchain:
|
||||
- linux64-cctools-port-clang-11
|
||||
- linux64-clang-11
|
||||
- linux64-clang-11-macosx-cross
|
||||
- macosx64-sdk-11.0
|
||||
|
@ -2,36 +2,16 @@
|
||||
|
||||
set -e
|
||||
|
||||
target=$1
|
||||
|
||||
case "$target" in
|
||||
aarch64-apple-darwin)
|
||||
arch=arm64
|
||||
sdk=11.0
|
||||
extra_flags="-mcpu=apple-a12"
|
||||
;;
|
||||
x86_64-apple-darwin)
|
||||
arch=x86_64
|
||||
sdk=10.12
|
||||
;;
|
||||
*)
|
||||
echo $target is not supported yet
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
[ "$1" != "aarch64-apple-darwin" ] && echo $1 is not supported yet && exit 1
|
||||
|
||||
export PATH="$MOZ_FETCHES_DIR/cctools/bin:$PATH"
|
||||
|
||||
if [ -n "$TOOLTOOL_MANIFEST" ]; then
|
||||
. $GECKO_PATH/taskcluster/scripts/misc/tooltool-download.sh
|
||||
fi
|
||||
|
||||
mkdir compiler-rt
|
||||
cd compiler-rt
|
||||
|
||||
compiler_wrapper() {
|
||||
cat > $1 <<EOF
|
||||
exec \$MOZ_FETCHES_DIR/clang/bin/$1 -target $target $extra_flags -isysroot \$MOZ_FETCHES_DIR/MacOSX$sdk.sdk "\$@"
|
||||
exec \$MOZ_FETCHES_DIR/clang/bin/$1 -target aarch64-apple-darwin -mcpu=apple-a12 -isysroot \$MOZ_FETCHES_DIR/MacOSX11.0.sdk "\$@"
|
||||
EOF
|
||||
chmod +x $1
|
||||
}
|
||||
@ -43,20 +23,20 @@ cmake \
|
||||
-GNinja \
|
||||
-DCMAKE_C_COMPILER=$PWD/clang \
|
||||
-DCMAKE_CXX_COMPILER=$PWD/clang++ \
|
||||
-DCMAKE_LINKER=$MOZ_FETCHES_DIR/cctools/bin/$target-ld \
|
||||
-DCMAKE_LINKER=$MOZ_FETCHES_DIR/cctools/bin/aarch64-apple-darwin-ld \
|
||||
-DCMAKE_LIPO=$MOZ_FETCHES_DIR/cctools/bin/lipo \
|
||||
-DCMAKE_AR=$MOZ_FETCHES_DIR/cctools/bin/$target-ar \
|
||||
-DCMAKE_RANLIB=$MOZ_FETCHES_DIR/cctools/bin/$target-ranlib \
|
||||
-DCMAKE_AR=$MOZ_FETCHES_DIR/cctools/bin/aarch64-apple-darwin-ar \
|
||||
-DCMAKE_RANLIB=$MOZ_FETCHES_DIR/cctools/bin/aarch64-apple-darwin-ranlib \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DLLVM_ENABLE_ASSERTIONS=OFF \
|
||||
-DLLVM_CONFIG_PATH=$MOZ_FETCHES_DIR/clang/bin/llvm-config \
|
||||
-DCMAKE_SYSTEM_NAME=Darwin \
|
||||
-DCMAKE_SYSTEM_VERSION=$sdk \
|
||||
-DDARWIN_osx_ARCHS=$arch \
|
||||
-DDARWIN_osx_SYSROOT=$MOZ_FETCHES_DIR/MacOSX$sdk.sdk \
|
||||
-DLLVM_DEFAULT_TARGET_TRIPLE=$target \
|
||||
-DDARWIN_macosx_OVERRIDE_SDK_VERSION=$sdk \
|
||||
-DDARWIN_osx_BUILTIN_ARCHS=$arch
|
||||
-DCMAKE_SYSTEM_VERSION=11.0 \
|
||||
-DDARWIN_osx_ARCHS=arm64 \
|
||||
-DDARWIN_osx_SYSROOT=$MOZ_FETCHES_DIR/MacOSX11.0.sdk \
|
||||
-DLLVM_DEFAULT_TARGET_TRIPLE=aarch64-apple-darwin \
|
||||
-DDARWIN_macosx_OVERRIDE_SDK_VERSION=11.0 \
|
||||
-DDARWIN_osx_BUILTIN_ARCHS=arm64
|
||||
|
||||
# compiler-rt build script expects to find `codesign` in $PATH.
|
||||
# Give it a fake one.
|
||||
|
16
taskcluster/scripts/misc/repack-clang-linux-macosx-aarch64-cross.sh
Executable file
16
taskcluster/scripts/misc/repack-clang-linux-macosx-aarch64-cross.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
set -x -e -v
|
||||
|
||||
# This script is for building clang for macos targets on a Linux host,
|
||||
# including native aarch64 macos Compiler-RT libraries.
|
||||
|
||||
cd $MOZ_FETCHES_DIR
|
||||
|
||||
# We have a native linux64 toolchain in $MOZ_FETCHES_DIR/clang
|
||||
# We have a native aarch64 macos compiler-rt in $MOZ_FETCHES_DIR/compiler-rt
|
||||
cp -r compiler-rt/lib/darwin clang/lib/clang/*/lib
|
||||
|
||||
tar -cf - clang | python3 $GECKO_PATH/taskcluster/scripts/misc/zstdpy > clang.tar.zst
|
||||
|
||||
mkdir -p $UPLOAD_DIR
|
||||
mv clang.tar.zst $UPLOAD_DIR
|
@ -1,30 +1,18 @@
|
||||
#!/bin/bash
|
||||
set -x -e -v
|
||||
|
||||
# This script is for building clang for macOS targets on a Linux host,
|
||||
# including native macOS Compiler-RT libraries.
|
||||
# This script is for building clang for Mac OS X targets on a Linux host,
|
||||
# including native Mac OS X Compiler-RT libraries and llvm-symbolizer.
|
||||
|
||||
mkdir -p $UPLOAD_DIR
|
||||
cd $MOZ_FETCHES_DIR
|
||||
|
||||
# We have a native linux64 toolchain in $MOZ_FETCHES_DIR/clang
|
||||
# We have a native aarch64 macos compiler-rt in $MOZ_FETCHES_DIR/aarch64/compiler-rt
|
||||
# We have a native x86_64 macos compiler-rt in $MOZ_FETCHES_DIR/x86_64/compiler-rt
|
||||
clang_lib=$(echo clang/lib/clang/*/lib)
|
||||
mkdir -p $clang_lib/darwin
|
||||
find {aarch64,x86_64}/compiler-rt/lib/darwin -type f -printf '%f\n' | sort -u | while read f; do
|
||||
f=compiler-rt/lib/darwin/$f
|
||||
if [ -f aarch64/$f -a -f x86_64/$f ]; then
|
||||
# For compiler-rt files that exist on both ends, merge them
|
||||
$MOZ_FETCHES_DIR/cctools/bin/lipo -create {aarch64,x86_64}/$f -output $clang_lib/darwin/${f##*/}
|
||||
elif [ -f aarch64/$f ]; then
|
||||
# For compiler-rt files that exist on either end, copy the existing one
|
||||
cp aarch64/$f $clang_lib/darwin
|
||||
else
|
||||
cp x86_64/$f $clang_lib/darwin
|
||||
fi
|
||||
done
|
||||
# We have a native macosx64 toolchain in $MOZ_FETCHES_DIR/clang-mac/clang
|
||||
# What we want is a mostly-linux64 toolchain but with a macosx64 llvm-symbolizer and runtime libraries
|
||||
|
||||
tar -cf - clang | python3 $GECKO_PATH/taskcluster/scripts/misc/zstdpy > clang.tar.zst
|
||||
mv clang-mac/clang/bin/llvm-symbolizer clang/bin/
|
||||
cp --remove-destination -lr clang/* clang-mac/clang/
|
||||
|
||||
mkdir -p $UPLOAD_DIR
|
||||
mv clang.tar.zst $UPLOAD_DIR
|
||||
cd clang-mac
|
||||
tar -c clang | $GECKO_PATH/taskcluster/scripts/misc/zstdpy > $UPLOAD_DIR/clang.tar.zst
|
||||
|
@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -x -e -v
|
||||
|
||||
# This script is creating an artifact containing llvm-symbolizer.
|
||||
|
||||
mkdir llvm-symbolizer
|
||||
cp $MOZ_FETCHES_DIR/clang/bin/llvm-symbolizer* llvm-symbolizer/
|
||||
|
||||
tar -cf - llvm-symbolizer | python3 $GECKO_PATH/taskcluster/scripts/misc/zstdpy > llvm-symbolizer.tar.zst
|
||||
|
||||
mkdir -p $UPLOAD_DIR
|
||||
mv llvm-symbolizer.tar.zst $UPLOAD_DIR
|
Loading…
Reference in New Issue
Block a user