-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Prevent rmake.rs
from using unstable features, and fix 3 run-make tests that currently do
#137537
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I think that we should do the same for run-make-support
(disable unstable features), but it's probably not trivial given it is now defined by a macro. Let me know once this is rebased after my PR is merged.
@rustbot label -S-blocked |
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. The rustc-dev-guide subtree was changed. If this PR only touches the dev guide consider submitting a PR directly to rust-lang/rustc-dev-guide otherwise thank you for updating the dev guide with your changes. |
TIP: you can start your PR title with the word "wipe" and then it wont be merged, that way you can ensure it isn't merged while its still based on top of another PR |
Fair. It's mostly a remark for myself though for the backlinks 😆 |
I briefly looked at this, doesn't seem worth it to add a special hack to the So only rebased, no functional changes. |
Thanks, looks good! You can r=me once CI is green. |
@bors r=Kobzol rollup=maybe |
Prevent `rmake.rs` from using unstable features, and fix 3 run-make tests that currently do Addresses (mostly) rust-lang#137532. Follow-up to rust-lang#137373. ### Summary - Fix 3 run-make tests that currently use unstable features: 1. `tests/run-make/issue-107495-archive-permissions/rmake.rs` uses `#![feature(rustc_private)]` for `libc` on `unix`, but `run_make_support` already exports `libc`, so just use that. 2. `tests/run-make/cross-lang-lto/rmake.rs` uses `#![feature(path_file_prefix)]` for convenience, replaced with similar filename prefix logic. 3. `tests/run-make/broken-pipe-no-ice/rmake.rs` uses `#![feature(anonymous_pipe)]` for anonymous pipes. This is more complicated[^race-condition], and I decided to temporarily introduce a dependency on [`os_pipe`] before std's `anonymous_pipe` library feature is stabilized[^pipe-stab]. I left a FIXME tracked by rust-lang#137532 to make the switch once `anonymous_pipe` stabilizes and reaches beta. - Use `RUSTC_BOOTSTRAP=-1` when building `rmake.rs` to have the stage 0 rustc reject any unstable features used in `rmake.rs`. - The requirement that `rmake.rs` may not use any unstable features is now documented in rustc-dev-guide. - This PR does not impose `RUSTC_BOOTSTRAP=-1` when building `run-make-support`, but I suppose we could. r? `@Kobzol` [`os_pipe`]: https://github.com/oconnor663/os_pipe.rs [^race-condition]: We can't just try to spawn `rustc` and immediate close the stderr handle because of race condition, as there's no guarantee `rustc` will not try to print to stderr before the handle gets closed. [^pipe-stab]: In-progress stabilization PR over at rust-lang#135822.
…kingjubilee Rollup of 12 pull requests Successful merges: - rust-lang#136667 (Revert vita's c_char back to i8) - rust-lang#136780 (std: move stdio to `sys`) - rust-lang#137107 (Override default `Write` methods for cursor-like types) - rust-lang#137363 (compiler: factor Windows x86-32 ABI impl into its own file) - rust-lang#137528 (Windows: Fix error in `fs::rename` on Windows 1607) - rust-lang#137537 (Prevent `rmake.rs` from using unstable features, and fix 3 run-make tests that currently do) - rust-lang#137777 (Specialize `OsString::push` and `OsString as From` for UTF-8) - rust-lang#137832 (Fix crash in BufReader::peek()) - rust-lang#137904 (Improve the generic MIR in the default `PartialOrd::le` and friends) - rust-lang#138115 (Suggest typo fix for static lifetime) - rust-lang#138125 (Simplify `printf` and shell format suggestions) - rust-lang#138129 (Stabilize const_char_classify, const_sockaddr_setters) r? `@ghost` `@rustbot` modify labels: rollup
This is already applied for rustc/std tools. This is needed to make `windows` crates avoid trying to depend on a generated `windows.0.xx.0.lib`.
For `broken-pipe-no-ice` until std `anonymous_pipe` stabilizes.
checksum = "5ffd2b0a5634335b135d5728d84c5e0fd726954b87111f7506a61c502280d982" | ||
dependencies = [ | ||
"libc", | ||
"windows-sys 0.59.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remark [RAW_DYLIB 1/2]: os_pipe
depends on windows-sys
which tries to link in windows.0.52.0.lib
unless you pass a --cfg windows_raw_dylib
. This is already what rustc / rustc tool cargo uses. I.e. the comment
// By default, windows-rs depends on a native library that doesn't get copied into the
// sysroot. Passing this cfg enables raw-dylib support instead, which makes the native
// library unnecessary. This can be removed when windows-rs enables raw-dylib
// unconditionally.
applies here.
if let Mode::Rustc | Mode::ToolRustc | Mode::ToolBootstrap = mode { | ||
rustflags.arg("--cfg=windows_raw_dylib"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remark [RAW_DYLIB 2/2]: here.
`rmake.rs` and `run-make-support` may *not* use any nightly/unstable features, | ||
as they must be compilable by a stage 0 rustc that may be a beta or even stable | ||
rustc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remark: adjusted this to also say that run-make-support
may not depend on nightly/unstable features.
Introducing @rustbot ready |
This passes on msvc locally, but let's try anyway. |
Prevent `rmake.rs` from using unstable features, and fix 3 run-make tests that currently do Addresses (mostly) rust-lang#137532. Follow-up to rust-lang#137373. ### Summary - Fix 3 run-make tests that currently use unstable features: 1. `tests/run-make/issue-107495-archive-permissions/rmake.rs` uses `#![feature(rustc_private)]` for `libc` on `unix`, but `run_make_support` already exports `libc`, so just use that. 2. `tests/run-make/cross-lang-lto/rmake.rs` uses `#![feature(path_file_prefix)]` for convenience, replaced with similar filename prefix logic. 3. `tests/run-make/broken-pipe-no-ice/rmake.rs` uses `#![feature(anonymous_pipe)]` for anonymous pipes. This is more complicated[^race-condition], and I decided to temporarily introduce a dependency on [`os_pipe`] before std's `anonymous_pipe` library feature is stabilized[^pipe-stab]. I left a FIXME tracked by rust-lang#137532 to make the switch once `anonymous_pipe` stabilizes and reaches beta. - Use `RUSTC_BOOTSTRAP=-1` when building `rmake.rs` to have the stage 0 rustc reject any unstable features used in `rmake.rs`. - The requirement that `rmake.rs` may not use any unstable features is now documented in rustc-dev-guide. - This PR does not impose `RUSTC_BOOTSTRAP=-1` when building `run-make-support`, but I suppose we could. r? `@Kobzol` try-job: x86_64-msvc-1 try-job: x86_64-mingw-1 [`os_pipe`]: https://github.com/oconnor663/os_pipe.rs [^race-condition]: We can't just try to spawn `rustc` and immediate close the stderr handle because of race condition, as there's no guarantee `rustc` will not try to print to stderr before the handle gets closed. [^pipe-stab]: In-progress stabilization PR over at rust-lang#135822.
You can r=me if the try job passes. |
☀️ Try build successful - checks-actions |
@bors r=Kobzol |
Rollup of 12 pull requests Successful merges: - rust-lang#137337 (Add verbatim linker to AIXLinker) - rust-lang#137363 (compiler: factor Windows x86-32 ABI impl into its own file) - rust-lang#137537 (Prevent `rmake.rs` from using unstable features, and fix 3 run-make tests that currently do) - rust-lang#137606 (add a "future" edition) - rust-lang#137957 (Remove i586-pc-windows-msvc) - rust-lang#138000 (atomic: clarify that failing conditional RMW operations are not 'writes') - rust-lang#138013 (Add post-merge analysis CI workflow) - rust-lang#138033 (rustdoc: Add attribute-related tests for rustdoc JSON.) - rust-lang#138137 (setTargetTriple now accepts Triple rather than string) - rust-lang#138173 (Delay bug for negative auto trait rather than ICEing) - rust-lang#138184 (Allow anyone to relabel `CI-spurious-*`) - rust-lang#138187 (remove clones) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#137537 - jieyouxu:daily-rmake, r=Kobzol Prevent `rmake.rs` from using unstable features, and fix 3 run-make tests that currently do Addresses (mostly) rust-lang#137532. Follow-up to rust-lang#137373. ### Summary - Fix 3 run-make tests that currently use unstable features: 1. `tests/run-make/issue-107495-archive-permissions/rmake.rs` uses `#![feature(rustc_private)]` for `libc` on `unix`, but `run_make_support` already exports `libc`, so just use that. 2. `tests/run-make/cross-lang-lto/rmake.rs` uses `#![feature(path_file_prefix)]` for convenience, replaced with similar filename prefix logic. 3. `tests/run-make/broken-pipe-no-ice/rmake.rs` uses `#![feature(anonymous_pipe)]` for anonymous pipes. This is more complicated[^race-condition], and I decided to temporarily introduce a dependency on [`os_pipe`] before std's `anonymous_pipe` library feature is stabilized[^pipe-stab]. I left a FIXME tracked by rust-lang#137532 to make the switch once `anonymous_pipe` stabilizes and reaches beta. - Use `RUSTC_BOOTSTRAP=-1` when building `rmake.rs` to have the stage 0 rustc reject any unstable features used in `rmake.rs`. - The requirement that `rmake.rs` may not use any unstable features is now documented in rustc-dev-guide. - This PR does not impose `RUSTC_BOOTSTRAP=-1` when building `run-make-support`, but I suppose we could. r? `@Kobzol` try-job: x86_64-msvc-1 try-job: x86_64-mingw-1 [`os_pipe`]: https://github.com/oconnor663/os_pipe.rs [^race-condition]: We can't just try to spawn `rustc` and immediate close the stderr handle because of race condition, as there's no guarantee `rustc` will not try to print to stderr before the handle gets closed. [^pipe-stab]: In-progress stabilization PR over at rust-lang#135822.
Addresses (mostly) #137532.
Follow-up to #137373.
Summary
Fix 3 run-make tests that currently use unstable features:
tests/run-make/issue-107495-archive-permissions/rmake.rs
uses#![feature(rustc_private)]
forlibc
onunix
, butrun_make_support
already exportslibc
, so just use that.tests/run-make/cross-lang-lto/rmake.rs
uses#![feature(path_file_prefix)]
for convenience, replaced with similar filename prefix logic.tests/run-make/broken-pipe-no-ice/rmake.rs
uses#![feature(anonymous_pipe)]
for anonymous pipes. This is more complicated1, and I decided to temporarily introduce a dependency onos_pipe
before std'sanonymous_pipe
library feature is stabilized2. I left a FIXME tracked by Preventrun-make
test recipes (rmake.rs
) from using *any* unstable features #137532 to make the switch onceanonymous_pipe
stabilizes and reaches beta.Use
RUSTC_BOOTSTRAP=-1
when buildingrmake.rs
to have the stage 0 rustc reject any unstable features used inrmake.rs
.The requirement that
rmake.rs
may not use any unstable features is now documented in rustc-dev-guide.This PR does not impose
RUSTC_BOOTSTRAP=-1
when buildingrun-make-support
, but I suppose we could.r? @Kobzol
try-job: x86_64-msvc-1
try-job: x86_64-mingw-1
Footnotes
We can't just try to spawn
rustc
and immediate close the stderr handle because of race condition, as there's no guaranteerustc
will not try to print to stderr before the handle gets closed. ↩In-progress stabilization PR over at https://github.com/rust-lang/rust/pull/135822. ↩