Skip to content

Commit 4e5c34b

Browse files
tmandryAmanieu
authored andcommitted
Handle move of cpu_model.c
This happened in https://github.com/llvm/llvm-project/pull/75635/files and shows up when building against a recent commit of LLVM.
1 parent 81e6404 commit 4e5c34b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

build.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,12 @@ mod c {
602602
build_aarch64_out_of_line_atomics_libraries(&src_dir, cfg);
603603

604604
// Some run-time CPU feature detection is necessary, as well.
605-
sources.extend(&[("__aarch64_have_lse_atomics", "cpu_model.c")]);
605+
let cpu_model_src = if src_dir.join("cpu_model.c").exists() {
606+
"cpu_model.c"
607+
} else {
608+
"cpu_model/aarch64.c"
609+
};
610+
sources.extend(&[("__aarch64_have_lse_atomics", cpu_model_src)]);
606611
}
607612

608613
let mut added_sources = HashSet::new();

0 commit comments

Comments
 (0)