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 authored and Amanieu committed Jan 28, 2024
1 parent 81e6404 commit 4e5c34b
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 @@ -602,7 +602,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 4e5c34b

Please sign in to comment.