summary refs log tree commit diff
path: root/src/test/run-make
AgeCommit message (Collapse)AuthorLines
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-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-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
2021-08-15Include (potentially remapped) working dir in crate hashAaron Hill-0/+31
Fixes #85019 A `SourceFile` created during compilation may have a relative path (e.g. if rustc itself is invoked with a relative path). When we write out crate metadata, we convert all relative paths to absolute paths using the current working direction. However, the working directory is not included in the crate hash. This means that the crate metadata can change while the crate hash remains the same. Among other problems, this can cause a fingerprint mismatch ICE, since incremental compilation uses the crate metadata hash to determine if a foreign query is green. This commit moves the field holding the working directory from `Session` to `Options`, including it as part of the crate hash.
2021-08-07Run RemoveZsts at mir-opt-level=1Erik Desjardins-1/+0
Effectively reverts commit 6960bc9696b05b15d8d89ece2fef14e6e62a43fc.
2021-07-29rfc3052: Remove authors field from Cargo manifestsJade-2/+0
Since RFC 3052 soft deprecated the authors field anyway, hiding it from crates.io, docs.rs, and making Cargo not add it by default, and it is not generally up to date/useful information, we should remove it from crates in this repo.
2021-07-21Rename force-warns to force-warnRyan Levick-2/+2
2021-07-09Add support for raw-dylib with stdcall, fastcall functions on ↵Richard Cobbe-2/+236
i686-pc-windows-msvc.
2021-07-02add track_path::path fn for proc-macro usageBernhard Schuster-0/+31
Ref #73921
2021-06-21Add test showing different KIND parameters change hashJeremy Fitzhardinge-1/+12
2021-06-21In --emit KIND=PATH options, only hash KINDJeremy Fitzhardinge-0/+27
The PATH has no material effect on the emitted artifact, and setting the patch via `-o` or `--out-dir` does not affect the hash. Closes https://github.com/rust-lang/rust/issues/86044
2021-06-10gcc-lld mvp1000teslas-0/+10
ignore test if rust-lld not found create ld -> rust-lld symlink at build time instead of run time for testing in ci copy instead of symlinking remove linux check test for linker, suggestions from bjorn3 fix overly restrictive lld matcher use -Zgcc-ld flag instead of -Clinker-flavor refactor code adding lld to gcc path revert ci changes suggestions from petrochenkov rename gcc_ld to gcc-ld in dirs
2021-06-04Add first cut of functionality for #58713: support for #[link(kind = ↵Richard Cobbe-0/+73
"raw-dylib")]. This does not yet support #[link_name] attributes on functions, the #[link_ordinal] attribute, #[link(kind = "raw-dylib")] on extern blocks in bin crates, or stdcall functions on 32-bit x86.
2021-06-04Auto merge of #85788 - rylev:force-warns, r=nikomatsakisbors-0/+3
Support for force-warns Implements https://github.com/rust-lang/rust/issues/85512. This PR adds a new command line option `force-warns` which will force the provided lints to warn even if they are allowed by some other mechanism such as `#![allow(warnings)]`. Some remaining issues: * https://github.com/rust-lang/rust/issues/85512 mentions that `force-warns` should also be capable of taking lint groups instead of individual lints. This is not implemented. * If a lint has a higher warning level than `warn`, this will cause that lint to warn instead. We probably want to allow the lint to error if it is set to a higher lint and is not allowed somewhere else. * One test is currently ignored because it's not working - when a deny-by-default lint is allowed, it does not currently warn under `force-warns`. I'm not sure why, but I wanted to get this in before the weekend. r? `@nikomatsakis`
2021-06-03Add run-make test testing flag stabilityRyan Levick-0/+3