Skip to content

Commit e349394

Browse files
committed
add optional support for RANLIB
1 parent bce6f09 commit e349394

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
@@ -266,7 +266,7 @@ pub struct Deliverables {
266266
impl Configure {
267267
fn cross_compile_args(&self) -> Result<Vec<String>, Error> {
268268
let mut args = Vec::new();
269-
for name in &vec!["CC", "FC", "HOSTCC"] {
269+
for name in ["CC", "FC", "HOSTCC"] {
270270
if let Ok(value) = std::env::var(format!("OPENBLAS_{}", name)) {
271271
args.push(format!("{}={}", name, value));
272272
eprintln!("{}={}", name, value);
@@ -278,6 +278,13 @@ impl Configure {
278278
if !args.is_empty() && args.len() != 3 {
279279
return Err(Error::MissingCrossCompileInfo);
280280
}
281+
// optional flags
282+
for name in ["RANLIB"] {
283+
if let Ok(value) = std::env::var(format!("OPENBLAS_{}", name)) {
284+
args.push(format!("{}={}", name, value));
285+
eprintln!("{}={}", name, value);
286+
}
287+
}
281288
Ok(args)
282289
}
283290

0 commit comments

Comments
 (0)