Loading build/build-clang/build-clang.py +19 −14 Original line number Original line Diff line number Diff line Loading @@ -174,10 +174,10 @@ def build_one_stage( cc, cc, cxx, cxx, asm, asm, ld, ar, ar, ranlib, ranlib, libtool, libtool, ldflags, src_dir, src_dir, stage_dir, stage_dir, package_name, package_name, Loading @@ -198,7 +198,7 @@ def build_one_stage( def slashify_path(path): def slashify_path(path): return path.replace("\\", "/") return path.replace("\\", "/") def cmake_base_args(cc, cxx, asm, ld, ar, ranlib, libtool, inst_dir): def cmake_base_args(cc, cxx, asm, ar, ranlib, libtool, ldflags, inst_dir): machine_targets = targets if is_final_stage and targets else "X86" machine_targets = targets if is_final_stage and targets else "X86" cmake_args = [ cmake_args = [ Loading @@ -206,13 +206,12 @@ def build_one_stage( "-DCMAKE_C_COMPILER=%s" % slashify_path(cc[0]), "-DCMAKE_C_COMPILER=%s" % slashify_path(cc[0]), "-DCMAKE_CXX_COMPILER=%s" % slashify_path(cxx[0]), "-DCMAKE_CXX_COMPILER=%s" % slashify_path(cxx[0]), "-DCMAKE_ASM_COMPILER=%s" % slashify_path(asm[0]), "-DCMAKE_ASM_COMPILER=%s" % slashify_path(asm[0]), "-DCMAKE_LINKER=%s" % slashify_path(ld[0]), "-DCMAKE_AR=%s" % slashify_path(ar), "-DCMAKE_AR=%s" % slashify_path(ar), "-DCMAKE_C_FLAGS=%s" % " ".join(cc[1:]), "-DCMAKE_C_FLAGS=%s" % " ".join(cc[1:]), "-DCMAKE_CXX_FLAGS=%s" % " ".join(cxx[1:]), "-DCMAKE_CXX_FLAGS=%s" % " ".join(cxx[1:]), "-DCMAKE_ASM_FLAGS=%s" % " ".join(asm[1:]), "-DCMAKE_ASM_FLAGS=%s" % " ".join(asm[1:]), "-DCMAKE_EXE_LINKER_FLAGS=%s" % " ".join(ld[1:]), "-DCMAKE_EXE_LINKER_FLAGS=%s" % " ".join(ldflags), "-DCMAKE_SHARED_LINKER_FLAGS=%s" % " ".join(ld[1:]), "-DCMAKE_SHARED_LINKER_FLAGS=%s" % " ".join(ldflags), "-DCMAKE_BUILD_TYPE=%s" % build_type, "-DCMAKE_BUILD_TYPE=%s" % build_type, "-DCMAKE_INSTALL_PREFIX=%s" % inst_dir, "-DCMAKE_INSTALL_PREFIX=%s" % inst_dir, "-DLLVM_TARGETS_TO_BUILD=%s" % machine_targets, "-DLLVM_TARGETS_TO_BUILD=%s" % machine_targets, Loading @@ -221,14 +220,15 @@ def build_one_stage( "-DLLVM_ENABLE_BINDINGS=OFF", "-DLLVM_ENABLE_BINDINGS=OFF", "-DLLVM_ENABLE_CURL=OFF", "-DLLVM_ENABLE_CURL=OFF", "-DLLVM_INCLUDE_TESTS=OFF", "-DLLVM_INCLUDE_TESTS=OFF", "-DLLVM_ENABLE_LLD=ON", ] ] if "TASK_ID" in os.environ: if "TASK_ID" in os.environ: cmake_args += [ cmake_args += [ "-DCLANG_REPOSITORY_STRING=taskcluster-%s" % os.environ["TASK_ID"], "-DCLANG_REPOSITORY_STRING=taskcluster-%s" % os.environ["TASK_ID"], ] ] projects = ["clang"] projects = ["clang", "lld"] if is_final_stage: if is_final_stage: projects.extend(("clang-tools-extra", "lld")) projects.append("clang-tools-extra") else: else: cmake_args.append("-DLLVM_TOOL_LLI_BUILD=OFF") cmake_args.append("-DLLVM_TOOL_LLI_BUILD=OFF") Loading Loading @@ -304,7 +304,7 @@ def build_one_stage( return cmake_args return cmake_args cmake_args = [] cmake_args = [] cmake_args += cmake_base_args(cc, cxx, asm, ld, ar, ranlib, libtool, inst_dir) cmake_args += cmake_base_args(cc, cxx, asm, ar, ranlib, libtool, ldflags, inst_dir) cmake_args += [src_dir] cmake_args += [src_dir] build_package(build_dir, cmake_args) build_package(build_dir, cmake_args) Loading Loading @@ -593,7 +593,8 @@ def main(): cc = get_tool(config, "cc") cc = get_tool(config, "cc") cxx = get_tool(config, "cxx") cxx = get_tool(config, "cxx") asm = get_tool(config, "ml" if is_windows() else "as") asm = get_tool(config, "ml" if is_windows() else "as") ld = get_tool(config, "link" if is_windows() else "ld") # Not using lld here as default here because it's not in PATH. But clang # knows how to find it when they are installed alongside each others. ar = get_tool(config, "lib" if is_windows() else "ar") ar = get_tool(config, "lib" if is_windows() else "ar") ranlib = None if is_windows() else get_tool(config, "ranlib") ranlib = None if is_windows() else get_tool(config, "ranlib") libtool = None libtool = None Loading Loading @@ -647,7 +648,11 @@ def main(): # corresponding option to strip unused sections. We do it explicitly # corresponding option to strip unused sections. We do it explicitly # here. LLVM's build system is also picky about turning on ICF, so # here. LLVM's build system is also picky about turning on ICF, so # we do that explicitly here, too. # we do that explicitly here, too. extra_ldflags += ["-fuse-ld=gold", "-Wl,--gc-sections", "-Wl,--icf=safe"] # It's unfortunately required to specify the linker used here because # the linker flags are used in LLVM's configure step before # -DLLVM_ENABLE_LLD is actually processed. extra_ldflags += ["-fuse-ld=lld", "-Wl,--gc-sections", "-Wl,--icf=safe"] elif is_windows(): elif is_windows(): extra_cflags = [] extra_cflags = [] extra_cxxflags = [] extra_cxxflags = [] Loading Loading @@ -707,10 +712,10 @@ def main(): [cc] + extra_cflags, [cc] + extra_cflags, [cxx] + extra_cxxflags, [cxx] + extra_cxxflags, [asm] + extra_asmflags, [asm] + extra_asmflags, [ld] + extra_ldflags, ar, ar, ranlib, ranlib, libtool, libtool, extra_ldflags, llvm_source_dir, llvm_source_dir, stage1_dir, stage1_dir, package_name, package_name, Loading @@ -733,10 +738,10 @@ def main(): [cc] + extra_cflags2, [cc] + extra_cflags2, [cxx] + extra_cxxflags2, [cxx] + extra_cxxflags2, [asm] + extra_asmflags, [asm] + extra_asmflags, [ld] + extra_ldflags, ar, ar, ranlib, ranlib, libtool, libtool, extra_ldflags, llvm_source_dir, llvm_source_dir, stage2_dir, stage2_dir, package_name, package_name, Loading @@ -760,10 +765,10 @@ def main(): [cc] + extra_cflags2, [cc] + extra_cflags2, [cxx] + extra_cxxflags2, [cxx] + extra_cxxflags2, [asm] + extra_asmflags, [asm] + extra_asmflags, [ld] + extra_ldflags, ar, ar, ranlib, ranlib, libtool, libtool, extra_ldflags, llvm_source_dir, llvm_source_dir, stage3_dir, stage3_dir, package_name, package_name, Loading Loading @@ -803,10 +808,10 @@ def main(): [cc] + extra_cflags2, [cc] + extra_cflags2, [cxx] + extra_cxxflags2, [cxx] + extra_cxxflags2, [asm] + extra_asmflags, [asm] + extra_asmflags, [ld] + extra_ldflags, ar, ar, ranlib, ranlib, libtool, libtool, extra_ldflags, llvm_source_dir, llvm_source_dir, stage4_dir, stage4_dir, package_name, package_name, Loading build/build-clang/skip-stage-1-win64.json +0 −1 Original line number Original line Diff line number Diff line Loading @@ -3,6 +3,5 @@ "cc": "{MOZ_FETCHES_DIR}/clang/bin/clang-cl.exe", "cc": "{MOZ_FETCHES_DIR}/clang/bin/clang-cl.exe", "cxx": "{MOZ_FETCHES_DIR}/clang/bin/clang-cl.exe", "cxx": "{MOZ_FETCHES_DIR}/clang/bin/clang-cl.exe", "ml": "{MOZ_FETCHES_DIR}/clang/bin/clang-cl.exe", "ml": "{MOZ_FETCHES_DIR}/clang/bin/clang-cl.exe", "link": "{MOZ_FETCHES_DIR}/clang/bin/lld-link.exe", "lib": "{MOZ_FETCHES_DIR}/clang/bin/llvm-lib.exe" "lib": "{MOZ_FETCHES_DIR}/clang/bin/llvm-lib.exe" } } taskcluster/docker/toolchain-build/Dockerfile +1 −0 Original line number Original line Diff line number Diff line Loading @@ -20,6 +20,7 @@ RUN apt-get update && \ build-essential \ build-essential \ curl \ curl \ clang-11 \ clang-11 \ lld-11 \ cmake \ cmake \ flex \ flex \ gawk \ gawk \ Loading Loading
build/build-clang/build-clang.py +19 −14 Original line number Original line Diff line number Diff line Loading @@ -174,10 +174,10 @@ def build_one_stage( cc, cc, cxx, cxx, asm, asm, ld, ar, ar, ranlib, ranlib, libtool, libtool, ldflags, src_dir, src_dir, stage_dir, stage_dir, package_name, package_name, Loading @@ -198,7 +198,7 @@ def build_one_stage( def slashify_path(path): def slashify_path(path): return path.replace("\\", "/") return path.replace("\\", "/") def cmake_base_args(cc, cxx, asm, ld, ar, ranlib, libtool, inst_dir): def cmake_base_args(cc, cxx, asm, ar, ranlib, libtool, ldflags, inst_dir): machine_targets = targets if is_final_stage and targets else "X86" machine_targets = targets if is_final_stage and targets else "X86" cmake_args = [ cmake_args = [ Loading @@ -206,13 +206,12 @@ def build_one_stage( "-DCMAKE_C_COMPILER=%s" % slashify_path(cc[0]), "-DCMAKE_C_COMPILER=%s" % slashify_path(cc[0]), "-DCMAKE_CXX_COMPILER=%s" % slashify_path(cxx[0]), "-DCMAKE_CXX_COMPILER=%s" % slashify_path(cxx[0]), "-DCMAKE_ASM_COMPILER=%s" % slashify_path(asm[0]), "-DCMAKE_ASM_COMPILER=%s" % slashify_path(asm[0]), "-DCMAKE_LINKER=%s" % slashify_path(ld[0]), "-DCMAKE_AR=%s" % slashify_path(ar), "-DCMAKE_AR=%s" % slashify_path(ar), "-DCMAKE_C_FLAGS=%s" % " ".join(cc[1:]), "-DCMAKE_C_FLAGS=%s" % " ".join(cc[1:]), "-DCMAKE_CXX_FLAGS=%s" % " ".join(cxx[1:]), "-DCMAKE_CXX_FLAGS=%s" % " ".join(cxx[1:]), "-DCMAKE_ASM_FLAGS=%s" % " ".join(asm[1:]), "-DCMAKE_ASM_FLAGS=%s" % " ".join(asm[1:]), "-DCMAKE_EXE_LINKER_FLAGS=%s" % " ".join(ld[1:]), "-DCMAKE_EXE_LINKER_FLAGS=%s" % " ".join(ldflags), "-DCMAKE_SHARED_LINKER_FLAGS=%s" % " ".join(ld[1:]), "-DCMAKE_SHARED_LINKER_FLAGS=%s" % " ".join(ldflags), "-DCMAKE_BUILD_TYPE=%s" % build_type, "-DCMAKE_BUILD_TYPE=%s" % build_type, "-DCMAKE_INSTALL_PREFIX=%s" % inst_dir, "-DCMAKE_INSTALL_PREFIX=%s" % inst_dir, "-DLLVM_TARGETS_TO_BUILD=%s" % machine_targets, "-DLLVM_TARGETS_TO_BUILD=%s" % machine_targets, Loading @@ -221,14 +220,15 @@ def build_one_stage( "-DLLVM_ENABLE_BINDINGS=OFF", "-DLLVM_ENABLE_BINDINGS=OFF", "-DLLVM_ENABLE_CURL=OFF", "-DLLVM_ENABLE_CURL=OFF", "-DLLVM_INCLUDE_TESTS=OFF", "-DLLVM_INCLUDE_TESTS=OFF", "-DLLVM_ENABLE_LLD=ON", ] ] if "TASK_ID" in os.environ: if "TASK_ID" in os.environ: cmake_args += [ cmake_args += [ "-DCLANG_REPOSITORY_STRING=taskcluster-%s" % os.environ["TASK_ID"], "-DCLANG_REPOSITORY_STRING=taskcluster-%s" % os.environ["TASK_ID"], ] ] projects = ["clang"] projects = ["clang", "lld"] if is_final_stage: if is_final_stage: projects.extend(("clang-tools-extra", "lld")) projects.append("clang-tools-extra") else: else: cmake_args.append("-DLLVM_TOOL_LLI_BUILD=OFF") cmake_args.append("-DLLVM_TOOL_LLI_BUILD=OFF") Loading Loading @@ -304,7 +304,7 @@ def build_one_stage( return cmake_args return cmake_args cmake_args = [] cmake_args = [] cmake_args += cmake_base_args(cc, cxx, asm, ld, ar, ranlib, libtool, inst_dir) cmake_args += cmake_base_args(cc, cxx, asm, ar, ranlib, libtool, ldflags, inst_dir) cmake_args += [src_dir] cmake_args += [src_dir] build_package(build_dir, cmake_args) build_package(build_dir, cmake_args) Loading Loading @@ -593,7 +593,8 @@ def main(): cc = get_tool(config, "cc") cc = get_tool(config, "cc") cxx = get_tool(config, "cxx") cxx = get_tool(config, "cxx") asm = get_tool(config, "ml" if is_windows() else "as") asm = get_tool(config, "ml" if is_windows() else "as") ld = get_tool(config, "link" if is_windows() else "ld") # Not using lld here as default here because it's not in PATH. But clang # knows how to find it when they are installed alongside each others. ar = get_tool(config, "lib" if is_windows() else "ar") ar = get_tool(config, "lib" if is_windows() else "ar") ranlib = None if is_windows() else get_tool(config, "ranlib") ranlib = None if is_windows() else get_tool(config, "ranlib") libtool = None libtool = None Loading Loading @@ -647,7 +648,11 @@ def main(): # corresponding option to strip unused sections. We do it explicitly # corresponding option to strip unused sections. We do it explicitly # here. LLVM's build system is also picky about turning on ICF, so # here. LLVM's build system is also picky about turning on ICF, so # we do that explicitly here, too. # we do that explicitly here, too. extra_ldflags += ["-fuse-ld=gold", "-Wl,--gc-sections", "-Wl,--icf=safe"] # It's unfortunately required to specify the linker used here because # the linker flags are used in LLVM's configure step before # -DLLVM_ENABLE_LLD is actually processed. extra_ldflags += ["-fuse-ld=lld", "-Wl,--gc-sections", "-Wl,--icf=safe"] elif is_windows(): elif is_windows(): extra_cflags = [] extra_cflags = [] extra_cxxflags = [] extra_cxxflags = [] Loading Loading @@ -707,10 +712,10 @@ def main(): [cc] + extra_cflags, [cc] + extra_cflags, [cxx] + extra_cxxflags, [cxx] + extra_cxxflags, [asm] + extra_asmflags, [asm] + extra_asmflags, [ld] + extra_ldflags, ar, ar, ranlib, ranlib, libtool, libtool, extra_ldflags, llvm_source_dir, llvm_source_dir, stage1_dir, stage1_dir, package_name, package_name, Loading @@ -733,10 +738,10 @@ def main(): [cc] + extra_cflags2, [cc] + extra_cflags2, [cxx] + extra_cxxflags2, [cxx] + extra_cxxflags2, [asm] + extra_asmflags, [asm] + extra_asmflags, [ld] + extra_ldflags, ar, ar, ranlib, ranlib, libtool, libtool, extra_ldflags, llvm_source_dir, llvm_source_dir, stage2_dir, stage2_dir, package_name, package_name, Loading @@ -760,10 +765,10 @@ def main(): [cc] + extra_cflags2, [cc] + extra_cflags2, [cxx] + extra_cxxflags2, [cxx] + extra_cxxflags2, [asm] + extra_asmflags, [asm] + extra_asmflags, [ld] + extra_ldflags, ar, ar, ranlib, ranlib, libtool, libtool, extra_ldflags, llvm_source_dir, llvm_source_dir, stage3_dir, stage3_dir, package_name, package_name, Loading Loading @@ -803,10 +808,10 @@ def main(): [cc] + extra_cflags2, [cc] + extra_cflags2, [cxx] + extra_cxxflags2, [cxx] + extra_cxxflags2, [asm] + extra_asmflags, [asm] + extra_asmflags, [ld] + extra_ldflags, ar, ar, ranlib, ranlib, libtool, libtool, extra_ldflags, llvm_source_dir, llvm_source_dir, stage4_dir, stage4_dir, package_name, package_name, Loading
build/build-clang/skip-stage-1-win64.json +0 −1 Original line number Original line Diff line number Diff line Loading @@ -3,6 +3,5 @@ "cc": "{MOZ_FETCHES_DIR}/clang/bin/clang-cl.exe", "cc": "{MOZ_FETCHES_DIR}/clang/bin/clang-cl.exe", "cxx": "{MOZ_FETCHES_DIR}/clang/bin/clang-cl.exe", "cxx": "{MOZ_FETCHES_DIR}/clang/bin/clang-cl.exe", "ml": "{MOZ_FETCHES_DIR}/clang/bin/clang-cl.exe", "ml": "{MOZ_FETCHES_DIR}/clang/bin/clang-cl.exe", "link": "{MOZ_FETCHES_DIR}/clang/bin/lld-link.exe", "lib": "{MOZ_FETCHES_DIR}/clang/bin/llvm-lib.exe" "lib": "{MOZ_FETCHES_DIR}/clang/bin/llvm-lib.exe" } }
taskcluster/docker/toolchain-build/Dockerfile +1 −0 Original line number Original line Diff line number Diff line Loading @@ -20,6 +20,7 @@ RUN apt-get update && \ build-essential \ build-essential \ curl \ curl \ clang-11 \ clang-11 \ lld-11 \ cmake \ cmake \ flex \ flex \ gawk \ gawk \ Loading