Backed out 5 changesets (bug 1755415) for causing build bustages. CLOSED TREE

Backed out changeset e836c26855d4 (bug 1755415)
Backed out changeset 69d9d8005a83 (bug 1755415)
Backed out changeset a84913234c63 (bug 1755415)
Backed out changeset 709af6e17057 (bug 1755415)
Backed out changeset 0a5c1fe00f26 (bug 1755415)
This commit is contained in:
Marian-Vasile Laza 2022-02-16 13:31:05 +02:00
Родитель eef7d5c5ac
Коммит dc5a07f0b1
21 изменённых файлов: 311 добавлений и 203 удалений

Просмотреть файл

@ -242,6 +242,7 @@ def build_one_stage(
# libc++ doesn't build with MSVC because of the use of #include_next.
if is_final_stage and os.path.basename(cc[0]).lower() != "cl.exe":
cmake_args += [
"-DLLVM_FORCE_BUILD_RUNTIME=ON",
"-DLLVM_TOOL_LIBCXX_BUILD=%s" % ("ON" if build_libcxx else "OFF"),
# libc++abi has conflicting definitions between the shared and static
# library on Windows because of the import library for the dll having
@ -251,9 +252,13 @@ def build_one_stage(
]
if not is_final_stage:
cmake_args += [
"-DLLVM_ENABLE_PROJECTS=clang",
"-DLLVM_ENABLE_PROJECTS=clang;compiler-rt",
"-DLLVM_INCLUDE_TESTS=OFF",
"-DLLVM_TOOL_LLI_BUILD=OFF",
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF",
"-DCOMPILER_RT_BUILD_XRAY=OFF",
"-DCOMPILER_RT_BUILD_MEMPROF=OFF",
"-DCOMPILER_RT_BUILD_LIBFUZZER=OFF",
]
# There is no libxml2 on Windows except if we build one ourselves.
@ -507,6 +512,7 @@ def main():
extra_source_dir = source_dir + "/clang-tools-extra"
clang_source_dir = source_dir + "/clang"
lld_source_dir = source_dir + "/lld"
compiler_rt_source_dir = source_dir + "/compiler-rt"
libcxx_source_dir = source_dir + "/libcxx"
libcxxabi_source_dir = source_dir + "/libcxxabi"
@ -641,10 +647,13 @@ def main():
for p in config.get("patches", []):
patch(p, source_dir)
compiler_rt_source_link = llvm_source_dir + "/projects/compiler-rt"
symlinks = [
(clang_source_dir, llvm_source_dir + "/tools/clang"),
(extra_source_dir, llvm_source_dir + "/tools/clang/tools/extra"),
(lld_source_dir, llvm_source_dir + "/tools/lld"),
(compiler_rt_source_dir, compiler_rt_source_link),
(libcxx_source_dir, llvm_source_dir + "/projects/libcxx"),
(libcxxabi_source_dir, llvm_source_dir + "/projects/libcxxabi"),
(source_dir + "/cmake", llvm_source_dir + "/projects/cmake"),
@ -674,6 +683,7 @@ def main():
stage1_inst_dir = stage1_dir + "/" + package_name
final_stage_dir = stage1_dir
final_inst_dir = stage1_inst_dir
if is_darwin():
extra_cflags = []
@ -774,6 +784,7 @@ def main():
stage2_dir = build_dir + "/stage2"
stage2_inst_dir = stage2_dir + "/" + package_name
final_stage_dir = stage2_dir
final_inst_dir = stage2_inst_dir
if skip_stages < 1:
cc = stage1_inst_dir + "/bin/%s%s" % (cc_name, exe_ext)
cxx = stage1_inst_dir + "/bin/%s%s" % (cxx_name, exe_ext)
@ -803,6 +814,7 @@ def main():
stage3_dir = build_dir + "/stage3"
stage3_inst_dir = stage3_dir + "/" + package_name
final_stage_dir = stage3_dir
final_inst_dir = stage3_inst_dir
if skip_stages < 2:
cc = stage2_inst_dir + "/bin/%s%s" % (cc_name, exe_ext)
cxx = stage2_inst_dir + "/bin/%s%s" % (cxx_name, exe_ext)
@ -840,7 +852,9 @@ def main():
if stages >= 4 and skip_stages < 4:
stage4_dir = build_dir + "/stage4"
stage4_inst_dir = stage4_dir + "/" + package_name
final_stage_dir = stage4_dir
final_inst_dir = stage4_inst_dir
profile = None
if pgo:
if skip_stages == 3:
@ -878,6 +892,21 @@ def main():
os.path.join(final_stage_dir, package_name), osx_cross_compile
)
# Copy the wasm32 builtins to the final_inst_dir if the archive is present.
if "wasi-compiler-rt" in config:
compiler_rt = config["wasi-compiler-rt"].format(**os.environ)
if os.path.isdir(compiler_rt):
for libdir in glob.glob(
os.path.join(final_inst_dir, "lib", "clang", "*", "lib")
):
srcdir = os.path.join(compiler_rt, "lib", "wasi")
print("Copying from wasi-compiler-rt srcdir %s" % srcdir)
# Copy the contents of the "lib/wasi" subdirectory to the
# appropriate location in final_inst_dir.
destdir = os.path.join(libdir, "wasi")
mkdir_p(destdir)
copy_tree(srcdir, destdir)
if not args.skip_tar:
build_tar_package("%s.tar.zst" % package_name, final_stage_dir, package_name)

Просмотреть файл

@ -3,6 +3,7 @@
"cxx": "/usr/bin/g++",
"as": "/usr/bin/gcc",
"build_wasm": false,
"wasi-compiler-rt": null,
"patches": [
"profile-g4a10504e1f70c.patch"
]

Просмотреть файл

@ -2,5 +2,6 @@
"build_wasm": true,
"cc": "/usr/lib/llvm-11/bin/clang",
"cxx": "/usr/lib/llvm-11/bin/clang++",
"as": "/usr/lib/llvm-11/bin/clang"
"as": "/usr/lib/llvm-11/bin/clang",
"wasi-compiler-rt": "{MOZ_FETCHES_DIR}/compiler-rt"
}

Просмотреть файл

@ -7,5 +7,6 @@
"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"
"ld": "{MOZ_FETCHES_DIR}/clang/bin/clang",
"wasi-compiler-rt": "{MOZ_FETCHES_DIR}/compiler-rt"
}

