Skip to content

Commit 6caad99

Browse files
committed
add some more comments
1 parent 012d60d commit 6caad99

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

config.example.toml

+5-1
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,11 @@ changelog-seen = 2
329329
#profiler = false
330330

331331
# Use the optimized LLVM C intrinsics for `compiler_builtins`, rather than Rust intrinsics.
332-
# Requires the LLVM submodule to be managed by bootstrap (i.e. not external).
332+
# Requires the LLVM submodule to be managed by bootstrap (i.e. not external) so that `compiler-rt`
333+
# sources are available.
334+
#
335+
# Setting this to `false` generates slower code, but removes the requirement for a C toolchain in
336+
# order to run `x check`.
333337
#optimized-compiler-builtins = false
334338

335339
# Indicates whether the native libraries linked into Cargo will be statically

src/bootstrap/compile.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -354,11 +354,14 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
354354
// But, the user could still decide to manually use an in-tree submodule.
355355
//
356356
// Using system llvm is not supported.
357+
// FIXME: is that restriction really required? I don't *think* we need the LLVM used by
358+
// compiler-builtins to match the one linked to rustc, but there's a comment in its build
359+
// script that makes me nervous: https://github.com/rust-lang/compiler-builtins/blob/31ee4544dbe47903ce771270d6e3bea8654e9e50/build.rs#L575-L579
357360
builder.update_submodule(&Path::new("src").join("llvm-project"));
358361
let compiler_builtins_root = builder.src.join("src/llvm-project/compiler-rt");
359362
if !compiler_builtins_root.exists() || builder.is_system_llvm(target) {
360363
panic!(
361-
"needed LLVM sources available to build `compiler-rt`, but they weren't present; consider enabling `build.submodules = true`, disabling `optimized-compiler-builtins`, or unsetting `llvm-config`"
364+
"need LLVM sources available to build `compiler-rt`, but they weren't present; consider enabling `build.submodules = true`, disabling `optimized-compiler-builtins`, or unsetting `llvm-config`"
362365
);
363366
}
364367
// Note that `libprofiler_builtins/build.rs` also computes this so if

0 commit comments

Comments
 (0)