Skip to content

Commit 30bf081

Browse files
committed
Use cross-compile options for Linux targets
This commit addresses the issue of OPENBLAS_{CC,HOSTCC,FC} variables not being used when building for Linux targets in a cross-compile environment.
1 parent 0c500f7 commit 30bf081

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

openblas-build/src/build.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,13 @@ impl Configure {
359359
if let Some(target) = self.target.as_ref() {
360360
args.push(format!("TARGET={:?}", target))
361361
}
362+
363+
for name in ["CC", "FC", "HOSTCC"] {
364+
if let Ok(value) = std::env::var(format!("OPENBLAS_{}", name)) {
365+
args.push(format!("{}={}", name, value));
366+
}
367+
}
368+
362369
args
363370
}
364371

0 commit comments

Comments
 (0)