Просмотреть файл

@ -2,5 +2,6 @@
"build_wasm": true,
"cc": "cl.exe",
"cxx": "cl.exe",
"ml": "ml64.exe"
"ml": "ml64.exe",
"wasi-compiler-rt": "{MOZ_FETCHES_DIR}/compiler-rt"
}

Просмотреть файл

@ -68,7 +68,7 @@ android-x86_64-asan-fuzzing/opt:
use-sccache: true
fetches:
toolchain:
- linux64-clang
- linux64-clang-android-cross
- linux64-sccache
- android-gradle-dependencies
optimization:

Просмотреть файл

@ -1654,7 +1654,7 @@ linux64-aarch64/opt:
fetches:
toolchain:
- linux64-binutils
- linux64-clang
- linux64-clang-aarch64-cross
- linux64-rust
- linux64-rust-size
- linux64-cbindgen

Просмотреть файл

@ -51,7 +51,7 @@ macosx64/debug:
fetches:
toolchain:
- linux64-cctools-port
- linux64-clang
- linux64-clang-macosx-cross
- linux64-sccache
- macosx64-sdk-10.12
- sysroot-wasm32-wasi
@ -80,7 +80,7 @@ macosx64-hybrid/plain:
fetches:
toolchain:
- linux64-cctools-port
- linux64-clang
- linux64-clang-macosx-cross
- linux64-sccache
- macosx64-sdk-10.12
- sysroot-wasm32-wasi
@ -109,7 +109,7 @@ macosx64/opt:
fetches:
toolchain:
- linux64-cctools-port
- linux64-clang
- linux64-clang-macosx-cross
- linux64-sccache
- macosx64-sdk-10.12
- sysroot-wasm32-wasi
@ -139,7 +139,7 @@ macosx64-asan-fuzzing/opt:
fetches:
toolchain:
- linux64-cctools-port
- linux64-clang
- linux64-clang-macosx-cross
- linux64-sccache
- macosx64-llvm-symbolizer
- macosx64-sdk-10.12
@ -173,7 +173,7 @@ macosx64-fuzzing/debug:
fetches:
toolchain:
- linux64-cctools-port
- linux64-clang
- linux64-clang-macosx-cross
- linux64-sccache
- macosx64-sdk-10.12
- sysroot-wasm32-wasi
@ -212,7 +212,7 @@ macosx64-x64-devedition/opt:
fetches:
toolchain:
- linux64-cctools-port
- linux64-clang
- linux64-clang-macosx-cross
- macosx64-sdk-10.12
- sysroot-wasm32-wasi
@ -250,7 +250,7 @@ macosx64-aarch64-devedition/opt:
fetches:
toolchain:
- linux64-cctools-port
- linux64-clang
- linux64-clang-macosx-cross
- macosx64-sdk-11.0
- sysroot-wasm32-wasi
@ -415,7 +415,7 @@ macosx64-noopt/debug:
fetches:
toolchain:
- linux64-cctools-port
- linux64-clang
- linux64-clang-macosx-cross
- linux64-sccache
- macosx64-sdk-10.12
- sysroot-wasm32-wasi
@ -446,7 +446,7 @@ macosx64-aarch64-noopt/debug:
fetches:
toolchain:
- linux64-cctools-port
- linux64-clang
- linux64-clang-macosx-cross
- linux64-sccache
- macosx64-sdk-11.0
- sysroot-wasm32-wasi
@ -472,7 +472,7 @@ macosx64-add-on-devel/opt:
fetches:
toolchain:
- linux64-cctools-port
- linux64-clang
- linux64-clang-macosx-cross
- linux64-sccache
- macosx64-sdk-10.12
- sysroot-wasm32-wasi
@ -505,7 +505,7 @@ macosx64-x64-shippable/opt:
fetches:
toolchain:
- linux64-cctools-port
- linux64-clang
- linux64-clang-macosx-cross
- macosx64-sdk-10.12
- sysroot-wasm32-wasi
@ -540,7 +540,7 @@ macosx64-aarch64-shippable/opt:
fetches:
toolchain:
- linux64-cctools-port
- linux64-clang
- linux64-clang-macosx-cross
- macosx64-sdk-11.0
- sysroot-wasm32-wasi
@ -706,7 +706,7 @@ macosx64-ccov/opt:
fetches:
toolchain:
- linux64-cctools-port
- linux64-clang
- linux64-clang-macosx-cross
- linux64-sccache
- macosx64-sdk-10.12
- sysroot-wasm32-wasi
@ -736,7 +736,7 @@ macosx64-gcp/debug:
fetches:
toolchain:
- linux64-cctools-port
- linux64-clang
- linux64-clang-macosx-cross
- linux64-sccache
- macosx64-sdk-10.12
- sysroot-wasm32-wasi
@ -767,7 +767,7 @@ macosx64-gcp/opt:
fetches:
toolchain:
- linux64-cctools-port
- linux64-clang
- linux64-clang-macosx-cross
- linux64-sccache
- macosx64-sdk-10.12
- sysroot-wasm32-wasi

