| Age | Commit message (Collapse) | Author | Lines |
|
Add a new `wasm32-wasip1` target to rustc
This commit adds a new target called `wasm32-wasip1` to rustc. This new target is explained in these two MCPs:
* https://github.com/rust-lang/compiler-team/issues/607
* https://github.com/rust-lang/compiler-team/issues/695
In short, the previous `wasm32-wasi` target is going to be renamed to `wasm32-wasip1` to better live alongside the [new `wasm32-wasip2` target](https://github.com/rust-lang/rust/pull/119616). This new target is added alongside the `wasm32-wasi` target and has the exact same definition as the previous target. This PR is effectively a rename of `wasm32-wasi` to `wasm32-wasip1`. Note, however, that as explained in rust-lang/compiler-team#695 the previous `wasm32-wasi` target is not being removed at this time. This change will reach stable Rust before even a warning about the rename will be printed. At this time this change is just the start where a new target is introduced and users can start migrating if they support only Nightly for example.
|
|
On tests that specify `--color=always` emit SVG file with stderr output
Leverage `anstyle-svg`, as `cargo` does now, to emit `.svg` files instead of `.stderr` files for tests that explicitly enable color output. This will make reviewing changes to the graphical output of tests much more human friendly.
<img src="https://raw.githubusercontent.com/rust-lang/rust/b4bdb56f86e136ca63bf71dca3034200c6c25900/tests/ui/error-emitter/highlighting.svg">
|
|
Leverage `anstyle-svg`, as `cargo` does now, to emit `.svg` files
instead of `.stderr` files for tests that explicitly enable color
output. This will make reviewing changes to the graphical output of
tests much more human friendly.
|
|
This commit adds a new target called `wasm32-wasip1` to rustc.
This new target is explained in these two MCPs:
* https://github.com/rust-lang/compiler-team/issues/607
* https://github.com/rust-lang/compiler-team/issues/695
In short, the previous `wasm32-wasi` target is going to be renamed to
`wasm32-wasip1` to better live alongside the [new
`wasm32-wasip2` target](https://github.com/rust-lang/rust/pull/119616).
This new target is added alongside the `wasm32-wasi` target and has the
exact same definition as the previous target. This PR is effectively a
rename of `wasm32-wasi` to `wasm32-wasip1`. Note, however, that
as explained in rust-lang/compiler-team#695 the previous `wasm32-wasi`
target is not being removed at this time. This change will reach stable
Rust before even a warning about the rename will be printed. At this
time this change is just the start where a new target is introduced and
users can start migrating if they support only Nightly for example.
|
|
Adds initial support for DataFlowSanitizer to the Rust compiler. It
currently supports `-Zsanitizer-dataflow-abilist`. Additional options
for it can be passed to LLVM command line argument processor via LLVM
arguments using `llvm-args` codegen option (e.g.,
`-Cllvm-args=-dfsan-combine-pointer-labels-on-load=false`).
|
|
|
|
Allow tests to specify a `//@ filecheck-flags:` header
This allows individual codegen/assembly/mir-opt tests to pass extra flags to the LLVM `filecheck` tool as needed.
---
The original motivation was noticing that `tests/run-make/instrument-coverage` was very close to being an ordinary codegen test, except that it needs some extra logic to set up platform-specific variables to be passed into filecheck.
I then saw the comment in `verify_with_filecheck` indicating that a `filecheck-flags` header might be useful for other purposes as well.
|
|
|
|
Any flags specified here will be passed to LLVM's `filecheck` tool, in tests
that use that tool.
|
|
This removes a version check for LLVM >=13, and specifies prefixes as a series
of independent `--check-prefix` flags instead of a single `--check-prefixes`.
|
|
|
|
|
|
Consistently refer to a test's `revision` instead of `cfg`
Compiletest allows a test file to specify multiple “revisions” (`//@ revisions: foo bar`), with each revision running as a separate test, and having the ability to define revision-specific headers (`//`@[foo]` ignore-blah`) and revision-specific code (`#[cfg(foo)]`).
The code that implements this feature sometimes uses the term “cfg” instead of “revision”. This results in two confusingly-different names for the same concept, one of which is ambiguous with other kinds of configuration (such as compiletest's own config).
This PR replaces those occurrences of `cfg` with `revision`, so that one name is used consistently.
|
|
compiletest: support auxiliaries with auxiliaries
To test behaviour that depends on the extern options of intermediate crates, compiletest auxiliaries must have their own auxiliaries.
Auxiliary compilation previously did not trigger compilation of any auxiliaries in the auxiliary's headers. In addition, those auxiliaries would need to be in an `auxiliary/auxiliary` directory, which is unnecessary and makes some crate graphs harder to write tests for, such as when A depends on B and C, and B depends on C.
For a test `tests/ui/$path/root.rs`, with the following crate graph:
```
root
|-- grandparent
`-- parent
`-- grandparent
```
then the intermediate outputs from compiletest will be:
```
build/$target/test/ui/$path/
|-- auxiliary
| |-- libgrandparent.dylib
| |-- libparent.dylib
| |-- grandparent
| | |-- grandparent.err
| | `-- grandparent.out
| `-- parent
| |-- parent.err
| `-- parent.out
|-- libroot.rmeta
|-- root.err
`-- root.out
```
|
|
To test behaviour that depends on the extern options of intermediate
crates, compiletest auxiliaries must have their own auxiliaries.
Auxiliary compilation previously did not trigger compilation of any
auxiliaries in the auxiliary's headers. In addition, those auxiliaries
would need to be in an `auxiliary/auxiliary` directory, which is
unnecessary and makes some crate graphs harder to write tests for,
such as when A depends on B and C, and B depends on C.
For a test `tests/ui/$path/root.rs`, with the following crate graph:
```
root
|-- grandparent
`-- parent
`-- grandparent
```
then the intermediate outputs from compiletest will be:
```
build/$target/test/ui/$path/
|-- auxiliary
| |-- libgrandparent.dylib
| |-- libparent.dylib
| |-- grandparent
| | |-- grandparent.err
| | `-- grandparent.out
| `-- parent
| |-- parent.err
| `-- parent.out
|-- libroot.rmeta
|-- root.err
`-- root.out
```
Signed-off-by: David Wood <david@davidtw.co>
|
|
|
|
Compiletest code sometimes refers to a test's revision as its `cfg`. This
results in two different names for the same thing, one of which is ambiguous
with other kinds of configuration (such as compiletest's own config).
This patch replaces those occurrences of `cfg` with `revision`.
|
|
|
|
.fixed file exists
|
|
Move the extra directives for `Mode::CoverageRun` into `iter_header`
When these extra directives were ported over as part of #112300, it made sense to introduce `iter_header_extra` and pass them in as an extra argument.
But now that #120881 has added a `mode` parameter to `iter_header` for its own purposes, it's slightly simpler to move the coverage special-case code directly into `iter_header` as well. This lets us get rid of `iter_header_extra`.
|
|
bump some deps
First commit dedupes darling* crates and remove one more syn 1.* dep
Second one bumps windows crate to 0.52
|
|
|
|
When these extra directives were ported over as part of #112300, it made sense
to introduce `iter_header_extra` and pass them in as an extra argument.
But now that #120881 has added a `mode` parameter to `iter_header` for its own
purposes, it's slightly simpler to move the coverage special-case code directly
into `iter_header` as well. This lets us get rid of `iter_header_extra`.
|
|
|
|
|
|
|
|
compiletest: few naive improvements
Tested on `python x.py --stage=1 t tests/ui/borrowck/ --force-rerun`, see individual commits.
Wall time didn't improved :-) .
|
|
|
|
|
|
|
|
keeping order of inserted Paths having high cost on hot path, collect into HashSet instead and sort afterward.
from 1,858,963,938 to 1,448,975,825 I refs.
|
|
Also add tests for min-system-llvm-version.
|
|
Headers WAY less than 1kb anyway, so this can be improved more?
before
==18725== Total: 429,769,246 bytes in 957,259 blocks
==18725== At t-gmax: 8,058,316 bytes in 3,502 blocks
==18725== At t-end: 3,045,261 bytes in 1,097 blocks
==18725== Reads: 431,872,599 bytes
==18725== Writes: 214,738,653 bytes
after
==49344== Total: 201,418,575 bytes in 957,174 blocks
==49344== At t-gmax: 7,937,250 bytes in 3,310 blocks
==49344== At t-end: 3,035,637 bytes in 1,076 blocks
==49344== Reads: 431,607,448 bytes
==49344== Writes: 210,731,540 bytes
|
|
before:
==8812== Total: 2,374,977,159 bytes in 6,840,026 blocks
==8812== At t-gmax: 8,090,486 bytes in 3,389 blocks
==8812== At t-end: 3,185,454 bytes in 757 blocks
==8812== Reads: 1,873,472,286 bytes
==8812== Writes: 1,249,411,589 bytes
==11212== I refs: 6,370,244,180
after:
==18725== Total: 429,769,246 bytes in 957,259 blocks
==18725== At t-gmax: 8,058,316 bytes in 3,502 blocks
==18725== At t-end: 3,045,261 bytes in 1,097 blocks
==18725== Reads: 431,872,599 bytes
==18725== Writes: 214,738,653 bytes
==20839== I refs: 1,873,010,089
|
|
|
|
mir-opt and custom target fixes
From https://github.com/rust-lang/rust/issues/115642#issuecomment-1879589022
> > Could you please test the last two commits from https://github.com/onur-ozkan/rust/commits/panic-abort-mir-opt when you have the time? The first commit should resolve the error of using the nightly flag with a stable compiler, and the second one should resolve the custom target issue.
> I tested with the two commits and the errors of using nightly flag and custom target specs were not seen.
Testing was completed for the test suites like ui, run-pass-valgrind, coverage, mir-opt, codegen, assembly, incremental.
Fixes #115642
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
The code for anonymizing line numbers in coverage reports now supports the
slightly different line number syntax used by branch regions.
|
|
|
|
|
|
Normally, each test in `tests/coverage` is automatically run in both
`coverage-map` mode and `coverage-run` mode.
This new family of directives allows an individual test to specify that it
should not be run in a particular mode.
|
|
|
|
Switch from using `//~ERROR` annotations with `--error-format` to `error-pattern`
Fixes #118752
As noticed by ```@jyn514``` while working on a patch, tests failed due to `//~ERROR` annotations used in combination with the older `--error-format` which is now `error-pattern`.
|
|
`error-pattern`
Resolves Issue #118752
|
|
|
|
|
|
|
|
Add thinlto support to codegen, assembly and coverage tests
Using `--emit=llvm-ir` with thinlto usually result in multiple IR files.
Resolve test case failure issue reported in #113923.
|
|
|
|
r=wesleywiser
utilize stdlib debug assertion status in compiletest
Implemented a new flag `--with-debug-assertions` on compiletest to pass the stdlib debug assertion status from bootstrap.
Resolves #115171
|