mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
Only link librt on linux
This commit is contained in:
parent
ad5014bf4c
commit
b42e551285
@ -582,7 +582,14 @@ fn link_binary(sess: session::session,
|
||||
gcc_args += ["-lm", main];
|
||||
}
|
||||
|
||||
gcc_args += ["-lrustrt", "-lrt"];
|
||||
// On linux librt is an indirect dependency via rustrt,
|
||||
// and binutils 2.22+ won't add it automatically
|
||||
if sess.get_targ_cfg().os == session::os_linux {
|
||||
gcc_args += ["-lrt"];
|
||||
}
|
||||
|
||||
// Always want the runtime linked in
|
||||
gcc_args += ["-lrustrt"];
|
||||
|
||||
gcc_args += rpath::get_rpath_flags(sess, saved_out_filename);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user