Skip to content

Commit

Permalink
Handle move of cpu_model.c
Browse files Browse the repository at this point in the history
This happened in https://github.com/llvm/llvm-project/pull/75635/files
and shows up when building against a recent commit of LLVM.
  • Loading branch information
tmandry committed Jan 5, 2024
1 parent 80ed5f8 commit e402868
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,12 @@ mod c {
build_aarch64_out_of_line_atomics_libraries(&src_dir, cfg);

// Some run-time CPU feature detection is necessary, as well.
sources.extend(&[("__aarch64_have_lse_atomics", "cpu_model.c")]);
let cpu_model_src = if src_dir.join("cpu_model.c").exists() {
"cpu_model.c"
} else {
"cpu_model/aarch64.c"
};
sources.extend(&[("__aarch64_have_lse_atomics", cpu_model_src)]);
}

let mut added_sources = HashSet::new();
Expand Down

0 comments on commit e402868

Please sign in to comment.