Skip to content

Commit

Permalink
fetch submodule before checking llvm stamp
Browse files Browse the repository at this point in the history
Previously, we were checking the LLVM stamp before fetching the submodule
which leads to not being able to compile llvm on submodule updates.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
  • Loading branch information
onur-ozkan committed Mar 17, 2024
1 parent 1eb882e commit b168790
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/bootstrap/src/core/build_steps/llvm.rs
Expand Up @@ -259,6 +259,8 @@ impl Step for Llvm {

/// Compile LLVM for `target`.
fn run(self, builder: &Builder<'_>) -> LlvmResult {
builder.update_submodule(&Path::new("src").join("llvm-project"));

let target = self.target;
let target_native = if self.target.starts_with("riscv") {
// RISC-V target triples in Rust is not named the same as C compiler target triples.
Expand All @@ -279,7 +281,6 @@ impl Step for Llvm {
Err(m) => m,
};

builder.update_submodule(&Path::new("src").join("llvm-project"));
if builder.llvm_link_shared() && target.is_windows() {
panic!("shared linking to LLVM is not currently supported on {}", target.triple);
}
Expand Down

0 comments on commit b168790

Please sign in to comment.