| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
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
|
|
|
|
Implemented a new flag, `--with-debug-assertions` on compiletest to pass the stdlib debug
assertion status from bootstrap.
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
Remove asmjs
Fulfills [MCP 668](https://github.com/rust-lang/compiler-team/issues/668).
`asmjs-unknown-emscripten` does not work as-specified, and lacks essential upstream support for generating asm.js, so it should not exist at all.
|
|
|
|
Add `std::hash::{DefaultHasher, RandomState}` exports (needs FCP)
This implements rust-lang/libs-team#267 to move the libstd hasher types to `std::hash` where they belong, instead of `std::collections::hash_map`.
<details><summary>The below no longer applies, but is kept for clarity.</summary>
This is a small refactor for #27242, which moves the definitions of `RandomState` and `DefaultHasher` into `std::hash`, but in a way that won't be noticed in the public API.
I've opened rust-lang/libs-team#267 as a formal ACP to move these directly into the root of `std::hash`, but for now, they're at least separated out from the collections code in a way that will make moving that around easier.
I decided to simply copy the rustdoc for `std::hash` from `core::hash` since I think it would be ideal for the two to diverge longer-term, especially if the ACP is accepted. However, I would be willing to factor them out into a common markdown document if that's preferred.
</details>
|
|
Allow configuring the parent GitHub repository
The git integration in build_helper hardcoded `rust-lang/rust` as the parent GitHub repository, and `master` as the branch name. This works great for `rust-lang/rust`, but causes problems in downstream forks like Ferrocene whenever those functions are invoked (like `./x fmt`).
In `src/stage0.json` there was already a configuration key for the name of the nightly branch, but it wasn't used by build_helper. This PR adds the `github_repository` key to the file, and requires both values to be passed to build_helper whenever a git function is called. This will allow downstream forks to tweak the values.
|
|
|
|
This makes it more consistent with the `coverage-map` mode and the shared
`tests/coverage` test directory.
|
|
coverage: Unify `tests/coverage-map` and `tests/run-coverage` into `tests/coverage`
Ever since the introduction of the `coverage-map` suite, it's been awkward to have to manage two separate coverage test directories containing dozens of mostly-identical files.
However, those two suites were separate for good reasons. They have very different requirements (since only one of them requires actually running the test program), running only one suite is noticeably faster than running both, and having separate suites allows them to be blessed separately if desired. So while unifying them was an obvious idea, actually doing so was non-trivial.
---
Nevertheless, this PR finds a way to merge the two suites into one directory while retaining almost all of the developer-experience benefits of having two suites. This required non-trivial implementations of `Step`, but the end result works very smoothly.
---
The first 5 commits are a copy of #117340, which has been closed in favour of this PR.
|
|
When multiple test modes share the same test directory, this will allow them to
avoid interfering with each others' files and timestamps.
|
|
These multi-file tests were not copied over in #114843 because they weren't
working, but it turns out that they just need the correct crate-type.
|
|
This is a step towards being able to unify the two coverage test directories.
There are two tests that require adjustment:
- `overflow.rs` requires an explicit `-Coverflow-checks=yes`
- `sort_groups.rs` is sensitive to provably unused instantiations
|
|
|
|
|
|
|
|
|
|
The demangler was only needed by coverage tests, but those tests were migrated
into their own custom test mode in #112300.
This avoids having to build the demangler just for run-make tests. It will
still be built as needed by run-coverage tests or for other purposes.
|
|
|
|
The git integration in build_helper hardcoded `rust-lang/rust` as the
parent GitHub repository, and `master` as the branch name. This works
great for `rust-lang/rust`, but causes problems in downstream forks like
Ferrocene whenever those functions are invoked (like `./x fmt`).
In `src/stage0.json` there was already a configuration key for the name
of the nightly branch, but it wasn't used by build_helper. This commit
adds the `github_repository` key to the file, and requires both values
to be passed to build_helper whenever a git function is called. This
will allow downstream forks to tweak the values.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Bump bootstrap compiler to just-released beta
https://forge.rust-lang.org/release/process.html#master-bootstrap-update-t-2-day-tuesday
|
|
This use single quotes, because those aren't used in params,
while double quotes are and would be tougher to parse.
|
|
|
|
It is subsumed by `-Clinker-flavor=*-lld-cc -Clink-self-contained=+linker` options now
|
|
|
|
|
|
|
|
|
|
|
|
Enable ASAN/LSAN/TSAN for *-apple-ios-macabi
The -macabi targets are iOS running on MacOS, and they use the runtime libraries for MacOS, thus they have the same sanitizers available as the *-apple-darwin targets.
This is based on the work of https://github.com/rust-lang/rust/commit/aacf3213b142f074999429eab767ef7b53c3a1a5.
Closes #113935.
|
|
compiletest: Don't swallow some error messages.
This updates some error handling in compiletest to display the underlying error rather than discarding it. There have been cases where the lack of error information makes it difficult to understand what went wrong.
|
|
|
|
The -macabi targets are iOS running on MacOS, and they use the runtime
libraries for MacOS, thus they have the same sanitizers available as the
*-apple-darwin targets.
|
|
|
|
Make compiletest output truncation less disruptive
When the test output becomes too large, compiletest stops recording all of it. However:
- this can lead to invalid JSON, which then causes compiletest itself to throw further errors
- the note that output was truncated is in the middle of the output, with >100kb of text on each side; that makes it almost impossible to actually see that note in the terminal
So assuming that we do need to keep the output truncation, I propose that we only ever do a cut at the end, so that it is very clear by looking at the end of the log that truncation happened. I added a message at the beginning of the output as well. Also I added some logic to make it less likely that we'll cut things off in the middle of a JSON record. (I tested that successfully by reducing the output limit to something very low and running a few ui tests.) Furthermore I increased the max buffer size to 512KB; that's really not a lot of memory compared to how much RAM it takes to build rustc (it's ~25% more than the previous maximum HEAD+TAIL length). And finally, the information that things got truncated is now propagated to the higher levels, so that we can fail the test instead of comparing the truncated output with the reference.
Fixes https://github.com/rust-lang/rust/issues/115675
Fixes https://github.com/rust-lang/rust/issues/96229
Fixes https://github.com/rust-lang/rust/issues/94322
Fixes https://github.com/rust-lang/rust/issues/92211
|
|
tests: re-enable pretty-std-collections on macOS
Fixes #78665.
I made some small modifications to this test so that it would pass for me locally (though I was only able to test using lldb without built-in Rust support, but that seems to be the mode in which it would fail). I ran it a few hundred times with stage one and stage two to see if I could re-produce the spurious failures that were being reported in #78665 and couldn't. From the discussion in #78665, it seemed like this was related to Xcode versions and could be reproduced locally fairly easily. It's been a couple years since this was disabled so a lot has changed. If this starts failing spuriously again then we can disable it and I can look into that.
r? `@wesleywiser` (discussed in wg-debugging's triage meeting)
|
|
|
|
|
|
We compile each test file to LLVM IR assembly, and then pass that IR to a
dedicated program that can decode LLVM coverage maps and print them in a more
human-readable format. We can then check that output against known-good
snapshots.
This test suite has some advantages over the existing `run-coverage` tests:
- We can test coverage instrumentation without needing to run target binaries.
- We can observe subtle improvements/regressions in the underlying coverage
mappings that don't make a visible difference to coverage reports.
|
|
Newer lldb versions disable printing of persistent results by default,
but lots of rustc debuginfo tests rely on these being printed, so
re-enable this by defining an alias as suggested by the patch which
disabled persistent result printing in lldb.
Signed-off-by: David Wood <david@davidtw.co>
|