about summary refs log tree commit diff
path: root/src/tools/run-make-support
AgeCommit message (Collapse)AuthorLines
2025-09-26split-dwarf: add documentation and test coverageAugie Fackler-0/+7
2025-09-05`run-make-support`: handle unavailable in-tree cargo under `run-make` test suiteJieyou Xu-6/+13
2025-09-02Revert introduction of `[workspace.dependencies]`.Nicholas Nethercote-2/+2
This was done in #145740 and #145947. It is causing problems for people using r-a on anything that uses the rustc-dev rustup package, e.g. Miri, clippy. This repository has lots of submodules and subtrees and various different projects are carved out of pieces of it. It seems like `[workspace.dependencies]` will just be more trouble than it's worth.
2025-08-28Add `serde_json` to `[workspace.dependencies]`.Nicholas Nethercote-1/+1
2025-08-28Add `libc` to `[workspace.dependencies]`.Nicholas Nethercote-1/+1
2025-08-13fix(compiler/rustc_codegen_llvm): apply `target-cpu` attributeStackOverflowExcept1on-1/+1
2025-08-13Fix pgo testsywxt-0/+6
2025-08-08Rollup merge of #144931 - dpaoliello:msvc-wholearchive, r=jieyouxuStuart Cook-8/+34
[win][arm64ec] Fix msvc-wholearchive for Arm64EC `msvc-wholearchive` was failing on Arm64EC Windows as it requires the `/MACHINE:ARM64EC` flag to be passed to the MSVC linker. This required splitting the `extra_c_flags` function into a new `extra_linker_flags` function as `/MACHINE:ARM64EC` is not a valid argument to be passed to the MSVC Compiler (instead, `/arm64EC` should be used).
2025-08-06run-make: Allow blessing snapshot files that don't exist yetZalathar-1/+10
This makes it possible to bless the snapshot files used by `diff()` in newly-created run-make tests, without having to create the files manually beforehand.
2025-08-04[win][arm64ec] Fix msvc-wholearchive for Arm64ECDaniel Paoliello-8/+34
2025-07-31add correct dynamic_lib_extension for aixCurtis D'Alves-0/+2
2025-07-31Fix linker-plugin-lto only doing thin ltoFlakebi-2/+39
When rust provides LLVM bitcode files to lld and the bitcode contains function summaries as used for thin lto, lld defaults to using thin lto. This prevents some optimizations that are only applied for fat lto. We solve this by not creating function summaries when fat lto is enabled. The bitcode for the module is just directly written out. An alternative solution would be to set the `ThinLTO=0` module flag to signal lld to do fat lto. The code in clang that sets this flag is here: https://github.com/llvm/llvm-project/blob/560149b5e3c891c64899e9912e29467a69dc3a4c/clang/lib/CodeGen/BackendUtil.cpp#L1150 The code in LLVM that queries the flag and defaults to thin lto if not set is here: https://github.com/llvm/llvm-project/blob/e258bca9505f35e0a22cb213a305eea9b76d11ea/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp#L4441-L4446
2025-07-21Fix run-make tests on musl hostsJens Reidel-1/+8
On musl hosts, we already set -Ctarget-feature=-crt-static and IS_MUSL_HOST=1 in compiletest. However, in order for the run-make tests to compile fine on musl hosts, we need to propagate this flag in our rustc invocations to ensure we can generate cdylibs. Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2025-07-15Rollup merge of #143837 - jieyouxu:symbol-apis, r=ChrisDentonSamuel Tardieu-25/+159
Adjust `run_make_support::symbols` helpers Massage the `symbols` helpers to fill out {match all, match any} x {substring match, exact match}: | | Substring match | Exact match | |-----------|----------------------------------------|-------------------------------| | Match any | `object_contains_any_symbol_substring` | `object_contains_any_symbol` | | Match all | `object_contains_all_symbol_substring` | `object_contains_all_symbols` | As I'd like to use `object_contains_all_symbols` for rust-lang/rust#143669. As part of this: - Rename `any_symbol_contains` to `object_contains_any_symbol_substring` for accuracy, as `any_symbol_contains` is actually "contains any matching substring". - Remove `with_symbol_iter`. Noticed while working on https://github.com/rust-lang/rust/pull/143669. r? ``@ChrisDenton`` (or compiler)
2025-07-13Adjust `run_make_support::symbols` helpersJieyou Xu-25/+159
Massage the `symbols` helpers to fill out {match all, match any} x {substring match, exact match}: | | Substring match | Exact match | |-----------|----------------------------------------|-------------------------------| | Match any | `object_contains_any_symbol_substring` | `object_contains_any_symbol` | | Match all | `object_contains_all_symbol_substring` | `object_contains_all_symbols` | As part of this, rename `any_symbol_contains` to `object_contains_any_symbol_substring` for accuracy.
2025-07-11Disambiguate between rustc vs std having debug assertionsJieyou Xu-3/+12
Additionally, `NO_DEBUG_ASSERTIONS` is set by CI that threads through to the `./configure` script, which is somewhat fragile and "spooky action at a distance". Instead, use env vars controlled by compiletest, whose debug assertion info comes from bootstrap.
2025-07-10Only provide `is_windows_msvc` to gate on windows-msvcJieyou Xu-34/+29
And not both `is_windows_msvc` and `is_msvc`.
2025-07-09Massage `lib.rs` so it can be rustfmt'dJieyou Xu-66/+42
Even if the formatting isn't strictly "better", it at least allows rustfmtting it automatically.
2025-07-09Sort and document `run-make-support` dependenciesJieyou Xu-4/+13
2025-07-09Bump `run-make-support` to Edition 2024Jieyou Xu-1/+1
2025-07-09Don't attempt to version `run-make-support`Jieyou Xu-1/+1
Purely internal test support library.
2025-07-09Remove `run-make-support` CHANGELOGJieyou Xu-83/+0
Hopelessly outdated, and this support library is purely internal.
2025-06-30Upgrade dependencies in run-make-supportTrevor Gross-5/+5
The main purpose of this is to upgrade `object` and `gimli`, which will allow us to drop outdated versions once backtrace also updates. The only semver breakage in `object`'s is in `elf::R_RISCV_GNU_*` and `pe::IMAGE_WEAK_EXTERN_*` constants, as well as Mach-O dyld, which don't appear to be used here. `gimli` is similar, there is only minor breakage related to dyld. These version upgrades were also done in the library. `bstr`, `similar`, and `regex` are also upgraded to the latest minor version here to match what the lockfile already uses. The `regex` comment about `memchr` version hasn't been relevant to this lockfile since e95d15a11519 ("Pin memchr to 2.5.0 in the library rather than rustc_ast") and is no longer relevant in the library lockfile either. Object Changelog: https://github.com/gimli-rs/object/blob/master/CHANGELOG.md#0370 Gimli changelog: https://github.com/gimli-rs/gimli/blob/master/CHANGELOG.md#0320
2025-06-23Enable reproducible-build-2 for WindowsDaniel Paoliello-1/+7
2025-06-22forward the bootstrap `runner` to `run-make`Folkert de Vries-1/+24
The runner was already forwarded to `compiletest`, this just passes it on to `run-make` and uses it in the `run` functions.
2025-06-18Enable `run-make-support` auto cross-compilation for `rustdoc` tooJieyou Xu-7/+32
2025-06-18Enable automatic cross-compilation in run-make testsJakub Beránek-7/+26
2025-05-09run-make-support: support "ejecting" the underlying std commandJieyou Xu-2/+20
In rare cases, the test may need access to the underlying `std::process::Command` (e.g. for non-trivial process spawning). Co-authored-by: Jesus Checa Hidalgo <jchecahi@redhat.com>
2025-05-07run-make-support: set rustc dylib path for cargo wrapperJesus Checa Hidalgo-1/+4
Some run-make tests invoke Cargo via run_make_support::cargo(), but fail to execute correctly when rustc is built without rpath. In these setups, runtime loading of rustc’s shared libraries fails unless the appropriate dynamic library path is set manually. This commit updates the cargo() wrapper to call set_host_compiler_dylib_path(), aligning its behavior with the existing rustc() wrapper: https://github.com/rust-lang/rust/blob/f76c7367c6363d33ddb5a93b5de0d158b2d827f6/src/tools/run-make-support/src/external_deps/rustc.rs#L39 This ensures that Cargo invocations during tests inherit the necessary dylib paths, avoiding errors related to missing shared libraries in rpath-less builds. Fixes part of #140738
2025-04-17run-make: drop `os_pipe` workaround now that `anonymous_pipe` is stable on betaJieyou Xu-6/+0
2025-04-12run-make-support: fix artifact name calculations for targetJieyou Xu-13/+40
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*.
2025-04-03Add a helper function for checking if LLD was used to `run-make-support`Jakub Beránek-0/+37
2025-04-02Drop `aux_build` rustc helpersJieyou Xu-15/+1
They provide very little value and makes it more confusing than is helpful.
2025-03-18reintroduce remote-test support in run-make testsPietro Albini-1/+14
The old Makefile-based infrastructure included support for executing binaries with remote-test-client if configured, but that didn't get ported to run_make_support as part of the rmake migration. This PR re-introduces back that support, with the same implementation (and limitations) of the original Makefile-based support.
2025-03-08Don't link against advapi32, except on win7.Steven Malis-10/+14
2025-03-07Temporarily depend on `os_pipe` in `run-make-support` and re-export it许杰友 Jieyou Xu (Joe)-0/+6
For `broken-pipe-no-ice` until std `anonymous_pipe` stabilizes.
2025-03-05Rollup merge of #136581 - jieyouxu:makefile-be-gone, r=Kobzol许杰友 Jieyou Xu (Joe)-108/+0
Retire the legacy `Makefile`-based `run-make` test infra The final piece of [porting run-make tests to use Rust #121876](https://github.com/rust-lang/rust/issues/121876). Closes #121876. Closes #40713. Closes #81791 (no longer using `wc`). Closes #56475 (no longer a problem in current form of that test; we don't ignore the test on `aarch64-unknown-linux-gnu`). ### Summary This PR removes the legacy `Makefile`-based `run-make` test infra which has served us well over the years. The legacy infra is no longer needed since we ported all of `Makefile`-based `run-make` tests to the new `rmake.rs` infra. Additionally, this PR: - Removes `tests/run-make/tools.mk` since no more `Makefile`-based tests remain. - Updates `tests/run-make/README.md` and rustc-dev-guide docs to remove mention about `Makefile`-based `run-make` tests - Update test suite requirements in rustc-dev-guide on Windows to no longer need MSYS2 (they should also now run successfully on native Windows MSVC). - Update `triagebot.toml` to stop backlinking to #121876. **Thanks to everyone who helped in this effort to modernize the `run-make` test infra and test suite!** r? bootstrap
2025-03-04Rollup merge of #137373 - Kobzol:tool-stage0-improve, r=jieyouxuJubilee-41/+18
Compile run-make-support and run-make tests with the bootstrap compiler It does not seem necessary to have to recompile run-make-support on changes to the local compiler/stdlib. This PR simplifies the implementation of a few tools, then switches rms to stage0 and also makes the handling of environment variables in run-make tests simpler. Best reviewed commit-by-commit. I can split it into multiple PRs if you want. Also tested that `COMPILETEST_FORCE_STAGE0=1 ./x test tests/run-make --stage 0` still works. Incredibly, it looks like it even passes more tests than on `master` :laughing: r? ``@jieyouxu``
2025-03-02run-make-support: remove outdated comments许杰友 Jieyou Xu (Joe)-108/+0
2025-03-01Compile run-make recipes using the stage0 compilerJakub Beránek-41/+18
2025-02-26Add new `Rustdoc::emit` method in `run-make-support`Guillaume Gomez-0/+7
2025-02-19Create a generic AVR target: avr-nonePatryk Wychowaniec-0/+7
This commit removes the `avr-unknown-gnu-atmega328` target and replaces it with a more generic `avr-none` variant that must be specialized with the `-C target-cpu` flag (e.g. `-C target-cpu=atmega328p`).
2025-02-13Make `-O` mean `-C opt-level=3`clubby789-1/+1
2025-02-01run-make-support: add some stable `rustc` flag helpers许杰友 Jieyou Xu (Joe)-0/+12
2025-02-01run-make-support: add `shallow_find_directories` helper许杰友 Jieyou Xu (Joe)-5/+22
2025-01-31run-make-support: add `object`-based symbol helpers许杰友 Jieyou Xu (Joe)-9/+25
- `dynamic_symbol_names` - `text_section_global_dynamic_symbol_names` - `global_undefined_dynamic_symbol_names` Also add some missing `#[track_caller]` attributes. Co-authored-by: binarycat <binarycat@envs.net>
2025-01-31run-make-support: add `is_windows_gnu` helper许杰友 Jieyou Xu (Joe)-1/+10
2025-01-31run-make-support: collapse re-export许杰友 Jieyou Xu (Joe)-2/+3
2025-01-31run-make-support: add `-Csymbol-mangling-version` and `-Cprefer-dynamic` ↵许杰友 Jieyou Xu (Joe)-0/+12
helpers to rustc Co-authored-by: binarycat <binarycat@envs.net>
2025-01-29run-make-support: improve docs for `assert_exit_code`许杰友 Jieyou Xu (Joe)-1/+5