Skip to content
/ rust Public
forked from rust-lang/rust

Commit a870bba

Browse files
committed
Add a warning when combining LLD with external LLVM config
1 parent 3c01dfe commit a870bba

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/bootstrap/src/core/build_steps/compile.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ impl Step for Std {
155155

156156
// When using `download-rustc`, we already have artifacts for the host available. Don't
157157
// recompile them.
158-
if builder.download_rustc() && builder.config.is_builder_target(target)
158+
if builder.download_rustc() && builder.config.is_host_target(target)
159159
// NOTE: the beta compiler may generate different artifacts than the downloaded compiler, so
160160
// its artifacts can't be reused.
161161
&& compiler.stage != 0

src/bootstrap/src/core/config/config.rs

+6
Original file line numberDiff line numberDiff line change
@@ -2397,6 +2397,12 @@ impl Config {
23972397
);
23982398
}
23992399

2400+
if config.lld_enabled && config.is_system_llvm(config.build) {
2401+
eprintln!(
2402+
"Warning: LLD is enabled when using external llvm-config. LLD will not be built and copied to the sysroot."
2403+
);
2404+
}
2405+
24002406
let default_std_features = BTreeSet::from([String::from("panic-unwind")]);
24012407
config.rust_std_features = std_features.unwrap_or(default_std_features);
24022408

0 commit comments

Comments
 (0)