Просмотреть файл

@ -48,7 +48,7 @@ win32/debug:
fetches:
toolchain:
- linux64-binutils
- linux64-clang
- linux64-clang-win-cross
- linux64-rust-cross
- linux64-rust-size
- linux64-nasm
@ -158,7 +158,7 @@ win64/debug:
fetches:
toolchain:
- linux64-binutils
- linux64-clang
- linux64-clang-win-cross
- linux64-rust-cross
- linux64-rust-size
- linux64-nasm
@ -265,7 +265,7 @@ win64-fuzzing/debug:
fetches:
toolchain:
- linux64-binutils
- linux64-clang
- linux64-clang-win-cross
- linux64-rust-cross
- linux64-rust-size
- linux64-nasm
@ -1027,7 +1027,7 @@ win64-asan/debug:
fetches:
toolchain:
- linux64-binutils
- linux64-clang
- linux64-clang-win-cross
- linux64-rust-cross
- linux64-rust-size
- linux64-nasm
@ -1083,7 +1083,7 @@ win64-asan/opt:
fetches:
toolchain:
- linux64-binutils
- linux64-clang
- linux64-clang-win-cross
- linux64-rust-cross
- linux64-rust-size
- linux64-nasm
@ -1149,7 +1149,7 @@ win64-asan-reporter-shippable/opt:
fetches:
toolchain:
- linux64-binutils
- linux64-clang
- linux64-clang-win-cross
- linux64-rust-cross
- linux64-rust-size
- linux64-nasm
@ -1200,7 +1200,7 @@ win64-asan-fuzzing/opt:
fetches:
toolchain:
- linux64-binutils
- linux64-clang
- linux64-clang-win-cross
- linux64-rust-cross
- linux64-rust-size
- linux64-nasm
@ -1385,7 +1385,7 @@ win64-aarch64/debug:
fetches:
toolchain:
- linux64-binutils
- linux64-clang
- linux64-clang-win-cross
- linux64-rust-cross
- linux64-rust-size
- linux64-nasm

Просмотреть файл

@ -122,7 +122,7 @@ jobs:
toolchain:
- linux64-binutils
- linux64-cctools-port
- linux64-clang
- linux64-clang-macosx-cross
- linux64-hfsplus
- linux64-libdmg
- linux64-rust-macos
@ -181,7 +181,7 @@ jobs:
- linux64-jdk
# Workaround issues in binutils from the ndk with the compiler-rt from clang-13
- linux64-binutils
- linux64-clang
- linux64-clang-android-cross
- linux64-rust-android
- linux64-rust-size
- linux64-cbindgen
@ -235,7 +235,7 @@ jobs:
- android-ndk-linux
- android-sdk-linux
- linux64-jdk
- linux64-clang
- linux64-clang-android-cross
- linux64-rust-android
- linux64-rust-size
- linux64-cbindgen
@ -274,7 +274,7 @@ jobs:
fetches:
toolchain:
- linux64-binutils
- linux64-clang
- linux64-clang-win-cross
- linux64-rust-cross
- linux64-rust-size
- linux64-nasm
@ -319,7 +319,7 @@ jobs:
fetches:
toolchain:
- linux64-binutils
- linux64-clang
- linux64-clang-win-cross
- linux64-rust-cross
- linux64-rust-size
- linux64-nasm

Просмотреть файл

@ -88,7 +88,7 @@ jobs:
toolchain:
- linux64-binutils
- linux64-cctools-port
- linux64-clang
- linux64-clang-macosx-cross
- linux64-hfsplus
- linux64-libdmg
- linux64-nasm
@ -135,7 +135,7 @@ jobs:
fetches:
toolchain:
- linux64-binutils
- linux64-clang
- linux64-clang-win-cross
- linux64-rust-cross
- linux64-rust-size
- linux64-nasm

Просмотреть файл

