about summary refs log tree commit diff
path: root/tests/run-make
AgeCommit message (Collapse)AuthorLines
2023-05-12Usage of atomic counters for llvm code coverageEvgeniy A. Dushistov-1/+1
2023-05-11Ignore test on MSVC for nowbjorn3-0/+68
I can't figure out how to link with the MSVC toolchain
2023-05-10Auto merge of #106560 - bjorn3:support_staticlib_dylib_linking, r=pnkfelixbors-0/+49
Support linking to rust dylib with --crate-type staticlib This allows for example dynamically linking libstd, while statically linking the user crate into an executable or C dynamic library. For this two unstable flags (`-Z staticlib-allow-rdylib-deps` and `-Z staticlib-prefer-dynamic`) are introduced. Without the former you get an error. The latter is the equivalent to `-C prefer-dynamic` for the staticlib crate type to indicate that dynamically linking is preferred when both options are available, like for libstd. Care must be taken to ensure that no crate ends up being merged into two distinct staticlibs that are linked together. Doing so will cause a linker error at best and undefined behavior at worst. In addition two distinct staticlibs compiled by different rustc may not be combined under any circumstances due to some rustc private symbols not being mangled. To successfully link a staticlib, `--print native-static-libs` can be used while compiling to ask rustc for the linker flags necessary when linking the staticlib. This is an existing flag which previously only listed native libraries. It has been extended to list rust dylibs too. Trying to locate libstd yourself to link against it is not supported and may break if for example the libstd of multiple rustc versions are put in the same directory. For an example on how to use this see the `src/test/run-make-fulldeps/staticlib-dylib-linkage/` test.
2023-05-09Rollup merge of #110304 - cchiw:master, r=davidtwcoDylan DPC-0/+18
Add GNU Property Note Fix #103001 Generates the missing property note: ``` Displaying notes found in: .note.gnu.property Owner Data size Description GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0 Properties: x86 feature: IBT ```
2023-05-08Rollup merge of #104070 - nbdd0121:unwind, r=AmanieuMichael Goulet-0/+26
Prevent aborting guard from aborting the process in a forced unwind Fix #101469
2023-05-08Rollup merge of #105354 - BlackHoleFox:apple-deployment-printer, r=oli-obkYuki Okushi-1/+1
Add deployment-target --print flag for Apple targets This is very useful for crates that need to know what the Apple OS deployment target is for their build scripts or inside of a build environment. Right now, the defaults just get copy/pasted around the ecosystem since they've been stable for so long. But with #104385 in progress, that won't be true anymore and everything will need to move. Ideally whenever it happens again, this could be less painful as everything can ask the compiler what its default is instead. To show examples of the copy/paste proliferation, here's some crates and/or apps that do: - [cc](https://github.com/rust-lang/cc-rs/pull/708/files), Soon - [mac-notification-sys](https://github.com/h4llow3En/mac-notification-sys/pull/46/files#diff-d0d98998092552a1d3259338c2c71e118a5b8343dd4703c0c7f552ada7f9cb42R10-R12) - [PyO3](https://github.com/PyO3/maturin/blob/ccb02d1aa1cc41e82a3572a3c8b35cace15f3e78/src/target.rs#L755-L758) - [Anki](https://github.com/ankitects/anki/blob/613b5c1034cc9943f3f68d818ae22b2e0acec877/build/runner/src/bundle/artifacts.rs#L49-L54) - [jsc-rs](https://github.com/Brooooooklyn/jsc-rs/blob/37767267568fb2de62fc441473e7d158dd980520/xtask/src/build.rs#L402-L405) ... and probably more that a simple GitHub codesearch didn't see
2023-05-07Add test for unwinding past terminating POFGary Guo-0/+26
2023-05-07Fix instrument-coverage tests by using Python to sort instantiation groupsZalathar-33/+148
2023-05-06Rollup merge of #111167 - cuviper:type-decl-disubprogram, r=michaelwoeristerMatthias Krüger-0/+21
debuginfo: split method declaration and definition When we're adding a method to a type DIE, we only want a DW_AT_declaration there, because LLVM LTO can't unify type definitions when a child DIE is a full subprogram definition. Now the subprogram definition gets added at the CU level with a specification link back to the abstract declaration. Both GCC and Clang write debuginfo this way for C++ class methods. Fixes #109730. Fixes #109934.
2023-05-06Rollup merge of #109677 - dpaoliello:rawdylib, r=michaelwoerister,wesleywiserYuki Okushi-13/+24
Stabilize raw-dylib, link_ordinal, import_name_type and -Cdlltool This stabilizes the `raw-dylib` feature (#58713) for all architectures (i.e., `x86` as it is already stable for all other architectures). Changes: * Permit the use of the `raw-dylib` link kind for x86, the `link_ordinal` attribute and the `import_name_type` key for the `link` attribute. * Mark the `raw_dylib` feature as stable. * Stabilized the `-Zdlltool` argument as `-Cdlltool`. * Note the path to `dlltool` if invoking it failed (we don't need to do this if `dlltool` returns an error since it prints its path in the error message). * Adds tests for `-Cdlltool`. * Adds tests for being unable to find the dlltool executable, and dlltool failing. * Fixes a bug where we were checking the exit code of dlltool to see if it failed, but dlltool always returns 0 (indicating success), so instead we need to check if anything was written to `stderr`. NOTE: As previously noted (https://github.com/rust-lang/rust/pull/104218#issuecomment-1315895618) using dlltool within rustc is temporary, but this is not the first time that Rust has added a temporary tool use and argument: https://github.com/rust-lang/rust/pull/104218#issuecomment-1318720482 Big thanks to ``````@tbu-`````` for the first version of this PR (#104218)
2023-05-05Add GNU Property NoteCharisee-0/+18
2023-05-05Add deployment-target --print flag for Apple targetsBlackHoleFox-1/+1
2023-05-04Rollup merge of #110651 - durin42:xunit-stdout, r=cuviperMatthias Krüger-0/+56
libtest: include test output in junit xml reports Fixes #110336.
2023-05-03debuginfo: split method declaration and definitionJosh Stone-0/+21
When we're adding a method to a type DIE, we only want a DW_AT_declaration there, because LLVM LTO can't unify type definitions when a child DIE is a full subprogram definition. Now the subprogram definition gets added at the CU level with a specification link back to the abstract declaration.
2023-05-02Add needs-unwind annotations to tests that need stack unwindingbjorn3-0/+10
2023-05-02Auto merge of #106075 - nbdd0121:ffi-unwind, r=joshtriplettbors-10/+0
Partial stabilisation of `c_unwind` The stabilisation report is at https://github.com/rust-lang/rust/issues/74990#issuecomment-1363473645 cc `@rust-lang/wg-ffi-unwind`
2023-05-01Add `#[no_coverage]` to the test harness's `fn main`Zalathar-0/+21
2023-04-30Auto merge of #110942 - Zalathar:coverage-tests, r=Mark-Simulacrumbors-1/+1
Don't accidentally ignore all output in `tests/run-make/coverage-reports` diffs Because the literal pipe `|` character was not escaped, these regexes ended up accidentally ignoring every line in the coverage report output, so the tests would not fail even if the output was wrong.
2023-04-30Rollup merge of #110652 - ojeda:core-no_global_oom_handling-test, ↵Matthias Krüger-0/+6
r=Mark-Simulacrum Add test for warning-free builds of `core` under `no_global_oom_handling` `tests/run-make/alloc-no-oom-handling` tests that `alloc` under `no_global_oom_handling` builds and is warning-free. Do the same for `core` to prevent issues such as [1]. Link: https://github.com/rust-lang/rust/pull/110649 [1]
2023-04-29Update testsGary Guo-10/+0
2023-04-28junit: fix typo in comment and don't include output for passes when not ↵Augie Fackler-1/+1
requested
2023-04-28run-make test: using single quotes to not trigger the shellTim Neumann-1/+1
2023-04-28Don't accidentally ignore all output in `tests/run-make/coverage-reports` diffsZalathar-1/+1
Because the literal pipe `|` character was not escaped, these regexes ended up accidentally ignoring every line in the coverage report output, so the tests would not fail even if the output was wrong.
2023-04-27Ignore test when cross compilingbjorn3-0/+1
2023-04-27ignore failing test on armMaybe Waffle-0/+1
2023-04-27fix typo in the `inaccessible-temp-dir` test nameMaybe Waffle-0/+0
(formally `...inaccessbile...`)
2023-04-25Fix `ui/io-checks/inaccessbile-temp-dir.rs` testMaybe Waffle-0/+32
2023-04-25Revert "Remove #[alloc_error_handler] from the compiler and library"Matthias Krüger-2/+100
This reverts commit abc0660118cc95f47445fd33502a11dd448f5968.
2023-04-25Revert "Adjust expected result for coverage test"Matthias Krüger-3/+3
This reverts commit 4da05e0b88d8b51fc6912da2d0b93edb2780e76b.
2023-04-25Rollup merge of #110667 - pcc:fix-pointer-auth-link-with-c, r=Mark-SimulacrumYuki Okushi-2/+2
pointer-auth-link-with-c: Fix cross compilation.
2023-04-24tests: add test for warning-free builds of `core` under `no_global_oom_handling`Miguel Ojeda-0/+6
`tests/run-make/alloc-no-oom-handling` tests that `alloc` under `no_global_oom_handling` builds and is warning-free. Do the same for `core` to prevent issues such as [1]. Link: https://github.com/rust-lang/rust/pull/110649 [1] Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2023-04-22Auto merge of #109507 - Amanieu:panic-oom-payload, r=davidtwcobors-103/+5
Report allocation errors as panics OOM is now reported as a panic but with a custom payload type (`AllocErrorPanicPayload`) which holds the layout that was passed to `handle_alloc_error`. This should be review one commit at a time: - The first commit adds `AllocErrorPanicPayload` and changes allocation errors to always be reported as panics. - The second commit removes `#[alloc_error_handler]` and the `alloc_error_hook` API. ACP: https://github.com/rust-lang/libs-team/issues/192 Closes #51540 Closes #51245
2023-04-21pointer-auth-link-with-c: Fix cross compilation.Peter Collingbourne-2/+2
2023-04-21junit: also include per-case stdout in xmlAugie Fackler-2/+2
By placing the stdout in a CDATA block we avoid almost all escaping, as there's only two byte sequences you can't sneak into a CDATA and you can handle that with some only slightly regrettable CDATA-splitting. I've done this in at least two other implementations of the junit xml format over the years and it's always worked out. The only quirk new to this (for me) is smuggling newlines as &#xA; to avoid literal newlines in the output.
2023-04-21libtest: add tests for junit output formatAugie Fackler-0/+56
I'm about to make some changes here, and it was making me uneasy to modify the output format without test coverage.
2023-04-21Adjust expected result for coverage testAmanieu d'Antras-3/+3
2023-04-21Do not rely on exact error code.Camille GILLOT-1/+1
2023-04-21Ensure mir_drops_elaborated_and_const_checked when requiring codegen.Camille GILLOT-0/+14
2023-04-20Bless coverage.Camille GILLOT-5/+5
2023-04-19Ignore test on wasm as dylibs aren't supportedbjorn3-0/+1
2023-04-19Ignore test on MSVC for nowbjorn3-1/+4
I can't figure out how to link with the MSVC toolchain
2023-04-19Add unstable feature flagsbjorn3-1/+3
2023-04-19Support `--print native-static-libs` with rust dylibsbjorn3-19/+6
2023-04-19Support linking to rust dylibs from a staticlibbjorn3-0/+55
2023-04-19Rollup merge of #110525 - jyn514:translation-download-rustc, r=albertlarsan68Matthias Krüger-0/+2
Fix `tests/run-make-translation` when download-rustc is enabled When building locally, we never generate a `share` directory in the local sysroot. However, when we download the `rustc` component from ci, it includes a `share/man` directory in the sysroot. The `run-make/translation` test assumed that it didn't exist, and would create a link from `fakeroot` to the real share directory, and write symbolic links into it. Change it not to create the link, so that rustc doesn't try to load multiple copies of the same `.ftl` file. Fixes https://github.com/rust-lang/rust/issues/110357.
2023-04-19Auto merge of #110393 - fee1-dead-contrib:rm-const-traits, r=oli-obkbors-0/+6
Rm const traits in libcore See [zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/146212-t-compiler.2Fconst-eval/topic/.60const.20Trait.60.20removal.20or.20rework) * [x] Bless ui tests * [ ] Re constify some unstable functions with workarounds if they are needed
2023-04-19temporarily ignore run-make coverage testsDeadbeef-0/+6
2023-04-19Fix `tests/run-make-translation` when download-rustc is enabledjyn-0/+2
When building locally, we never generate a `share` directory in the local sysroot. However, when we download the `rustc` component from ci, it includes a `share/man` directory in the sysroot. The `run-make/translation` test assumed that it didn't exist, and would create a link from `fakeroot` to the real share directory, and write symbolic links into it. Change it not to create the link, so that rustc doesn't try to load multiple copies of the same `.ftl` file.
2023-04-18Stablize raw-dylib, link_ordinal and -CdlltoolDaniel Paoliello-13/+24
2023-04-17Make commit-date pattern more specific in test for issue 107094Erik Hofmayer-2/+2