Skip to content

Commit b2072fb

Browse files
billatarmtgonzalezorlandoarm
authored andcommitted
build: support lib64 out directories
Signed-off-by: Bill Roberts <bill.roberts@arm.com>
1 parent ea0499c commit b2072fb

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

psa-crypto-sys/build.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,10 @@ mod operations {
308308
let mut mbed_lib_dir = compile_mbed_crypto()?;
309309
let mut mbed_include_dir = mbed_lib_dir.clone();
310310
mbed_lib_dir.push("lib");
311+
if !mbed_lib_dir.as_path().exists() {
312+
_ = mbed_lib_dir.pop();
313+
mbed_lib_dir.push("lib64");
314+
}
311315
mbed_include_dir.push("include");
312316

313317
lib = mbed_lib_dir.to_str().unwrap().to_owned();
@@ -357,6 +361,11 @@ mod operations {
357361
let mut mbed_lib_dir = compile_mbed_crypto()?;
358362
let mut mbed_include_dir = mbed_lib_dir.clone();
359363
mbed_lib_dir.push("lib");
364+
if !mbed_lib_dir.as_path().exists() {
365+
_ = mbed_lib_dir.pop();
366+
mbed_lib_dir.push("lib64");
367+
}
368+
360369
mbed_include_dir.push("include");
361370
let main_lib = mbed_lib_dir.join("libmbedcrypto.a");
362371

@@ -388,6 +397,7 @@ mod operations {
388397
let (from, _) = &lib;
389398
args.push(from.as_os_str());
390399
}
400+
println!("BILL: args: {:?}", args);
391401
let output = std::process::Command::new("nm")
392402
.args(args)
393403
.output()

0 commit comments

Comments
 (0)