@ -60,7 +60,7 @@ macosx64-clang-tidy:
fetches:
toolchain:
- linux64-cctools-port
- linux64-clang-13
- linux64-clang-13-macosx-cross
- macosx64-sdk-11.0
macosx64-arch64-clang-tidy:
@ -83,7 +83,7 @@ macosx64-arch64-clang-tidy:
fetches:
toolchain:
- linux64-cctools-port
- linux64-clang-13
- linux64-clang-13-macosx-cross
- macosx64-sdk-11.0
win64-clang-tidy:

Просмотреть файл

@ -149,14 +149,17 @@ linux64-clang-13-profile:
- clang-13
toolchain:
- linux64-clang-13-stage1
- linux64-x64-compiler-rt-13
- linux64-toolchain-sysroot
linux64-clang-13-raw:
linux64-clang-13:
description: "Clang 13 toolchain build"
attributes:
local-toolchain: true
treeherder:
symbol: TL(clang13-raw)
symbol: TL(clang13)
run-on-projects: [trunk]
run:
using: toolchain-script
script: build-clang.sh
arguments:
- 'build/build-clang/linux64.json'
@ -168,6 +171,8 @@ linux64-clang-13-raw:
- 'build/build-clang/clang-13.json'
- 'build/build-clang/skip-3-stages.json'
- 'build/build-clang/4stages-pgo.json'
toolchain-alias:
- linux64-clang
toolchain-artifact: public/build/clang.tar.zst
fetches:
fetch:
@ -176,38 +181,110 @@ linux64-clang-13-raw:
- linux64-clang-13-stage1
- linux64-clang-13-profile
- linux64-toolchain-sysroot
- wasm32-wasi-compiler-rt-13
linux64-clang-13:
linux64-clang-13-android-cross:
description: "Clang 13 toolchain build"
attributes:
local-toolchain: true
treeherder:
symbol: TL(clang13)
symbol: TL(clang13-android)
run:
using: toolchain-script
script: repack-clang-linux-cross.sh
arguments:
- aarch64
- arm
- x86
- x64
toolchain-alias: linux64-clang-android-cross
toolchain-artifact: public/build/clang.tar.zst
dependencies:
android-aarch64-compiler-rt-13: toolchain-android-aarch64-compiler-rt-13
android-arm-compiler-rt-13: toolchain-android-arm-compiler-rt-13
android-x86-compiler-rt-13: toolchain-android-x86-compiler-rt-13
android-x64-compiler-rt-13: toolchain-android-x64-compiler-rt-13
fetches:
toolchain:
- linux64-clang-13
android-aarch64-compiler-rt-13:
- artifact: compiler-rt.tar.zst
dest: aarch64
android-arm-compiler-rt-13:
- artifact: compiler-rt.tar.zst
dest: arm
android-x86-compiler-rt-13:
- artifact: compiler-rt.tar.zst
dest: x86
android-x64-compiler-rt-13:
- artifact: compiler-rt.tar.zst
dest: x64
linux64-clang-13-aarch64-cross:
description: "Clang 13 toolchain build with aarch64 runtime"
treeherder:
symbol: TL(clang13-aarch64)
worker-type: b-linux
worker:
max-run-time: 600
run-on-projects: [trunk]
run:
script: repack-clang.sh
toolchain-alias:
- linux64-clang
script: repack-clang-linux-cross.sh
toolchain-alias: linux64-clang-aarch64-cross
toolchain-artifact: public/build/clang.tar.zst
dependencies:
linux64-aarch64-compiler-rt-13: toolchain-linux64-aarch64-compiler-rt-13
fetches:
toolchain:
- linux64-clang-13
linux64-aarch64-compiler-rt-13:
- artifact: compiler-rt.tar.zst
linux64-clang-13-macosx-cross:
description: "Clang 13 toolchain repack with MacOS Compiler RT libs"
treeherder:
symbol: TL(clang13-macosx-cross)
worker-type: b-linux
worker:
max-run-time: 600
run:
script: repack-clang-linux-macosx-cross.sh
toolchain-alias: linux64-clang-macosx-cross
toolchain-artifact: public/build/clang.tar.zst
dependencies:
macosx64-aarch64-compiler-rt-13: toolchain-macosx64-aarch64-compiler-rt-13
macosx64-x64-compiler-rt-13: toolchain-macosx64-x64-compiler-rt-13
fetches:
toolchain:
- linux64-cctools-port
- linux64-clang-13-raw
- android-aarch64-compiler-rt-13
- android-arm-compiler-rt-13
- android-x64-compiler-rt-13
- android-x86-compiler-rt-13
- linux64-aarch64-compiler-rt-13
- linux64-x64-compiler-rt-13
- linux64-x86-compiler-rt-13
- macosx64-aarch64-compiler-rt-13
- macosx64-x64-compiler-rt-13
- wasm32-wasi-compiler-rt-13
- win32-compiler-rt-13
- win64-compiler-rt-13
- linux64-clang-13
macosx64-aarch64-compiler-rt-13:
- artifact: compiler-rt.tar.zst
dest: aarch64
macosx64-x64-compiler-rt-13:
- artifact: compiler-rt.tar.zst
dest: x86_64
linux64-clang-13-win-cross:
description: "Clang 13 toolchain repack with Windows Compiler RT libs"
treeherder:
symbol: TL(clang13-win-cross)
worker-type: b-linux
worker:
max-run-time: 600
run:
script: repack-clang-linux-win-cross.sh
toolchain-alias: linux64-clang-win-cross
toolchain-artifact: public/build/clang.tar.zst
dependencies:
win32-compiler-rt-13: toolchain-win32-compiler-rt-13
win64-compiler-rt-13: toolchain-win64-compiler-rt-13
fetches:
toolchain:
- linux64-clang-13
win32-compiler-rt-13:
- artifact: compiler-rt.tar.zst
dest: x86
win64-compiler-rt-13:
- artifact: compiler-rt.tar.zst
dest: x86_64
macosx64-clang-13-raw:
description: "Clang 13 toolchain build"
@ -234,10 +311,10 @@ macosx64-clang-13-raw:
- clang-13
toolchain:
- linux64-cctools-port
- linux64-clang-13-stage1
- linux64-clang-13-macosx-cross
- linux64-clang-13-profile
- macosx64-sdk-11.0
- macosx64-x64-compiler-rt-13
- wasm32-wasi-compiler-rt-13
macosx64-clang-13:
description: "Clang 13 toolchain repack with MacOS Compiler RT libs"
@ -251,27 +328,24 @@ macosx64-clang-13:
run-on-projects:
- trunk
run:
script: repack-clang.sh
script: repack-clang-linux-macosx-cross.sh
toolchain-alias:
- macosx64-clang
- macosx64-clang-toolchain
toolchain-artifact: public/build/clang.tar.zst
dependencies:
macosx64-aarch64-compiler-rt-13: toolchain-macosx64-aarch64-compiler-rt-13
macosx64-x64-compiler-rt-13: toolchain-macosx64-x64-compiler-rt-13
fetches:
toolchain:
- linux64-cctools-port
- macosx64-clang-13-raw
- android-aarch64-compiler-rt-13
- android-arm-compiler-rt-13
- android-x64-compiler-rt-13
- android-x86-compiler-rt-13
- linux64-aarch64-compiler-rt-13
- linux64-x64-compiler-rt-13
- linux64-x86-compiler-rt-13
- macosx64-aarch64-compiler-rt-13
- macosx64-x64-compiler-rt-13
- wasm32-wasi-compiler-rt-13
- win32-compiler-rt-13
- win64-compiler-rt-13
macosx64-aarch64-compiler-rt-13:
- artifact: compiler-rt.tar.zst
dest: aarch64
macosx64-x64-compiler-rt-13:
- artifact: compiler-rt.tar.zst
dest: x86_64
macosx64-aarch64-clang-13-raw:
description: "Clang 13 toolchain build"
@ -300,10 +374,10 @@ macosx64-aarch64-clang-13-raw:
- clang-13
toolchain:
- linux64-cctools-port
- linux64-clang-13-stage1
- linux64-clang-13-macosx-cross
- linux64-clang-13-profile
- macosx64-sdk-11.0
- macosx64-aarch64-compiler-rt-13
- wasm32-wasi-compiler-rt-13
macosx64-aarch64-clang-13:
description: "Clang 13 toolchain repack with MacOS Compiler RT libs"
@ -317,16 +391,22 @@ macosx64-aarch64-clang-13:
run-on-projects:
- trunk
run:
script: repack-clang.sh
script: repack-clang-linux-macosx-cross.sh
toolchain-alias: macosx64-aarch64-clang
toolchain-artifact: public/build/clang.tar.zst
dependencies:
macosx64-aarch64-compiler-rt-13: toolchain-macosx64-aarch64-compiler-rt-13
macosx64-x64-compiler-rt-13: toolchain-macosx64-x64-compiler-rt-13
fetches:
toolchain:
- linux64-cctools-port
- macosx64-aarch64-clang-13-raw
- macosx64-aarch64-compiler-rt-13
- macosx64-x64-compiler-rt-13
- wasm32-wasi-compiler-rt-13
macosx64-aarch64-compiler-rt-13:
- artifact: compiler-rt.tar.zst
dest: aarch64
macosx64-x64-compiler-rt-13:
- artifact: compiler-rt.tar.zst
dest: x86_64
win64-clang-13-raw:
description: "Clang-cl 13 toolchain build"
@ -359,7 +439,7 @@ win64-clang-13-raw:
- ninja
toolchain:
- win64-clang-13-stage1
- win64-compiler-rt-13
- wasm32-wasi-compiler-rt-13
win64-clang-13:
description: "Clang-cl 13 toolchain build"
@ -373,25 +453,21 @@ win64-clang-13:
run-on-projects:
- trunk
run:
script: repack-clang.sh
script: repack-clang-linux-win-cross.sh
toolchain-alias: win64-clang
toolchain-artifact: public/build/clang.tar.zst
dependencies:
win32-compiler-rt-13: toolchain-win32-compiler-rt-13
win64-compiler-rt-13: toolchain-win64-compiler-rt-13
fetches:
toolchain:
- linux64-cctools-port
- win64-clang-13-raw
- android-aarch64-compiler-rt-13
- android-arm-compiler-rt-13
- android-x64-compiler-rt-13
- android-x86-compiler-rt-13
- linux64-aarch64-compiler-rt-13
- linux64-x64-compiler-rt-13
- linux64-x86-compiler-rt-13
- macosx64-aarch64-compiler-rt-13
- macosx64-x64-compiler-rt-13
- wasm32-wasi-compiler-rt-13
- win32-compiler-rt-13
- win64-compiler-rt-13
win32-compiler-rt-13:
- artifact: compiler-rt.tar.zst
dest: x86
win64-compiler-rt-13:
- artifact: compiler-rt.tar.zst
dest: x86_64
win64-clang-13-stage1:
description: "Clang-cl 13 toolchain build stage 1"

