Skip to content

Commit d2553df

Browse files
committed
add optional support for RANLIB
1 parent 66fb52b commit d2553df

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

openblas-build/src/build.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ pub struct Deliverables {
332332
impl Configure {
333333
fn cross_compile_args(&self) -> Result<Vec<String>, Error> {
334334
let mut args = Vec::new();
335-
for name in &vec!["CC", "FC", "HOSTCC"] {
335+
for name in ["CC", "FC", "HOSTCC"] {
336336
if let Ok(value) = std::env::var(format!("OPENBLAS_{}", name)) {
337337
args.push(format!("{}={}", name, value));
338338
eprintln!("{}={}", name, value);
@@ -344,6 +344,13 @@ impl Configure {
344344
if !args.is_empty() && args.len() != 3 {
345345
return Err(Error::MissingCrossCompileInfo);
346346
}
347+
// optional flags
348+
for name in ["RANLIB"] {
349+
if let Ok(value) = std::env::var(format!("OPENBLAS_{}", name)) {
350+
args.push(format!("{}={}", name, value));
351+
eprintln!("{}={}", name, value);
352+
}
353+
}
347354
Ok(args)
348355
}
349356

0 commit comments

Comments
 (0)