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

Parallel feature gives no benefit since jobserver requires libc #721

Closed
RCasatta opened this issue Sep 10, 2022 · 2 comments
Closed

Parallel feature gives no benefit since jobserver requires libc #721

RCasatta opened this issue Sep 10, 2022 · 2 comments

Comments

@RCasatta
Copy link

I wanted to share my experience in trying to improve rust-bitcoin crate build times.
I noticed secp256k1-sys native build script was taking a significant amount of time

image

And I noticed cc wasn't using the parallel feature, so I enabled it. This successfully shaved a second from secp256k1-sys build time, however, the overall build time is worst because now cc has now to wait libc to start building.

image

I wonder if it's possible for jobserver to avoid to depend on libc

@NobodyXu
Copy link
Collaborator

Though it's possible for cc to vendor jobserver since it only uses a subset of its API and already vendored windows-sys APIs and have function for making anonymous pipe on Unix and Windows.

Originally posted on rust-lang/jobserver-rs#44 (comment)

@NobodyXu
Copy link
Collaborator

NobodyXu commented Apr 8, 2024

libc does a lot of hard work of defining APIs for different targets based on cfg.

Since it only takes ~1s to compile, it doesn't worth the time to vendor it.

@NobodyXu NobodyXu closed this as not planned Won't fix, can't repro, duplicate, stale Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants