Skip to content

Commit

Permalink
Use cross-compile options for Linux targets
Browse files Browse the repository at this point in the history
This commit addresses the issue of OPENBLAS_{CC,HOSTCC,FC} variables not
being used when building for Linux targets in a cross-compile environment.
  • Loading branch information
gkobeaga committed Dec 13, 2023
1 parent 0c500f7 commit 30bf081
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions openblas-build/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,13 @@ impl Configure {
if let Some(target) = self.target.as_ref() {
args.push(format!("TARGET={:?}", target))
}

for name in ["CC", "FC", "HOSTCC"] {
if let Ok(value) = std::env::var(format!("OPENBLAS_{}", name)) {
args.push(format!("{}={}", name, value));
}
}

args
}

Expand Down

0 comments on commit 30bf081

Please sign in to comment.