about summary refs log tree commit diff
path: root/src/test/run-make
AgeCommit message (Collapse)AuthorLines
2022-02-11Add --scrape-tests flags so rustdoc can scrape examples from testsWill Crichton-1/+17
2022-02-08Rollup merge of #93568 - willcrichton:scrape-examples-leading-whitespace, ↵Matthias Krüger-0/+16
r=CraftSpider Include all contents of first line of scraped item in Rustdoc This fixes #93528. When scraping examples, it extends the span of the enclosing item to include all characters up to the start of the first line of the span. r? `@camelid`
2022-02-01Include all contents of first line of scraped itemWill Crichton-0/+16
2022-02-01Rollup merge of #86374 - bossmc:enable-static-pie-for-gnu, r=nagisaMatthias Krüger-11/+54
Enable combining `+crt-static` and `relocation-model=pic` on `x86_64-unknown-linux-gnu` Modern `gcc` versions support `-static-pie`, and `rustc` will already fall-back to `-static` if the local `gcc` is too old (and hence this change is optimistic rather than absolute). This brings the `-musl` and `-gnu` targets to feature compatibility (albeit with different default settings). Of note a `-static` or `-static-pie` binary based on glibc that uses NSS-backed functions (`gethostbyname` or `getpwuid` etc.) need to have access to the `libnss_X.so.2` libraries and any of their dynamic dependencies. I wasn't sure about the `# only`/`# ignore` changes (I've not got a `gnux32` toolchain to test with hence not also enabling `-static-pie` there).
2022-01-22Use an `indexmap` to avoid sorting `LocalDefId`spierwill-16/+16
Update `indexmap` to 1.8.0. Bless test
2022-01-19Fix test directives; comment out calls broken on windows-gnuRichard Cobbe-5/+11
2022-01-18Rollup merge of #90782 - ricobbe:binutils-dlltool, r=michaelwoeristerMatthias Krüger-2/+80
Implement raw-dylib support for windows-gnu Add support for `#[link(kind = "raw-dylib")]` on windows-gnu targets. Work around binutils's linker's inability to read import libraries produced by LLVM by calling out to the binutils `dlltool` utility to create an import library from a temporary .DEF file; this approach is effectively a slightly refined version of `@mati865's` earlier attempt at this strategy in PR #88801. (In particular, this attempt at this strategy adds support for `#[link_ordinal(...)]` as well.) In support of #58713.
2022-01-12Call out to binutils' dlltool for raw-dylib on windows-gnu platforms.Richard Cobbe-2/+80
2021-12-12Stabilize asm! and global_asm!Amanieu d'Antras-33/+34
They are also removed from the prelude as per the decision in https://github.com/rust-lang/rust/issues/87228. stdarch and compiler-builtins are updated to work with the new, stable asm! and global_asm! macros.
2021-11-30Add --out-dir flag for rustdochi-rustin-0/+30
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2021-11-11Auto merge of #83846 - torhovland:issue-10971, r=davidtwcobors-0/+10
Added the --temps-dir option Fixes #10971. The new `--temps-dir` option puts intermediate files in a user-specified directory. This provides a fix for the issue where parallel invocations of rustc would overwrite each other's intermediate files. No files are kept in the intermediate directory unless `-C save-temps=yes`. If additional files are specifically requested using `--emit asm,llvm-bc,llvm-ir,obj,metadata,link,dep-info,mir`, these will be put in the output directory rather than the intermediate directory. This is a backward-compatible change, i.e. if `--temps-dir` is not specified, the behavior is the same as before.
2021-11-10Changing cdylib to staticlib, as the former doesn't work with arm-none-eabi-gcc.Tor Hovland-4/+1
2021-11-07There is a -Clinker='arm-none-eabi-gcc' that seems to be causing trouble.Tor Hovland-0/+3
2021-11-07Almost all the other tests use '-include', so we'll do too.Tor Hovland-1/+1
2021-11-07Improve error when an .rlib can't be parsedJoshua Nelson-0/+8
This usually describes either an error in the compiler itself or some sort of IO error. Either way, we should report it to the user rather than just saying "crate not found". This only gives an error if the crate couldn't be loaded at all - if the compiler finds another .rlib or .rmeta file which was valid, it will continue to compile the crate. Example output: ``` error[E0785]: found invalid metadata files for crate `foo` --> bar.rs:3:24 | 3 | println!("{}", foo::FOO_11_49[0]); | ^^^ | = warning: failed to parse rlib '/home/joshua/test-rustdoc/libfoo.rlib': Invalid archive extended name offset ```
2021-11-07Made temps-dir an unstable option.Tor Hovland-2/+2
2021-11-05Added a regression test.Tor Hovland-0/+10
2021-11-04Move rustdoc-scrape-examples-macros test to run-make-fulldepsWill Crichton-95/+0
2021-11-04Fix ICE when rustdoc is scraping examples inside of a proc macroWill Crichton-0/+95
2021-11-04Sort scraped call locations before serializingWill Crichton-3/+12
2021-11-01Check for -static-pie support before testing supportAndy Caldwell-8/+49
2021-11-01Rollup merge of #90349 - willcrichton:example-analyzer, r=jyn514Matthias Krüger-0/+10
Fix rare ICE during typeck in rustdoc scrape_examples While testing the `--scrape-examples` extension on the [wasmtime](https://github.com/bytecodealliance/wasmtime) repository, I found some additional edge cases. Specifically, when asking to typecheck a body containing a function call, I would sometimes get an ICE if: * The body doesn't exist * The function's HIR node didn't have a type This adds checks for both of those conditions. (Also this updates a test to check that the sources of a reverse-dependency are correctly generated and linked.) r? `@jyn514`
2021-10-30Auto merge of #90205 - mati865:link-modifiers-in-rustc, r=petrochenkovbors-3/+0
Repace use of `static_nobundle` with `native_link_modifiers` within Rust codebase This fixes warnings when building Rust and running tests: ``` warning: library kind `static-nobundle` has been superseded by specifying `-bundle` on library kind `static`. Try `static:-bundle` warning: `rustc_llvm` (lib) generated 2 warnings (1 duplicate) ```
2021-10-29Fix rare ICE during typeck in rustdoc scrape_examplesWill Crichton-0/+10
2021-10-28Add -Zunstable-options instead of featureMateusz Mikuła-3/+0
2021-10-28Enable combining +crt-static and relocation-model=pic on ↵Andy Caldwell-2/+4
x86_64-unknown-linux-gnu
2021-10-23Repace use of `static_nobundle` with `native_link_modifiers`Mateusz Mikuła-1/+1
This fixes warning when building Rust and running tests: ``` warning: library kind `static-nobundle` has been superseded by specifying `-bundle` on library kind `static`. Try `static:-bundle` warning: `rustc_llvm` (lib) generated 2 warnings (1 duplicate) ```
2021-10-23Rollup merge of #85833 - willcrichton:example-analyzer, r=jyn514Matthias Krüger-0/+76
Scrape code examples from examples/ directory for Rustdoc Adds support for the functionality described in https://github.com/rust-lang/rfcs/pull/3123 Matching changes to Cargo are here: https://github.com/rust-lang/cargo/pull/9525 Live demo here: https://willcrichton.net/example-analyzer/warp/trait.Filter.html#method.and
2021-10-09Auto merge of #89343 - Mark-Simulacrum:no-args-queries, r=cjgillotbors-0/+13
Refactor fingerprint reconstruction This PR replaces can_reconstruct_query_key with fingerprint_style, which returns the style of the fingerprint for that query. This allows us to avoid trying to extract a DefId (or equivalent) from keys which *are* reconstructible because they're () but not as DefIds. This is done with the goal of fixing -Zdump-dep-graph, which seems to have broken a while ago (I didn't try to bisect). Currently even on a `fn main() {}` file it'll ICE (you need to also pass -Zquery-dep-graph for it to work at all), and this patch indirectly fixes the cause of that ICE. This also adds a test for it continuing to work.
2021-10-09Add a test that -Zquery-dep-graph -Zdump-dep-graph worksMark Rousskov-0/+13
2021-10-08Add test for ordering of examples, simplify with single scrape.mk fileWill Crichton-40/+49
2021-10-08Add test for prev/back arrows + examples across multiple filesWill Crichton-0/+32
2021-10-08Move more scrape-examples logic from JS to rustWill Crichton-2/+2
Fix failing test Add missing backslash Fix padding issue with horizontal scrollbar
2021-10-07Rollup merge of #89025 - ricobbe:raw-dylib-link-ordinal, r=michaelwoeristerJubilee-0/+45
Implement `#[link_ordinal(n)]` Allows the use of `#[link_ordinal(n)]` with `#[link(kind = "raw-dylib")]`, allowing Rust to link against DLLs that export symbols by ordinal rather than by name. As long as the ordinal matches, the name of the function in Rust is not required to match the name of the corresponding function in the exporting DLL. Part of #58713.
2021-10-06Change serialized format to use DefPathHash instead of custom StringWill Crichton-1/+1
Move test to rustdoc-ui Fix test writing to wrong directory Formatting Fix test Add FIXME Remove raw multiline strings
2021-10-06Add target crates as inputs to reduce size of intermediatesWill Crichton-0/+35
Add tests for module-path remapping and scrape example options Find all crates with a given name
2021-10-02Run the #85441 regression test on MSVC onlySimonas Kazlauskas-1/+1
On MinGW toolchains the various features (such as function sections) necessary to eliminate dead function references are disabled due to various bugs. This means that the windows sockets library will most likely remain linked to any mingw toolchain built program that also utilizes libstd. That said, I made an attempt to also enable `function-sections` and `--gc-sections` during my experiments, but the symbol references remained, sadly.
2021-10-02Add test for checking if WS2_32.dll is linkedChristiaan Dirkx-0/+10
2021-09-20Implement #[link_ordinal] attribute in the context of #[link(kind = ↵Richard Cobbe-0/+45
"raw-dylib")].
2021-09-07Auto merge of #88161 - michaelwoerister:fix-whole-archive-no-bundle, ↵bors-0/+87
r=petrochenkov Fix handling of +whole-archive native link modifier. This PR fixes a bug in `add_upstream_native_libraries` that led to the `+whole-archive` modifier being ignored when linking in native libs. ~~Note that the PR does not address the situation when `+whole-archive` is combined with `+bundle`.~~ `@wesleywiser's` commit adds validation code that turns combining `+whole-archive` with `+bundle` into an error. Fixes https://github.com/rust-lang/rust/issues/88085. r? `@petrochenkov` cc `@wesleywiser` `@gcoakes`
2021-09-07Add test case for no-bundle/whole-archive native libs linking.Michael Woerister-0/+87
2021-09-03Auto merge of #88482 - athei:add-import-test, r=the8472bors-0/+30
Add regression test for a spurious import This PR adds a test that verifies that the bug described in the linked issue does not creep back into the code. In essence it checks that compiling some specific code (that uses 128 bit multiplication) with a specific set of compiler options does not lead to a spurious import of a panic function. I noticed that other wasm tests use `# only-wasm32-bare` in their `Makefile`. This will skip the test for me. I did not find out how to run this test locally. Maybe someone can help. closes #78744 r? `@jyn514`
2021-08-30Add regression test for a spurious importAlexander Theißen-0/+30
2021-08-27Don't use `guess_head_span` in `predicates_of` for foreign spanAaron Hill-0/+30
Previously, the result of `predicates_of` for a foreign trait would depend on the *current* state of the corresponding source file in the foreign crate. This could lead to ICEs during incremental compilation, since the on-disk contents of the upstream source file could potentially change without the upstream crate being recompiled. Additionally, this ensure that that the metadata we produce for a crate only depends on its *compiled* upstream dependencies (e.g an rlib or rmeta file), *not* the current on-disk state of the upstream crate source files.
2021-08-24Update testsinquisitivecrystal-3/+0
This updates tests to reflect that `force-warn` is now stable.
2021-08-19Revert "Revert "Auto merge of #83417 - erikdesjardins:enableremovezsts, ↵Erik Desjardins-1/+0
r=oli-obk"" This reverts commit 8e11199a153218c13a419df37a9bb675181cccb7.
2021-08-17Auto merge of #88056 - erikdesjardins:revertzst, r=oli-obkbors-0/+1
Revert "Auto merge of #83417 - erikdesjardins:enableremovezsts, r=oli-obk" This reverts commit 8007b506ac5da629f223b755f5a5391edd5f6d01, reversing changes made to e55c13e1099b78b1a485202fabc9c1b10b1f1d15. Fixes #88043 r? `@oli-obk`
2021-08-15Revert "Auto merge of #83417 - erikdesjardins:enableremovezsts, r=oli-obk"Erik Desjardins-0/+1
This reverts commit 8007b506ac5da629f223b755f5a5391edd5f6d01, reversing changes made to e55c13e1099b78b1a485202fabc9c1b10b1f1d15.
2021-08-15Add `--target` flag to `issue-85019-moved-src-dir`Aaron Hill-4/+4
2021-08-15Copy over run-make ignores from issue-83112-incr-test-moved-fileAaron Hill-0/+3