1
Fork 0

Rollup merge of #74252 - shepmaster:bootstrap-rust-destdir, r=Mark-Simulacrum

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.
This commit is contained in:
Manish Goregaokar 2020-07-14 13:19:26 -07:00 committed by GitHub
commit 1e74f28599
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -347,6 +347,11 @@ fn configure_cmake(
// LLVM and LLD builds can produce a lot of those and hit CI limits on log size.
cfg.define("CMAKE_INSTALL_MESSAGE", "LAZY");
// Do not allow the user's value of DESTDIR to influence where
// LLVM will install itself. LLVM must always be installed in our
// own build directories.
cfg.env("DESTDIR", "");
if builder.config.ninja {
cfg.generator("Ninja");
}