File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -582,15 +582,16 @@ fn link_binary(sess: session::session,
582
582
gcc_args += [ "-lm" , main] ;
583
583
}
584
584
585
- // On linux librt is an indirect dependency via rustrt,
586
- // and binutils 2.22+ won't add it automatically
587
- if sess. get_targ_cfg ( ) . os == session:: os_linux {
588
- gcc_args += [ "-lrt" ] ;
589
- }
590
585
591
586
// Always want the runtime linked in
592
587
gcc_args += [ "-lrustrt" ] ;
593
588
589
+ // On linux librt and libdl are an indirect dependencies via rustrt,
590
+ // and binutils 2.22+ won't add them automatically
591
+ if sess. get_targ_cfg ( ) . os == session:: os_linux {
592
+ gcc_args += [ "-lrt" , "-ldl" ] ;
593
+ }
594
+
594
595
gcc_args += rpath:: get_rpath_flags ( sess, saved_out_filename) ;
595
596
596
597
log #fmt( "gcc link args: %s" , str:: connect ( gcc_args, " " ) ) ;
You can’t perform that action at this time.
0 commit comments