Bug 1730078 - Only use the sysroot for the final stage of the clang compilation. r=firefox-build-system-reviewers,andi

Using the sysroot with GCC requires some unnecessary complication, and
we don't really care if the first stages are not using the sysroot.

Differential Revision: https://phabricator.services.mozilla.com/D125161
This commit is contained in:
Mike Hommey
2021-09-15 02:39:53 +00:00
parent 639cb95294
commit 060f092d99

View File

@@ -281,7 +281,7 @@ def build_one_stage(
]
if build_wasm:
cmake_args += ["-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly"]
if is_linux() and not osx_cross_compile:
if is_linux() and not osx_cross_compile and is_final_stage:
cmake_args += ["-DLLVM_BINUTILS_INCDIR=/usr/include"]
cmake_args += ["-DLLVM_ENABLE_LIBXML2=FORCE_ON"]
sysroot = os.path.join(os.environ.get("MOZ_FETCHES_DIR", ""), "sysroot")