Skip to content

Commit 04a02ff

Browse files
committed
librustc: Respect no-compiler-rt target option for static libs as well.
1 parent 27ea11e commit 04a02ff

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/librustc/back/link.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,9 @@ fn link_staticlib(sess: &Session, obj_filename: &Path, out_filename: &Path) {
728728
if sess.target.target.options.morestack {
729729
ab.add_native_library("morestack").unwrap();
730730
}
731-
ab.add_native_library("compiler-rt").unwrap();
731+
if !sess.target.target.options.no_compiler_rt {
732+
ab.add_native_library("compiler-rt").unwrap();
733+
}
732734

733735
let crates = sess.cstore.get_used_crates(cstore::RequireStatic);
734736
let mut all_native_libs = vec![];

0 commit comments

Comments
 (0)