-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Support inheriting jobserver when using cargo run #12597
Copy link
Copy link
Closed
Labels
A-jobserverArea: jobserver, concurrency, parallelismArea: jobserver, concurrency, parallelismC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-runS-needs-team-inputStatus: Needs input from team on whether/how to proceed.Status: Needs input from team on whether/how to proceed.
Metadata
Metadata
Assignees
Labels
A-jobserverArea: jobserver, concurrency, parallelismArea: jobserver, concurrency, parallelismC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-runS-needs-team-inputStatus: Needs input from team on whether/how to proceed.Status: Needs input from team on whether/how to proceed.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Problem
Sometimes commands run through
cargo runactually perform build actions for a larger build system.For example in #10511 (comment) the scenario is running something like
cargo run -p binding_generatorwhich generates headers to be used during the build later.And in rust-lang/rust#113730 (comment) cargo-miri is set as
target.runnerand runs as a part ofcargo run(and calls build tools like cargo and rustc recursively).Proposed Solution
In all cases like these cargo shouldn't close its jobserver file descriptors (or other handles), but pass them to the tool being run instead.
I think doing this under an options would be fine.
The default for such option can be decided upon later (probably kept being false, which is equivalent to the current behavior).
Notes
No response