Skip to content

Commit 9741fbd

Browse files
committed
Don't allow DESTDIR to influence LLVM builds
When running a command like `DESTDIR=foo x.py install` in a completely clean build directory, this will cause LLVM to be installed into `DESTDIR`, which then causes the build to fail later when it attempts to *use* those LLVM files.
1 parent 9d09331 commit 9741fbd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/bootstrap/native.rs

+5
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,11 @@ fn configure_cmake(
347347
// LLVM and LLD builds can produce a lot of those and hit CI limits on log size.
348348
cfg.define("CMAKE_INSTALL_MESSAGE", "LAZY");
349349

350+
// Do not allow the user's value of DESTDIR to influence where
351+
// LLVM will install itself. LLVM must always be installed in our
352+
// own build directories.
353+
cfg.env("DESTDIR", "");
354+
350355
if builder.config.ninja {
351356
cfg.generator("Ninja");
352357
}

0 commit comments

Comments
 (0)