Add libraries needed for tracing

This is starting to get unwieldy.

Change-Id: If39ef87e9d3fab2eb5fae08e4db960afdeed00f0
diff --git a/src/package.rs b/src/package.rs
index d4cac4d..e5fcab4 100644
--- a/src/package.rs
+++ b/src/package.rs
@@ -4,10 +4,11 @@
 
 use crate::{
     sdk::{
-        amber_path, cmc_path, fuchsia_dir, package_manager_path, zircon_build_path, FuchsiaConfig,
-        TargetOptions,
+        amber_path, clang_base_path, cmc_path, fuchsia_dir, package_manager_path,
+        shared_libraries_path, zircon_build_path, FuchsiaConfig, TargetOptions,
     },
     utils::strip_binary,
+    get_triple_cpu,
 };
 use failure::{bail, format_err, Error, ResultExt};
 use serde_json::json;
@@ -81,8 +82,11 @@
     if verbose {
         println!("write_manifest_file: target = {:#?}", target);
     }
+    let triple = get_triple_cpu(target_options);
     let mut manifest = File::create(&target)?;
     let zircon_build = zircon_build_path(&target_options.config)?;
+    let shared_libraries_path = shared_libraries_path(target_options)?;
+    let shared_libraries_str = shared_libraries_path.to_string_lossy();
     let libc_path = format!(
         "{}/user-{}-clang.shlib/obj/system/ulib/c/libc.so",
         zircon_build.to_string_lossy(),
@@ -98,12 +102,44 @@
         zircon_build.to_string_lossy(),
         target_options.config.fuchsia_arch
     );
+    let libtraceengine_path = format!(
+        "{}/user-{}-clang.shlib/obj/system/ulib/trace-engine/libtrace-engine.so",
+        zircon_build.to_string_lossy(),
+        target_options.config.fuchsia_arch
+    );
+    let libasync_path = format!(
+        "{}/user-{}-clang.shlib/obj/system/ulib/async/libasync-default.so",
+        zircon_build.to_string_lossy(),
+        target_options.config.fuchsia_arch
+    );
+    let libcpp2_path = format!(
+        "{}/lib/{}-unknown-fuchsia/c++/libc++.so.2",
+        clang_base_path()?.to_string_lossy(),
+        triple,
+    );
+    let libcpp1abi_path = format!(
+        "{}/lib/{}-unknown-fuchsia/c++/libc++abi.so.1",
+        clang_base_path()?.to_string_lossy(),
+        triple,
+    );
+    let libunwind_path = format!(
+        "{}/lib/{}-unknown-fuchsia/c++/libunwind.so.1",
+        clang_base_path()?.to_string_lossy(),
+        triple,
+    );
+
     writeln!(
         manifest,
         r#"bin/{}={}
 lib/ld.so.1={}
 lib/libfdio.so={}
 lib/libsyslog.so={}
+lib/librust-trace-provider.so={}/librust-trace-provider.so
+lib/libtrace-engine.so={}
+lib/libasync-default.so={}
+lib/libc++.so.2={}
+lib/libc++abi.so.1={}
+lib/libunwind.so.1={}
 meta/package={}
 meta/{}.cmx={}
 "#,
@@ -112,6 +148,12 @@
         libc_path,
         fdio_path,
         libsyslog_path,
+        shared_libraries_str,
+        libtraceengine_path,
+        libasync_path,
+        libcpp2_path,
+        libcpp1abi_path,
+        libunwind_path,
         package_path.to_string_lossy(),
         package_name,
         cmx_path.to_string_lossy(),