Bug 1751839 - Don't build the gold linker plugin when not using a sysroot. r=firefox-build-system-reviewers,andi

Differential Revision: https://phabricator.services.mozilla.com/D136842
This commit is contained in:
Mike Hommey
2022-01-25 21:51:16 +00:00
parent 68ed0fd37b
commit 76ebb62b53

View File

@@ -276,9 +276,9 @@ def build_one_stage(
if not is_windows() and is_final_stage:
cmake_args += ["-DLLVM_ENABLE_LIBXML2=FORCE_ON"]
if is_linux() and not osx_cross_compile and is_final_stage:
cmake_args += ["-DLLVM_BINUTILS_INCDIR=/usr/include"]
sysroot = os.path.join(os.environ.get("MOZ_FETCHES_DIR", ""), "sysroot")
if os.path.exists(sysroot):
cmake_args += ["-DLLVM_BINUTILS_INCDIR=/usr/include"]
cmake_args += ["-DCMAKE_SYSROOT=%s" % sysroot]
# Work around the LLVM build system not building the i386 compiler-rt
# because it doesn't allow to use a sysroot for that during the cmake