Correct libc path for cross-compiled pm_build
The "pm_build" step was not using the proper libc location when cross
compiling. The libc location was previously hardcoded with "x64" in it.
Here is an example output of an error observed:
https://paste.googleplex.com/6385450127196160
Change-Id: Ibe78e25da26d5bfb7cfc91447f262c90c35bba1e
Reviewed-on: https://fuchsia-review.googlesource.com/c/fargo/+/514450
Reviewed-by: Rob Tsuk <robtsuk@google.com>
diff --git a/src/package.rs b/src/package.rs
index f3d4f62..51707c5 100644
--- a/src/package.rs
+++ b/src/package.rs
@@ -3,6 +3,7 @@
// found in the LICENSE file.
use crate::{
+ get_user_libc_path,
sdk::{
amber_path, cmc_path, fuchsia_dir, package_manager_path, shared_libraries_path,
FuchsiaConfig, TargetOptions,
@@ -176,7 +177,7 @@
let target_out_path_str = target_out_path.to_string_lossy();
let shared_lib_path = shared_libraries_path(target_options)?;
let shared_lib_str = shared_lib_path.to_string_lossy();
- let libc_path = format!("{}/user.libc_x64/libc.so", target_out_path_str);
+ let libc_path = format!("{}/libc.so", get_user_libc_path(target_options)?.to_string_lossy());
let fdio_path = format!("{}/libfdio.so", shared_lib_str);
let libsyslog_path = format!("{}/libsyslog.so", shared_lib_str);
let libtraceengine_path = format!("{}/libtrace-engine.so", shared_lib_str);