Skip to content

Commit 3fcfbc8

Browse files
committed
Support prebuilt binaries for MacOS on arm64
1 parent f13becf commit 3fcfbc8

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tensorflow-sys/build.rs

+7-5
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,13 @@ fn main() {
6565
Err(_) => false,
6666
};
6767

68-
let target_os = target_os();
69-
if !force_src
70-
&& target_arch() == "x86_64"
71-
&& (target_os == "linux" || target_os == "macos" || target_os == "windows")
72-
{
68+
let prebuilt_supported = match (&target_arch() as &str, &target_os() as &str) {
69+
("x86_64", "linux") => true,
70+
("x86_64", "windows") => true,
71+
("arm64", "macos") => true,
72+
_ => false,
73+
};
74+
if !force_src && prebuilt_supported {
7375
install_prebuilt();
7476
} else {
7577
build_from_src();

0 commit comments

Comments
 (0)