about summary refs log tree commit diff
path: root/tests/run-make
AgeCommit message (Collapse)AuthorLines
2025-07-19Rollup merge of #144108 - CaiWeiran:run-make_test, r=jieyouxuMatthias Krüger-0/+1
Ignore tests/run-make/link-eh-frame-terminator/rmake.rs when cross-compiling The test tests/run-make/link-eh-frame-terminator/rmake.rs fails to link when cross-compiling. Therefore, it should be ignored in cross-compilation environments. See [commit a27bdea](https://github.com/rust-lang/rust/commit/a27bdea4b7b5107ea912659813418445d9e46ba4) and [commit 2beccc4](https://github.com/rust-lang/rust/commit/2beccc4d8e5066a42e6623d91e7991870d36feb2) for reference.
2025-07-19Rollup merge of #142444 - KMJ-007:autodiff-codegen-test, r=ZuseZ4Matthias Krüger-0/+1302
adding run-make test to autodiff r? `@ZuseZ4`
2025-07-18Ignore tests/run-make/link-eh-frame-terminator/rmake.rs when cross-compilingCaiweiran-0/+1
2025-07-18Rollup merge of #143846 - usamoi:gc, r=bjorn3Matthias Krüger-12/+14
pass --gc-sections if -Zexport-executable-symbols is enabled and improve tests Exported symbols are added as GC roots in linking, so `--gc-sections` won't hurt `-Zexport-executable-symbols`. Fixes the run-make test to work on Linux. Enable the ui test on more targets. cc rust-lang/rust#84161
2025-07-18Rollup merge of #143719 - xizheyin:142812-1, r=jieyouxuMatthias Krüger-0/+96
Emit warning when there is no space between `-o` and arg Closes rust-lang/rust#142812 `getopt` doesn't seem to have an API to check this, so we have to check the args manually. r? compiler
2025-07-18Rollup merge of #142300 - jieyouxu:exp-partial-revert-141576, r=WaffleLapkinMatthias Krüger-7/+11
Disable `tests/run-make/mte-ffi` because no CI runners have MTE extensions enabled This PR disables the `tests/run-make/mte-ffi` run-make test because it is (1) broken, and (2) no CI runners have suitable MTE extensions enabled to run it correctly. This test being broken is tracked by https://github.com/rust-lang/rust/issues/141600. The first commit also reverts `mte-ffi` changes introduced in rust-lang/rust#141576, as those fixes potentially changes the meaning of the test. cc ```````@dheaton-arm``````` (as this test was introduced in https://github.com/rust-lang/rust/pull/128384) ### Context In https://github.com/rust-lang/rust/pull/141576 when converting PR CI runners from x86_64 to aarch64 runners, it was noticed that this test failed on `aarch64-gnu-llvm-19-1` but not `aarch64-gnu`. It turns out that: - `aarch64-gnu-llvm-19-1` - Uses `gcc version 14.2.0 (Ubuntu 14.2.0-4ubuntu2)` - Based on `lscpu` output, the hardware that was used for this runner does not have MTE enabled. - `aarch64-gnu` - Uses `gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)` - Based on `lscpu` output, the hardware that was used for this runner does not have MTE enabled. Based on [this comment](https://github.com/rust-lang/rust/pull/141576#issuecomment-2964179035), it seems like the test *requires* hardware with MTE extensions enabled to run properly (on ARMv8.5 or higher). Furthermore, I believe this test does indeed have mismatched pointer type issues, i.e. ``` bar_string.c: In function ‘main’: bar_string.c:36:9: error: assignment to ‘char *’ from incompatible pointer type ‘unsigned int *’ [-Wincompatible-pointer-types] 36 | ptr = (unsigned int *)((uintptr_t)ptr | 0x1fl << 56); | ^ ``` Which is only exposed by `aarch64-gnu-llvm-19-1` because `aarch64-gnu-llvm-19-1` uses **gcc 14.2.0** whereas `aarch64-gnu` uses **gcc 11.14.0**. ### Details <details> <summary>aarch64-gnu-llvm-19-1</summary> ``` gcc_version: Using built-in specs. COLLECT_GCC=aarch64-linux-gnu-gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/aarch64-linux-gnu/14/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none OFFLOAD_TARGET_DEFAULT=1 Target: aarch64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 14.2.0-4ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-14/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2,rust --prefix=/usr --with-gcc-major-version-only --program-suffix=-14 --program-prefix=aarch64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/libexec --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-libstdcxx-backtrace --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-offload-targets=nvptx-none=/build/gcc-14-T7YiXd/gcc-14-14.2.0/debian/tmp-nvptx/usr --enable-offload-defaulted --without-cuda-driver --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 14.2.0 (Ubuntu 14.2.0-4ubuntu2) lscpu: Architecture: aarch64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Vendor ID: ARM Model name: Neoverse-N2 Model: 0 Thread(s) per core: 1 Core(s) per socket: 4 Socket(s): 1 Stepping: r0p0 BogoMIPS: 2000.00 Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 L1d cache: 256 KiB (4 instances) L1i cache: 256 KiB (4 instances) L2 cache: 4 MiB (4 instances) L3 cache: 128 MiB (1 instance) NUMA node(s): 1 NUMA node0 CPU(s): 0-3 Vulnerability Gather data sampling: Not affected Vulnerability Itlb multihit: Not affected Vulnerability L1tf: Not affected Vulnerability Mds: Not affected Vulnerability Meltdown: Not affected Vulnerability Mmio stale data: Not affected Vulnerability Reg file data sampling: Not affected Vulnerability Retbleed: Not affected Vulnerability Spec rstack overflow: Not affected Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl Vulnerability Spectre v1: Mitigation; __user pointer sanitization Vulnerability Spectre v2: Mitigation; CSV2, BHB Vulnerability Srbds: Not affected Vulnerability Tsx async abort: Not affected ``` </details> <details> <summary>aarch64-gnu</summary> ``` gcc_version: Using built-in specs. COLLECT_GCC=aarch64-linux-gnu-gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/11/lto-wrapper Target: aarch64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1~22.04' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=aarch64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04) lscpu: Architecture: aarch64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Vendor ID: ARM Model: 0 Thread(s) per core: 1 Core(s) per socket: 4 Socket(s): 1 Stepping: r0p0 BogoMIPS: 2000.00 Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 L1d cache: 256 KiB (4 instances) L1i cache: 256 KiB (4 instances) L2 cache: 4 MiB (4 instances) L3 cache: 128 MiB (1 instance) NUMA node(s): 1 NUMA node0 CPU(s): 0-3 Vulnerability Gather data sampling: Not affected Vulnerability Itlb multihit: Not affected Vulnerability L1tf: Not affected Vulnerability Mds: Not affected Vulnerability Meltdown: Not affected Vulnerability Mmio stale data: Not affected Vulnerability Reg file data sampling: Not affected Vulnerability Retbleed: Not affected Vulnerability Spec rstack overflow: Not affected Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl Vulnerability Spectre v1: Mitigation; __user pointer sanitization Vulnerability Spectre v2: Mitigation; CSV2, BHB Vulnerability Srbds: Not affected Vulnerability Tsx async abort: Not affected ``` </details> ### References - https://www.kernel.org/doc/html/v5.10/arm64/memory-tagging-extension.html --- cc ```````@marcoieni``````` as this PR reverts the `tests/run-make/mte-ffi` changes from rust-lang/rust#141576.
2025-07-17parse `const trait Trait`Deadbeef-27/+23
2025-07-17remove no_gc_sectionsusamoi-0/+1
2025-07-16Emit warning when there is no space between `-o` and confusing argxizheyin-0/+96
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-07-15Rollup merge of #143837 - jieyouxu:symbol-apis, r=ChrisDentonSamuel Tardieu-4/+109
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-15test: Add UI tests for testing type analysis autodiffKaran Janthe-0/+1302
Signed-off-by: Karan Janthe <karanjanthe@gmail.com>
2025-07-13update issue number for `const_trait_impl`Deadbeef-4/+4
2025-07-13pass --gc-sections if -Zexport-executable-symbols is enabled and improve testsusamoi-12/+13
2025-07-13Update `run-make` tests to use adjusted `symbols` helpersJieyou Xu-4/+4
2025-07-13Adjust `run_make_support::symbols` helpersJieyou Xu-0/+105
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-11Fix std debug assertions gate in `fmt-write-boat`Jieyou Xu-2/+2
The test itself is still broken, but fix this gating separately first.
2025-07-10Use `is_windows_msvc` instead of `is_msvc` in run-make testsJieyou Xu-53/+57
2025-07-08stabilize `-Clink-self-contained=-linker` on x64 linuxRémy Rakic-4/+6
This stabilizes a subset of the `-Clink-self-contained` components on x64 linux: the rust-lld opt-out. The opt-in is not stabilized, as interactions with other stable flags require more internal work, but are not needed for stabilizing using rust-lld by default. Similarly, since we only switch to rust-lld on x64 linux, the opt-out is only stabilized there. Other targets still require `-Zunstable-options` to use it.
2025-07-08stabilize `-Clinker-features=-lld` on x64 linuxRémy Rakic-10/+11
This stabilizes a subset of the `-Clinker-features` components on x64 linux: the lld opt-out. The opt-in is not stabilized, as interactions with other stable flags require more internal work, but are not needed for stabilizing using rust-lld by default. Similarly, since we only switch to rust-lld on x64 linux, the opt-out is only stabilized there. Other targets still require `-Zunstable-options` to use it.
2025-07-08Disable `tests/run-make/mte-ffi`Jieyou Xu-0/+7
See RUST-141600: this test is broken in two ways: 1. This test triggers `-Wincompatible-pointer-types` on GCC 14. 2. This test requires ARMv8.5+ w/ MTE extensions enabled, but GHA CI runner hardware do not have this enabled.
2025-07-08Revert `tests/run-make/mte-ffi` changesJieyou Xu-7/+4
Partially reverts commit 40311c4dcf666e8bddcec4a8059e7d9f12bbd363.
2025-07-08add post-dist test for checking that we use LLDRémy Rakic-22/+29
And remove the previous beta/stable/nightly LLD tests.
2025-07-07Rollup merge of #143482 - ia0:fix, r=fee1-dead许杰友 Jieyou Xu (Joe)-4/+25
Fix short linker error output This PR does 2 things: - It removes the braces when there's a single element. This is required since brace expansion (at least in bash and zsh) only triggers if there's at least 2 elements. - It removes the extra `.rlib` suffixes of the elements. See https://github.com/rust-lang/rust/pull/135707#discussion_r2185212393 for context. Running `cargo +stage1 build` on the following program: ```rust unsafe extern "C" { fn foo() -> libc::c_int; } fn main() { let x = unsafe { foo() } as u32; // println!("{}", data_encoding::BASE64.encode(&x.to_le_bytes())); } ``` Gives the following diff before and after the PR: ```diff -/tmp/foo/target/debug/deps/{liblibc-faf416f178830595.rlib}.rlib +/tmp/foo/target/debug/deps/liblibc-faf416f178830595.rlib ``` Running on the same program with the additional dependency, we get the following diff: ```diff -/tmp/foo/target/debug/deps/{liblibc-faf416f178830595.rlib,libdata_encoding-84bb5aadfa9e8839.rlib}.rlib +/tmp/foo/target/debug/deps/{liblibc-faf416f178830595,libdata_encoding-84bb5aadfa9e8839}.rlib ```
2025-07-06Update run-make testia0-4/+25
2025-07-04test rust calling a C C-variadic functionFolkert de Vries-11/+104
2025-06-30Rollup merge of #143199 - jieyouxu:short-ice, r=RalfJungdianqk-3/+6
Re-disable `tests/run-make/short-ice` on Windows MSVC again We tried to re-enable this for MSVC in https://github.com/rust-lang/rust/pull/142844. Unfortunately, this test still sometimes fails on Windows MSVC. Tracked in https://github.com/rust-lang/rust/issues/143198. FYI ```@dpaoliello``` (I couldn't reproduce this easily locally either)
2025-06-29Re-disable `tests/run-make/short-ice` on Windows MSVC againJieyou Xu-3/+6
2025-06-29Rollup merge of #142641 - bjorn3:proc_macro_symbols_o, r=jieyouxuMatthias Krüger-0/+25
Generate symbols.o for proc-macros too To ensure used statics are functioning correctly for proc-macros too.
2025-06-27Rollup merge of #140809 - bjorn3:panic_runtime_cleanup, r=petrochenkovMatthias Krüger-2/+3
Reduce special casing for the panic runtime See the individual commits for more info.
2025-06-27Rollup merge of #139858 - oli-obk:new-const-traits-syntax, r=fee1-deadMatthias Krüger-20/+20
New const traits syntax This PR only affects the AST and doesn't actually change anything semantically. All occurrences of `~const` outside of libcore have been replaced by `[const]`. Within libcore we have to wait for rustfmt to be bumped in the bootstrap compiler. This will happen "automatically" (when rustfmt is run) during the bootstrap bump, as rustfmt converts `~const` into `[const]`. After this we can remove the `~const` support from the parser Caveat discovered during impl: there is no legacy bare trait object recovery for `[const] Trait` as that snippet in type position goes down the slice /array parsing code and will error r? ``@fee1-dead`` cc ``@nikomatsakis`` ``@traviscross`` ``@compiler-errors``
2025-06-27Generate symbols.o for proc-macros toobjorn3-0/+25
To ensure used statics are functioning correctly for proc-macros too.
2025-06-26Change const trait bound syntax from ~const to [const]Oli Scherer-20/+20
2025-06-24Rollup merge of #142955 - bjorn3:cg_clif_test_fixes, r=jieyouxuJubilee-4/+25
Couple of test suite fixes for cg_clif Most of these are required for getting the test suite running with panic=unwind for cg_clif.
2025-06-24Rollup merge of #142844 - dpaoliello:short-ice, r=jieyouxuJubilee-4/+11
Enable short-ice for Windows Works fine for x64 without modifications. x86 MSVC is still failing. Addresses item in rust-lang/rust#128602 --- try-job: x86_64-mingw-* try-job: x86_64-msvc-* try-job: i686-msvc-*
2025-06-24Auto merge of #142979 - matthiaskrgr:rollup-szqah4e, r=matthiaskrgrbors-0/+1
Rollup of 9 pull requests Successful merges: - rust-lang/rust#142645 (Also emit suggestions for usages in the `non_upper_case_globals` lint) - rust-lang/rust#142657 (mbe: Clean up code with non-optional `NonterminalKind`) - rust-lang/rust#142799 (rustc_session: Add a structure for keeping both explicit and default sysroots) - rust-lang/rust#142805 (Emit a single error when importing a path with `_`) - rust-lang/rust#142882 (Lazy init diagnostics-only local_names in borrowck) - rust-lang/rust#142883 (Add impl_trait_in_bindings tests from rust-lang/rust#61773) - rust-lang/rust#142943 (Don't include current rustc version string in feature removed help) - rust-lang/rust#142965 ([RTE-497] Ignore `c-link-to-rust-va-list-fn` test on SGX platform) - rust-lang/rust#142972 (Add a missing mailmap entry) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-24Enable short-ice for WindowsDaniel Paoliello-4/+11
2025-06-24Fix circular dependency test to use rustc_std_internal_symbolbjorn3-2/+3
2025-06-24Ignore c-link-to-rust-va-list-fn test on SGX platformRaoul Strackx-0/+1
2025-06-24Rollup merge of #142843 - dpaoliello:reproducible-build-2, r=jieyouxuGuillaume Gomez-11/+25
Enable reproducible-build-2 for Windows MSVC Works with MSVC if instructing the linker to avoid timestamps and deleting the PDB between compilations. Addresses item in rust-lang/rust#128602 --- try-job: x86_64-mingw-* try-job: x86_64-msvc-* try-job: i686-msvc-*
2025-06-24Fix function signature for rust_eh_personalitybjorn3-3/+23
While cg_llvm is very lax about mismatched function signatures, cg_clif will crash when there is any mismatch. It could be turned into an error, but without Cranelift changes can't just be ignored.
2025-06-24Fix normalization in linker-warningbjorn3-1/+2
Ensure rustc_codegen_cranelift doesn't get normalized to rustc. And handle -Cpanic=abort.
2025-06-23Enable reproducible-build-2 for WindowsDaniel Paoliello-11/+25
2025-06-23[Arm64EC] Only decorate functions with `#`Daniel Paoliello-1/+55
2025-06-22Rollup merge of #142845 - dpaoliello:textrel-on-minimal-lib, r=jieyouxuJacob Pratt-5/+3
Enable textrel-on-minimal-lib for Windows `bin_name` needs to be used when building a runnable executable. Addresses item in rust-lang/rust#128602 --- try-job: x86_64-mingw-* try-job: x86_64-msvc-* try-job: i686-msvc-*
2025-06-22Rollup merge of #142841 - dpaoliello:fmt-write-bloat, r=jieyouxuJacob Pratt-7/+2
Enable fmt-write-bloat for Windows Seems to be working fine for MSVC once it has the correct binary name. Addresses item in rust-lang/rust#128602 --- try-job: x86_64-mingw-* try-job: x86_64-msvc-* try-job: i686-msvc-*
2025-06-22forward the bootstrap `runner` to `run-make`Folkert de Vries-1/+2
The runner was already forwarded to `compiletest`, this just passes it on to `run-make` and uses it in the `run` functions.
2025-06-21Enable textrel-on-minimal-lib for WindowsDaniel Paoliello-5/+3
2025-06-21Enable fmt-write-bloat for WindowsDaniel Paoliello-7/+2
2025-06-19Auto merge of #139244 - jieyouxu:exp/auto-cross-run-make, r=Kobzolbors-98/+148
Enable automatic cross-compilation in run-make tests Supersedes rust-lang/rust#138066. Blocker for rust-lang/rust#141856. Based on rust-lang/rust#138066 plus `rustdoc()` cross-compile changes. ### Summary This PR automatically specifies `--target` to `rustc()` and `rustdoc()` to have `rustc`/`rustdoc` produce cross-compiled artifacts in run-make tests by default, unless: - `//@ ignore-cross-compile` is used, or - `bare_{rustc,rustdoc}` are used, or - Explicit `.target()` is specified, which overrides the default cross-compile target. Some tests are necessarily modified: - Tests that have `.target(target())` have that incantation removed (since this is now automatically the default). - Some tests have `//@ needs-target-std`, but are a necessary-but-insufficient condition, and are changed to `//@ ignore-cross-compile` instead as host-only tests. - A few tests received `//@ ignore-musl` that fail against `x86_64-unknown-linux-musl` because of inability to find `-lunwind`. AFAICT, they don't *need* to test cross-compiled artifacts. - Some tests are constrained to host-only for now, because the effort to make them pass on cross-compile does not seem worth the complexity, and it's not really *meaningfully* improving test coverage. try-job: dist-various-1
2025-06-19Adjust some run-make tests on cross-compileJieyou Xu-79/+143