Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux timer api remove unnecessary double linkage to librt. #2271

Merged
merged 1 commit into from
Jul 6, 2021
Merged

linux timer api remove unnecessary double linkage to librt. #2271

merged 1 commit into from
Jul 6, 2021

Conversation

devnexen
Copy link
Contributor

@devnexen devnexen commented Jul 5, 2021

No description provided.

@rust-highfive
Copy link

r? @JohnTitor

(rust-highfive has picked a reviewer for you, use r? to override)

@JohnTitor
Copy link
Member

JohnTitor commented Jul 5, 2021

This won't link librt on musl, is it correct behavior? (Moreover, any build with the std also won't link librt but it seems fine?:

libc/src/unix/mod.rs

Lines 302 to 304 in 90aa0e3

} else if #[cfg(feature = "std")] {
// cargo build, don't pull in anything extra as the libstd dep
// already pulls in all libs.
)

@12101111
Copy link
Contributor

12101111 commented Jul 6, 2021

This won't link librt on musl, is it correct behavior? (Moreover, any build with the std also won't link librt but it seems fine?:

libc/src/unix/mod.rs

Lines 302 to 304 in 90aa0e3

} else if #[cfg(feature = "std")] {
// cargo build, don't pull in anything extra as the libstd dep
// already pulls in all libs.

)

librt.a of musl is empty file:

> cat /usr/lib/librt.a
!<arch>

And build of libc with std feature will pull std and a prebuilt libc with rustc-dep-of-std feature

https://github.com/rust-lang/rust/blob/72b0c7dfe9bcb55096d8b81a67e683730f1e3c15/library/std/Cargo.toml#L19

Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for clarifying! Then it should be fine. There're still some uses of name = "rt", I think they all also can be removed, right?
Anyway, this is good to go as-is, let's r+ :)

@JohnTitor
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Jul 6, 2021

📌 Commit d2b6eab has been approved by JohnTitor

@bors
Copy link
Contributor

bors commented Jul 6, 2021

⌛ Testing commit d2b6eab with merge f3b7e0e...

@bors
Copy link
Contributor

bors commented Jul 6, 2021

☀️ Test successful - checks-actions, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13
Approved by: JohnTitor
Pushing f3b7e0e to master...

@bors bors merged commit f3b7e0e into rust-lang:master Jul 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants