Skip to content

Commit e402868

Browse files
committed
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 80ed5f8 commit e402868

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
@@ -601,7 +601,12 @@ mod c {
601601
build_aarch64_out_of_line_atomics_libraries(&src_dir, cfg);
602602

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

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

0 commit comments

Comments
 (0)