Skip to content

Commit 5061969

Browse files
authored
Rollup merge of #147406 - jchecahi:remove-needs-asm-support-explicit, r=cuviper
Remove needs-asm-support directive in tests with explicit targets The `needs-asm-support` directive checks whether the host architecture supports inline assembly, not the target architecture. For tests that explicitly specify a target via `--target` in their compile-flags, this directive is incorrect and unnecessary. These tests are cross-compiling to specific targets (like x86_64, arm, aarch64, riscv, etc.) that are already known to have stable asm support. The directive was causing these tests to be incorrectly skipped on hosts that don't support asm, even though the target does. Tests with explicit targets should rely on `needs-llvm-components` to ensure the appropriate backend is available, rather than checking host asm support.
2 parents 3c5e16e + 5aec2e7 commit 5061969

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/tests/directives.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,10 @@ Some examples of `X` in `ignore-X` or `only-X`:
163163
The following directives will check rustc build settings and target
164164
settings:
165165

166-
- `needs-asm-support` — ignores if it is running on a target that doesn't have
167-
stable support for `asm!`
166+
- `needs-asm-support` — ignores if the **host** architecture doesn't have
167+
stable support for `asm!`. For tests that cross-compile to explicit targets
168+
via `--target`, use `needs-llvm-components` instead to ensure the appropriate
169+
backend is available.
168170
- `needs-profiler-runtime` — ignores the test if the profiler runtime was not
169171
enabled for the target
170172
(`build.profiler = true` in rustc's `bootstrap.toml`)

0 commit comments

Comments
 (0)