-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
Introduce a //@ needs-crate-type
compiletest directive
#139469
Introduce a //@ needs-crate-type
compiletest directive
#139469
Conversation
Uhh maybe let me roll someone else, oli has a ton of PRs in review queue |
…ss, r=<try> [WIP] run-make-support: Calculate artifact names for target platform, not host platform > [!CAUTION] > > Stacked on top of rust-lang#139469. This was implemented incorrectly during the porting process, where we relied on std consts. However, `run-make-support` is a host-only library, which meant that these artifact names were for the *host* and not the *target*. Helps with rust-lang#138066. r? `@Kobzol` try-job: armhf-gnu try-job: test-various try-job: x86_64-msvc-1 try-job: i686-msvc-1 try-job: x86_64-mingw-1 try-job: aarch64-apple try-job: x86_64-apple-1
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.
r=me when unblocked
5dabccb
to
3dbb4fd
Compare
@bors try |
…type, r=<try> Introduce a `//@ needs-crate-type` compiletest directive > [!CAUTION] > > Blocked on bootstrap compiler bump rust-lang#139279 so I can get rid of the `cfg(not(bootstrap))` on the compiletest directive unit test. The `//@ needs-crate-type: $crate_types...` directive takes a comma-separated list of crate types that the target platform must support in order for the test to be run. This allows the test writer to semantically convey that the ignore condition is based on target crate type needs, instead of using a general purpose `//@ ignore-$target` directive (often without comment). Fixes rust-lang#132309. ### Example ```rs //@ needs-crate-type: dylib (ignored on e.g. wasm32-unknown-unknown) //@ compile-flags: --crate-type=dylib fn foo() {} ``` ### Review advice - Best reviewed commit-by-commit. - The impl is not very clean, I briefly attempted to clean up the directive handling but found that more invasive changes are needed, so I'd like to not block on the cleanup for now. try-job: test-various try-job: armhf-gnu
…ss, r=<try> [WIP] run-make-support: Calculate artifact names for target platform, not host platform > [!CAUTION] > > Stacked on top of rust-lang#139469. This was implemented incorrectly during the porting process, where we relied on std consts. However, `run-make-support` is a host-only library, which meant that these artifact names were for the *host* and not the *target*. Helps with rust-lang#138066. r? `@Kobzol` try-job: armhf-gnu try-job: test-various try-job: x86_64-msvc-1 try-job: i686-msvc-1 try-job: x86_64-mingw-1 try-job: aarch64-apple try-job: x86_64-apple-1
☀️ Try build successful - checks-actions |
…ss, r=<try> [WIP] run-make-support: Calculate artifact names for target platform, not host platform > [!CAUTION] > > Stacked on top of rust-lang#139469. This was implemented incorrectly during the porting process, where we relied on std consts. However, `run-make-support` is a host-only library, which meant that these artifact names were for the *host* and not the *target*. Helps with rust-lang#138066. r? `@Kobzol` try-job: armhf-gnu try-job: test-various try-job: x86_64-msvc-1 try-job: i686-msvc-1 try-job: x86_64-mingw-1 try-job: aarch64-apple try-job: x86_64-apple-1
…ss, r=<try> [WIP] run-make-support: Calculate artifact names for target platform, not host platform > [!CAUTION] > > Stacked on top of rust-lang#139469. This was implemented incorrectly during the porting process, where we relied on std consts. However, `run-make-support` is a host-only library, which meant that these artifact names were for the *host* and not the *target*. Helps with rust-lang#138066. r? `@Kobzol` try-job: armhf-gnu try-job: test-various try-job: x86_64-msvc-1 try-job: i686-msvc-1 try-job: x86_64-mingw-1 try-job: aarch64-apple try-job: x86_64-apple-1
The `//@ needs-crate-type: $crate_types...` directive takes a comma-separated list of crate types that the target platform must support in order for the test to be run.
…directives Not all existing tests are converted, I only updated ones that I can easily find via directive comments.
3dbb4fd
to
c615d10
Compare
Bootstrap compiler bump was merged earlier, removed |
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. |
Rollup of 12 pull requests Successful merges: - rust-lang#137447 (add `core::intrinsics::simd::{simd_extract_dyn, simd_insert_dyn}`) - rust-lang#138182 (rustc_target: update x86_win64 to match the documented calling convention for f128) - rust-lang#138682 (Allow drivers to supply a list of extra symbols to intern) - rust-lang#138904 (Test linking and running `no_std` binaries) - rust-lang#138998 (Don't suggest the use of `impl Trait` in closure parameter) - rust-lang#139447 (doc changes: debug assertions -> overflow checks) - rust-lang#139469 (Introduce a `//@ needs-crate-type` compiletest directive) - rust-lang#139564 (Deeply normalize obligations in `BestObligation` folder) - rust-lang#139574 (bootstrap: improve `channel` handling) - rust-lang#139600 (Update `compiler-builtins` to 0.1.153) - rust-lang#139641 (Allow parenthesis around inferred array lengths) - rust-lang#139654 (Improve `AssocItem::descr`.) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#139469 - jieyouxu:compiletest-supports-crate-type, r=onur-ozkan Introduce a `//@ needs-crate-type` compiletest directive The `//@ needs-crate-type: $crate_types...` directive takes a comma-separated list of crate types that the target platform must support in order for the test to be run. This allows the test writer to semantically convey that the ignore condition is based on target crate type needs, instead of using a general purpose `//@ ignore-$target` directive (often without comment). Fixes rust-lang#132309. ### Example ```rs //@ needs-crate-type: dylib (ignored on e.g. wasm32-unknown-unknown) //@ compile-flags: --crate-type=dylib fn foo() {} ``` ### Review advice - Best reviewed commit-by-commit. - The impl is not very clean, I briefly attempted to clean up the directive handling but found that more invasive changes are needed, so I'd like to not block on the cleanup for now. try-job: test-various try-job: armhf-gnu
…ss, r=<try> [WIP] run-make-support: Calculate artifact names for target platform, not host platform > [!CAUTION] > > Stacked on top of rust-lang#139469. This was implemented incorrectly during the porting process, where we relied on std consts. However, `run-make-support` is a host-only library, which meant that these artifact names were for the *host* and not the *target*. Helps with rust-lang#138066. r? `@Kobzol` try-job: armhf-gnu try-job: test-various try-job: x86_64-msvc-1 try-job: i686-msvc-1 try-job: x86_64-mingw-1 try-job: aarch64-apple try-job: x86_64-apple-1
The
//@ needs-crate-type: $crate_types...
directive takes a comma-separated list of crate types that the target platform must support in order for the test to be run. This allows the test writer to semantically convey that the ignore condition is based on target crate type needs, instead of using a general purpose//@ ignore-$target
directive (often without comment).Fixes #132309.
Example
Review advice
try-job: test-various
try-job: armhf-gnu