Bug 1748056 - Build libc++ in Windows clang for real. r=firefox-build-system-reviewers,andi

Differential Revision: https://phabricator.services.mozilla.com/D137256
This commit is contained in:
Mike Hommey
2022-02-01 00:51:57 +00:00
parent 964c4b3d6a
commit e02dbc2fc8

View File

@@ -251,7 +251,6 @@ def build_one_stage(
"-DCMAKE_INSTALL_PREFIX=%s" % inst_dir,
"-DLLVM_TARGETS_TO_BUILD=%s" % machine_targets,
"-DLLVM_ENABLE_ASSERTIONS=%s" % ("ON" if assertions else "OFF"),
"-DLLVM_TOOL_LIBCXX_BUILD=%s" % ("ON" if build_libcxx else "OFF"),
"-DLLVM_ENABLE_BINDINGS=OFF",
"-DLLVM_ENABLE_CURL=OFF",
]
@@ -259,6 +258,17 @@ def build_one_stage(
cmake_args += [
"-DCLANG_REPOSITORY_STRING=taskcluster-%s" % os.environ["TASK_ID"],
]
# 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
# the same name as the static library. libc++abi is not necessary on
# Windows anyways.
"-DLLVM_TOOL_LIBCXXABI_BUILD=%s" % ("OFF" if is_windows() else "ON"),
]
if not is_final_stage:
cmake_args += [
"-DLLVM_ENABLE_PROJECTS=clang;compiler-rt",