Skip to content

Commit

Permalink
build: support lib64 out directories
Browse files Browse the repository at this point in the history
Signed-off-by: Bill Roberts <[email protected]>
  • Loading branch information
billatarm authored and tgonzalezorlandoarm committed Jan 25, 2024
1 parent ea0499c commit b2072fb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions psa-crypto-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,10 @@ mod operations {
let mut mbed_lib_dir = compile_mbed_crypto()?;
let mut mbed_include_dir = mbed_lib_dir.clone();
mbed_lib_dir.push("lib");
if !mbed_lib_dir.as_path().exists() {
_ = mbed_lib_dir.pop();
mbed_lib_dir.push("lib64");
}
mbed_include_dir.push("include");

lib = mbed_lib_dir.to_str().unwrap().to_owned();
Expand Down Expand Up @@ -357,6 +361,11 @@ mod operations {
let mut mbed_lib_dir = compile_mbed_crypto()?;
let mut mbed_include_dir = mbed_lib_dir.clone();
mbed_lib_dir.push("lib");
if !mbed_lib_dir.as_path().exists() {
_ = mbed_lib_dir.pop();
mbed_lib_dir.push("lib64");
}

mbed_include_dir.push("include");
let main_lib = mbed_lib_dir.join("libmbedcrypto.a");

Expand Down Expand Up @@ -388,6 +397,7 @@ mod operations {
let (from, _) = &lib;
args.push(from.as_os_str());
}
println!("BILL: args: {:?}", args);
let output = std::process::Command::new("nm")
.args(args)
.output()
Expand Down

0 comments on commit b2072fb

Please sign in to comment.