Include swiftrt.o in binary
This commit is contained in:
parent
3402b05893
commit
3b88b82584
7
build.rs
7
build.rs
|
@ -10,6 +10,12 @@ fn main() {
|
|||
target.paths.runtime_library_paths.iter().for_each(|path| {
|
||||
println!("cargo:rustc-link-arg=-Wl,-rpath={}", path);
|
||||
});
|
||||
|
||||
let arch = std::env::var("CARGO_CFG_TARGET_ARCH").unwrap();
|
||||
println!(
|
||||
"cargo:rustc-link-arg={}/linux/{}/swiftrt.o",
|
||||
&target.paths.runtime_resource_path, arch
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,6 +29,7 @@ pub struct SwiftTargetInfo {
|
|||
#[serde(rename_all = "camelCase")]
|
||||
pub struct SwiftPaths {
|
||||
pub runtime_library_paths: Vec<String>,
|
||||
pub runtime_resource_path: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
|
|
Loading…
Reference in New Issue