Skip to content

Commit

Permalink
librustc: Respect no-compiler-rt target option for static libs as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
luqmana committed Nov 12, 2014
1 parent 27ea11e commit 04a02ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/librustc/back/link.rs
Expand Up @@ -728,7 +728,9 @@ fn link_staticlib(sess: &Session, obj_filename: &Path, out_filename: &Path) {
if sess.target.target.options.morestack {
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 mut all_native_libs = vec![];
Expand Down

0 comments on commit 04a02ff

Please sign in to comment.