Просмотреть файл

@ -9,6 +9,7 @@ job-defaults:
run:
using: toolchain-script
script: build-compiler-rt.sh
toolchain-artifact: public/build/compiler-rt.tar.zst
android-aarch64-compiler-rt-13:
description: "android aarch64 Compiler-rt for Clang 13 toolchain build"
@ -16,10 +17,10 @@ android-aarch64-compiler-rt-13:
symbol: TA(aarch64-crt-13)
run:
arguments:
- aarch64-linux-android
- build/build-clang/clang-13.json
resources:
- build/build-clang/clang-13.json
toolchain-artifact: public/build/compiler-rt-aarch64-linux-android.tar.zst
fetches:
fetch:
- clang-13
@ -33,10 +34,10 @@ android-arm-compiler-rt-13:
symbol: TA(arm-crt-13)
run:
arguments:
- armv7-linux-android
- build/build-clang/clang-13.json
resources:
- build/build-clang/clang-13.json
toolchain-artifact: public/build/compiler-rt-armv7-linux-android.tar.zst
fetches:
fetch:
- clang-13
@ -50,10 +51,10 @@ android-x86-compiler-rt-13:
symbol: TA(x86-crt-13)
run:
arguments:
- i686-linux-android
- build/build-clang/clang-13.json
resources:
- build/build-clang/clang-13.json
toolchain-artifact: public/build/compiler-rt-i686-linux-android.tar.zst
fetches:
fetch:
- clang-13
@ -67,10 +68,10 @@ android-x64-compiler-rt-13:
symbol: TA(x64-crt-13)
run:
arguments:
- x86_64-linux-android
- build/build-clang/clang-13.json
resources:
- build/build-clang/clang-13.json
toolchain-artifact: public/build/compiler-rt-x86_64-linux-android.tar.zst
fetches:
fetch:
- clang-13
@ -78,54 +79,21 @@ android-x64-compiler-rt-13:
- linux64-clang-13-stage1
- linux64-android-ndk-linux-repack
linux64-x86-compiler-rt-13:
description: "Linux x86 Compiler-rt for Clang 13 toolchain build"
treeherder:
symbol: TL(x86-crt-13)
run:
arguments:
- build/build-clang/clang-13.json
resources:
- build/build-clang/clang-13.json
toolchain-artifact: public/build/compiler-rt-i686-unknown-linux-gnu.tar.zst
fetches:
fetch:
- clang-13
toolchain:
- linux64-clang-13-stage1
- sysroot-i686-linux-gnu
linux64-x64-compiler-rt-13:
description: "Linux x64 Compiler-rt for Clang 13 toolchain build"
treeherder:
symbol: TL(x64-crt-13)
run:
arguments:
- build/build-clang/clang-13.json
resources:
- build/build-clang/clang-13.json
toolchain-artifact: public/build/compiler-rt-x86_64-unknown-linux-gnu.tar.zst
fetches:
fetch:
- clang-13
toolchain:
- linux64-clang-13-stage1
- sysroot-x86_64-linux-gnu
linux64-aarch64-compiler-rt-13:
description: "Linux aarch64 Compiler-rt for Clang 13 toolchain build"
treeherder:
symbol: TL(aarch64-crt-13)
run:
arguments:
- aarch64-unknown-linux-gnu
- build/build-clang/clang-13.json
resources:
- build/build-clang/clang-13.json
toolchain-artifact: public/build/compiler-rt-aarch64-unknown-linux-gnu.tar.zst
fetches:
fetch:
- clang-13
toolchain:
- linux64-binutils
- linux64-clang-13-stage1
- sysroot-aarch64-linux-gnu
@ -135,14 +103,15 @@ macosx64-x64-compiler-rt-13:
symbol: TM(x64-crt-13)
run:
arguments:
- x86_64-apple-darwin
- build/build-clang/clang-13.json
resources:
- build/build-clang/clang-13.json
toolchain-artifact: public/build/compiler-rt-x86_64-apple-darwin.tar.zst
fetches:
fetch:
- clang-13
toolchain:
- linux64-cctools-port
- linux64-clang-13-stage1
- macosx64-sdk-11.0
@ -152,14 +121,15 @@ macosx64-aarch64-compiler-rt-13:
symbol: TM(aarch64-crt-13)
run:
arguments:
- aarch64-apple-darwin
- build/build-clang/clang-13.json
resources:
- build/build-clang/clang-13.json
toolchain-artifact: public/build/compiler-rt-aarch64-apple-darwin.tar.zst
fetches:
fetch:
- clang-13
toolchain:
- linux64-cctools-port
- linux64-clang-13-stage1
- macosx64-sdk-11.0
@ -172,11 +142,11 @@ win32-compiler-rt-13:
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/vs2017-15.9.manifest"
run:
arguments:
- i686-pc-windows-msvc
- build/build-clang/clang-13.json
resources:
- 'taskcluster/scripts/misc/tooltool-download.sh'
- build/build-clang/clang-13.json
toolchain-artifact: public/build/compiler-rt-i686-pc-windows-msvc.tar.zst
tooltool-downloads: internal
fetches:
fetch:
@ -194,11 +164,11 @@ win64-compiler-rt-13:
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/vs2017-15.9.manifest"
run:
arguments:
- x86_64-pc-windows-msvc
- build/build-clang/clang-13.json
resources:
- 'taskcluster/scripts/misc/tooltool-download.sh'
- build/build-clang/clang-13.json
toolchain-artifact: public/build/compiler-rt-x86_64-pc-windows-msvc.tar.zst
tooltool-downloads: internal
fetches:
fetch:
@ -214,7 +184,6 @@ wasm32-wasi-compiler-rt-13:
worker-type: b-linux-xlarge
run:
script: build-compiler-rt-wasi.sh
toolchain-artifact: public/build/compiler-rt-wasm32-wasi.tar.zst
toolchain-alias: wasm32-wasi-compiler-rt
fetches:
fetch:

