Skip to content

Commit

Permalink
Add more descriptions to why submodules are required.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Jul 27, 2024
1 parent 5ebb821 commit f76ab64
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
8 changes: 5 additions & 3 deletions src/bootstrap/src/core/build_steps/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ impl Step for Std {
if builder.config.profiler {
builder.require_and_update_submodule(
"src/llvm-project",
Some("The `build.profiler` config option requires compiler-rt sources."),
Some(
"The `build.profiler` config option requires `compiler-rt` sources from LLVM.",
),
);
}

Expand Down Expand Up @@ -462,8 +464,8 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
builder.require_and_update_submodule(
"src/llvm-project",
Some(
"need LLVM sources available to build `compiler-rt`, but they weren't present; \
consider disabling `optimized-compiler-builtins`",
"The `build.optimized-compiler-builtins` config option \
requires `compiler-rt` sources from LLVM.",
),
);
let compiler_builtins_root = builder.src.join("src/llvm-project/compiler-rt");
Expand Down
10 changes: 8 additions & 2 deletions src/bootstrap/src/core/build_steps/llvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,10 @@ impl Step for CrtBeginEnd {

/// Build crtbegin.o/crtend.o for musl target.
fn run(self, builder: &Builder<'_>) -> Self::Output {
builder.require_and_update_submodule("src/llvm-project", None);
builder.require_and_update_submodule(
"src/llvm-project",
Some("The LLVM sources are required for the CRT from `compiler-rt`."),
);

let out_dir = builder.native_dir(self.target).join("crt");

Expand Down Expand Up @@ -1270,7 +1273,10 @@ impl Step for Libunwind {

/// Build libunwind.a
fn run(self, builder: &Builder<'_>) -> Self::Output {
builder.require_and_update_submodule("src/llvm-project", None);
builder.require_and_update_submodule(
"src/llvm-project",
Some("The LLVM sources are required for libunwind."),
);

if builder.config.dry_run() {
return PathBuf::new();
Expand Down

0 comments on commit f76ab64

Please sign in to comment.