librustc: Respect no-compiler-rt target option for static libs as well.

This commit is contained in:
Luqman Aden 2014-11-11 20:23:32 -05:00
parent 27ea11eda8
commit 04a02ffb94

View file

@ -728,7 +728,9 @@ fn link_staticlib(sess: &Session, obj_filename: &Path, out_filename: &Path) {
if sess.target.target.options.morestack { if sess.target.target.options.morestack {
ab.add_native_library("morestack").unwrap(); ab.add_native_library("morestack").unwrap();
} }
ab.add_native_library("compiler-rt").unwrap(); if !sess.target.target.options.no_compiler_rt {
ab.add_native_library("compiler-rt").unwrap();
}
let crates = sess.cstore.get_used_crates(cstore::RequireStatic); let crates = sess.cstore.get_used_crates(cstore::RequireStatic);
let mut all_native_libs = vec![]; let mut all_native_libs = vec![];