Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
873d4682c7d285540b8f28bfe637006cef8918a6
0462e8f7e51f20692b02d68efee68bb28a6f4457
10 changes: 8 additions & 2 deletions src/tests/compiletest.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,14 +311,20 @@ For example, `./x test tests/debuginfo -- --debugger gdb` will only test GDB com

### Codegen tests

The tests in [`tests/codegen-llvm`] test LLVM code generation. They compile the test
with the `--emit=llvm-ir` flag to emit LLVM IR. They then run the LLVM
The tests in [`tests/codegen-llvm`] test LLVM code generation. They compile the
test with the `--emit=llvm-ir` flag to emit LLVM IR. They then run the LLVM
[FileCheck] tool. The test is annotated with various `// CHECK` comments to
check the generated code. See the [FileCheck] documentation for a tutorial and
more information.

See also the [assembly tests](#assembly-tests) for a similar set of tests.

By default, codegen tests will have `//@ needs-target-std` *implied* (that the
target needs to support std), *unless* the `#![no_std]`/`#![no_core]` attribute
was specified in the test source. You can override this behavior and explicitly
write `//@ needs-target-std` to only run the test when target supports std, even
if the test is `#![no_std]`/`#![no_core]`.

If you need to work with `#![no_std]` cross-compiling tests, consult the
[`minicore` test auxiliary](./minicore.md) chapter.

Expand Down
2 changes: 2 additions & 0 deletions src/tests/directives.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ The following directives will check rustc build settings and target settings:
on `wasm32-unknown-unknown` target because the target does not support the
`proc-macro` crate type.
- `needs-target-std` — ignores if target platform does not have std support.
- See also [`#![no_std]`/`#![no_core]` and implied `needs-target-std` for
codegen tests](./compiletest.md#codegen-tests).
- `ignore-backends` — ignores the listed backends, separated by whitespace characters.
Please note
that this directive can be overriden with the `--bypass-ignore-backends=[BACKEND]` command line
Expand Down
Loading