Skip to content

Commit 32cb975

Browse files
authored
Merge pull request #564 from tmandry/cpu-model-moved
Handle move of cpu_model.c
2 parents 81e6404 + 4e5c34b commit 32cb975

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)