@@ -1122,13 +1122,6 @@ fn link_args(sess: Session,
11221122 args. push ( ~"-Wl , --allow-multiple-definition") ;
11231123 }
11241124
1125- // Stack growth requires statically linking a __morestack function
1126- args. push ( ~"-lmorestack") ;
1127- // compiler-rt contains implementations of low-level LLVM helpers
1128- // It should go before platform and user libraries, so it has first dibs
1129- // at resolving symbols that also appear in libgcc.
1130- args. push ( ~"-lcompiler-rt") ;
1131-
11321125 add_local_native_libraries ( & mut args, sess) ;
11331126 add_upstream_rust_crates ( & mut args, sess, dylib, tmpdir) ;
11341127 add_upstream_native_libraries ( & mut args, sess) ;
@@ -1163,6 +1156,13 @@ fn link_args(sess: Session,
11631156 args. push_all ( rpath:: get_rpath_flags ( sess, out_filename) ) ;
11641157 }
11651158
1159+ // Stack growth requires statically linking a __morestack function
1160+ args. push ( ~"-lmorestack") ;
1161+ // compiler-rt contains implementations of low-level LLVM helpers
1162+ // It should go before platform and user libraries, so it has first dibs
1163+ // at resolving symbols that also appear in libgcc.
1164+ args. push ( ~"-lcompiler-rt") ;
1165+
11661166 // Finally add all the linker arguments provided on the command line along
11671167 // with any #[link_args] attributes found inside the crate
11681168 args. push_all ( sess. opts . cg . link_args ) ;
0 commit comments