MCPcopy Create free account
hub / github.com/Rust-GPU/rust-gpu / link_rlib

Function link_rlib

crates/rustc_codegen_spirv/src/link.rs:93–120  ·  view source on GitHub ↗
(sess: &Session, codegen_results: &CodegenResults, out_filename: &Path)

Source from the content-addressed store, hash-verified

91}
92
93fn link_rlib(sess: &Session, codegen_results: &CodegenResults, out_filename: &Path) {
94 let mut file_list = Vec::<&Path>::new();
95 for obj in codegen_results
96 .modules
97 .iter()
98 .filter_map(|m| m.object.as_ref())
99 {
100 file_list.push(obj);
101 }
102 for lib in codegen_results.crate_info.used_libraries.iter() {
103 if let NativeLibKind::Static {
104 bundle: None | Some(true),
105 ..
106 } = lib.kind
107 {
108 sess.err(format!(
109 "adding native library to rlib not supported yet: {}",
110 lib.name
111 ));
112 }
113 }
114
115 create_archive(
116 &file_list,
117 codegen_results.metadata.raw_data(),
118 out_filename,
119 );
120}
121
122fn link_exe(
123 sess: &Session,

Callers 1

linkFunction · 0.85

Calls 4

create_archiveFunction · 0.85
iterMethod · 0.80
errMethod · 0.80
as_refMethod · 0.45

Tested by

no test coverage detected