Skip to content

Commit 1d4379f

Browse files
authored
Merge pull request #89 from maparent/apple-silicon
homebrew directory depends on architecture. Include libomp libs
2 parents 8e674b9 + 3adddf9 commit 1d4379f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

openblas-src/build.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,13 @@ fn windows_msvc_system() {
5252
/// export CPPFLAGS="-I/usr/local/opt/openblas/include"
5353
/// ```
5454
fn macos_system() {
55-
println!("cargo:rustc-link-search=/usr/local/opt/openblas/lib");
55+
if cfg!(target_arch = "aarch64") {
56+
println!("cargo:rustc-link-search=/opt/homebrew/opt/openblas/lib");
57+
println!("cargo:rustc-link-search=/opt/homebrew/opt/libomp/lib");
58+
} else {
59+
println!("cargo:rustc-link-search=/usr/local/homebrew/opt/openblas/lib");
60+
println!("cargo:rustc-link-search=/usr/local/homebrew/opt/libomp/lib");
61+
}
5662
}
5763

5864
fn main() {

0 commit comments

Comments
 (0)