Skip to content

Commit

Permalink
add optional support for RANLIB
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-kfed committed Jan 21, 2024
1 parent 66fb52b commit d2553df
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion openblas-build/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ pub struct Deliverables {
impl Configure {
fn cross_compile_args(&self) -> Result<Vec<String>, Error> {
let mut args = Vec::new();
for name in &vec!["CC", "FC", "HOSTCC"] {
for name in ["CC", "FC", "HOSTCC"] {
if let Ok(value) = std::env::var(format!("OPENBLAS_{}", name)) {
args.push(format!("{}={}", name, value));
eprintln!("{}={}", name, value);
Expand All @@ -344,6 +344,13 @@ impl Configure {
if !args.is_empty() && args.len() != 3 {
return Err(Error::MissingCrossCompileInfo);
}
// optional flags
for name in ["RANLIB"] {
if let Ok(value) = std::env::var(format!("OPENBLAS_{}", name)) {
args.push(format!("{}={}", name, value));
eprintln!("{}={}", name, value);
}
}
Ok(args)
}

Expand Down

0 comments on commit d2553df

Please sign in to comment.