Просмотреть файл

@ -112,7 +112,7 @@ jobs:
toolchain:
- linux64-rust-macos
- linux64-cctools-port
- linux64-clang-13
- linux64-clang-13-macosx-cross
- macosx64-sdk-10.12
- wrench-deps
macosx64-clang-13:

Просмотреть файл

@ -16,9 +16,6 @@ if [ -d "$MOZ_FETCHES_DIR/binutils/bin" ]; then
export PATH="$MOZ_FETCHES_DIR/binutils/bin:$PATH"
fi
# Make the installed compiler-rt(s) available to clang.
UPLOAD_DIR= taskcluster/scripts/misc/repack-clang.sh
case "$CONFIGS" in
*macosx64*)
# these variables are used in build-clang.py

Просмотреть файл

@ -2,9 +2,8 @@
set -e -x
artifact=$(basename $TOOLCHAIN_ARTIFACT)
dir=${artifact%.tar.*}
target=${dir#compiler-rt-}
target=$1
shift
clang=$MOZ_FETCHES_DIR/clang/bin/clang
@ -52,14 +51,13 @@ esac
case "$target" in
*-apple-darwin)
libdir=lib/darwin
EXTRA_CMAKE_FLAGS="
-DCMAKE_LINKER=$MOZ_FETCHES_DIR/clang/bin/ld64.lld
-DCMAKE_LIPO=$MOZ_FETCHES_DIR/clang/bin/llvm-lipo
-DCMAKE_LINKER=$MOZ_FETCHES_DIR/cctools/bin/$target-ld
-DCMAKE_LIPO=$MOZ_FETCHES_DIR/cctools/bin/lipo
-DCMAKE_SYSTEM_NAME=Darwin
-DCMAKE_SYSTEM_VERSION=$MACOSX_DEPLOYMENT_TARGET
-DCMAKE_OSX_SYSROOT=$MOZ_FETCHES_DIR/MacOSX11.0.sdk
-DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld
-DCMAKE_SHARED_LINKER_FLAGS=-fuse-ld=lld
-DDARWIN_osx_ARCHS=$arch
-DDARWIN_osx_SYSROOT=$MOZ_FETCHES_DIR/MacOSX11.0.sdk
-DDARWIN_macosx_OVERRIDE_SDK_VERSION=11.0
@ -70,8 +68,10 @@ case "$target" in
# Give it a fake one.
echo "#!/bin/sh" > codesign
chmod +x codesign
PATH="$PWD:$MOZ_FETCHES_DIR/cctools/bin:$PATH"
;;
*-linux-android)
libdir=lib/linux
cflags="
--gcc-toolchain=$MOZ_FETCHES_DIR/android-ndk/toolchains/$ndk_prefix-4.9/prebuilt/linux-x86_64
-isystem $MOZ_FETCHES_DIR/android-ndk/sysroot/usr/include/$ndk_target
@ -86,6 +86,7 @@ case "$target" in
"
EXTRA_CMAKE_FLAGS="
-DCMAKE_SYSROOT=$MOZ_FETCHES_DIR/android-ndk/platforms/android-$api_level/arch-$ndk_arch
-DCMAKE_SHARED_LINKER_FLAGS=-fuse-ld=lld
-DCMAKE_LINKER=$MOZ_FETCHES_DIR/clang/bin/ld.lld
-DCMAKE_C_FLAGS='-fPIC $cflags'
-DCMAKE_ASM_FLAGS='$cflags'
@ -99,13 +100,13 @@ case "$target" in
-DCOMPILER_RT_BUILD_ORC=OFF
"
;;
*-unknown-linux-gnu)
aarch64-unknown-linux-gnu)
libdir=lib/linux
EXTRA_CMAKE_FLAGS="
-DCMAKE_SYSROOT=$MOZ_FETCHES_DIR/sysroot-${target%-unknown-linux-gnu}-linux-gnu
-DCMAKE_SYSROOT=$MOZ_FETCHES_DIR/sysroot-aarch64-linux-gnu
-DCMAKE_LINKER=$MOZ_FETCHES_DIR/clang/bin/ld.lld
-DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld
-DCMAKE_SHARED_LINKER_FLAGS=-fuse-ld=lld
"
PATH="$MOZ_FETCHES_DIR/binutils/bin:$PATH"
;;
*-pc-windows-msvc)
VSPATH="$MOZ_FETCHES_DIR/vs2017_15.9.6"
@ -176,15 +177,16 @@ eval cmake \
-DCMAKE_AR=$MOZ_FETCHES_DIR/clang/bin/llvm-${ar:-ar} \
-DCMAKE_RANLIB=$MOZ_FETCHES_DIR/clang/bin/llvm-ranlib \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${PWD}/${dir} \
-DLLVM_ENABLE_ASSERTIONS=OFF \
-DLLVM_CONFIG_PATH=$MOZ_FETCHES_DIR/clang/bin/llvm-config \
-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON \
$EXTRA_CMAKE_FLAGS
ninja install -v
ninja -v
tar caf "$artifact" "$dir"
cd ..
tar caf compiler-rt.tar.zst compiler-rt/$libdir
mkdir -p "$UPLOAD_DIR"
mv "$artifact" "$UPLOAD_DIR"
mv "compiler-rt.tar.zst" "$UPLOAD_DIR"

