-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Set LIBC_CHECK_CFG=1
when building Rust code in bootstrap
#108898
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
This is interesting to me - maybe a missing feature in Cargo? It seems common that you may want to patch a dependency (e.g., to switch to an as-yet unreleased version) without putting it into the workspace. Might be worth a bug report upstream. @bors r+ for this in the meantime though. |
Whoops, "part of the workspace" was the wrong way to say it. The problem is that it's not recognized as an external dependency, so |
Sure, but I guess my point is that I think it should be possible to patch/vendor sources without treating things as internal. For example, building from a source tarball with vendored sources should work without needing this. So I think there's still a disconnect of some kind here. |
IIRC, overriding a dependency as |
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#108754 (Retry `pred_known_to_hold_modulo_regions` with fulfillment if ambiguous) - rust-lang#108759 (1.41.1 supported 32-bit Apple targets) - rust-lang#108839 (Canonicalize root var when making response from new solver) - rust-lang#108856 (Remove DropAndReplace terminator) - rust-lang#108882 (Tweak E0740) - rust-lang#108898 (Set `LIBC_CHECK_CFG=1` when building Rust code in bootstrap) - rust-lang#108911 (Improve rustdoc-gui/tester.js code a bit) - rust-lang#108916 (Remove an unused return value in `rustc_hir_typeck`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#108754 (Retry `pred_known_to_hold_modulo_regions` with fulfillment if ambiguous) - rust-lang#108759 (1.41.1 supported 32-bit Apple targets) - rust-lang#108839 (Canonicalize root var when making response from new solver) - rust-lang#108856 (Remove DropAndReplace terminator) - rust-lang#108882 (Tweak E0740) - rust-lang#108898 (Set `LIBC_CHECK_CFG=1` when building Rust code in bootstrap) - rust-lang#108911 (Improve rustdoc-gui/tester.js code a bit) - rust-lang#108916 (Remove an unused return value in `rustc_hir_typeck`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Downstream forks of the Rust compiler might want to use a custom
libc
to add support for targets that are not yet available upstream. Adding a patch to replacelibc
with a custom one would cause compilation errors though, because Cargo would interpret the customlibc
as part of the workspace, and apply the check-cfg lints on it.Since rust-lang/libc#3037, the
libc
build script emits check-cfg flags only when theLIBC_CHECK_CFG
environment variable is set, so this PR allows the use of customlibc
s.