Просмотреть файл

@ -0,0 +1,22 @@
#!/bin/bash
set -x -e -v
# This script is for building clang for cross Linux targets on a Linux host.
cd $MOZ_FETCHES_DIR
# We have a native linux64 toolchain in $MOZ_FETCHES_DIR/clang
# We have some linux compiler-rts in $MOZ_FETCHES_DIR/compiler-rt if no argument
# is given to the script, or $MOZ_FETCHES_DIR/*/compiler-rt otherwise. The
# subdirectories are given as arguments.
clang_lib=$(echo $PWD/clang/lib/clang/*/lib)
for dir in ${*:-.}; do
find $dir/compiler-rt/lib/linux -type f | while read f; do
cp -n $f $clang_lib/linux
done
done
tar -caf clang.tar.zst clang
mkdir -p $UPLOAD_DIR
mv clang.tar.zst $UPLOAD_DIR

Просмотреть файл

@ -0,0 +1,30 @@
#!/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.
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
tar caf clang.tar.zst clang
mkdir -p $UPLOAD_DIR
mv clang.tar.zst $UPLOAD_DIR

Просмотреть файл

@ -0,0 +1,21 @@
#!/bin/bash
set -x -e -v
# This script is for building clang for windows targets on a Linux host,
# including native Windows Compiler-RT libraries.
cd $MOZ_FETCHES_DIR
# We have a native linux64 toolchain in $MOZ_FETCHES_DIR/clang
# We have a native x86 windows compiler-rt in $MOZ_FETCHES_DIR/x86/compiler-rt
# We have a native x86_64 windows compiler-rt in $MOZ_FETCHES_DIR/x86_64/compiler-rt
clang_lib=$(echo clang/lib/clang/*/lib)
mkdir -p $clang_lib/windows
cp x86/compiler-rt/lib/windows/* $clang_lib/windows
cp x86_64/compiler-rt/lib/windows/* $clang_lib/windows
tar caf clang.tar.zst clang
# Put a tarball in the artifacts dir
mkdir -p $UPLOAD_DIR
cp clang.tar.zst $UPLOAD_DIR

Просмотреть файл

@ -1,42 +0,0 @@
#!/bin/bash
set -x -e -v
shopt -s nullglob
# This script is for repacking clang for cross targets on a Linux host.
cd $MOZ_FETCHES_DIR
# We have a clang toolchain in $MOZ_FETCHES_DIR/clang
# We have some compiler-rts in $MOZ_FETCHES_DIR/compiler-rt*
# We copy everything from the compiler-rts into clang/lib/clang/$version
clang_dir=$(echo clang/lib/clang/*/include)
clang_dir=${clang_dir%/include}
[ -n "$clang_dir" ] && for c in compiler-rt*; do
find $c -mindepth 1 -type d | while read d; do
mkdir -p "$clang_dir/${d#compiler-rt-*/}"
find $d -mindepth 1 -maxdepth 1 -not -type d | while read f; do
target_file="$clang_dir/${f#compiler-rt-*/}"
case $d in
compiler-rt-*/lib/darwin)
if [ -f "$target_file" ]; then
# Unify overlapping files for darwin/
$MOZ_FETCHES_DIR/cctools/bin/lipo -create "$f" "$target_file" -output "$target_file.new"
mv "$target_file.new" "$target_file"
continue
fi
;;
esac
if [ -f "$target_file" ] && ! diff -q "$f" "$target_file" 2>/dev/null; then
echo "Cannot copy $f because it is already in ${target_file%/*}" >&2 && exit 1
fi
cp "$f" "$target_file"
done
done
done
if [ -n "$UPLOAD_DIR" ]; then
tar caf clang.tar.zst clang
mkdir -p $UPLOAD_DIR
mv clang.tar.zst $UPLOAD_DIR
fi