about summary refs log tree commit diff
path: root/src/test/run-make
AgeCommit message (Collapse)AuthorLines
2018-01-18Change the --unpretty flag to -Z unprettyMark Mansi-5/+4
-Z unpretty no longer requires -Z unstable-options. Also, I mildly changed the syntax of the flag to match the other -Z flags. All uses of the flag take the form `unpretty=something` where something can either `string` or `string=string` (see the help messages of the CLI).
2018-01-16Add run-make test for no_integrated_as flag.Vadzim Dambrouski-0/+20
2018-01-15Reexport -> re-export in prose and documentation commentsCarol (Nichols || Goulding)-1/+1
2018-01-14Auto merge of #47274 - Manishearth:rustdoc-span, r=QuietMisdreavusbors-0/+29
Use correct line offsets for doctests Not yet tested. This doesn't handle char positions. It could if I collected a map of char offsets and lines, but this is a bit more work and requires hooking into the parser much more (unsure if it's possible). r? @QuietMisdreavus (fixes #45868)
2018-01-13Adjust tests for removal of `impl Foo for .. {}`leonardo.yvens-6/+2
2018-01-10Add test for #45868Manish Goregaokar-0/+29
2018-01-10Fix typoRyan Cumming-1/+1
2018-01-10Restore the original Window commentRyan Cumming-2/+6
The Windows situation is more complicated than I realised
2018-01-09Skip linker-output-non-utf8 test on AppleRyan Cumming-8/+12
This test fails on APFS filesystems with the following error: mkdir: /Users/ryan/Code/rust/build/x86_64-apple-darwin/test/run-make/linker-output-non-utf8.stage2-x86_64-apple-darwin/zzz�: Illegal byte sequence This is due to APFS now requiring that all paths are valid UTF-8. As APFS will be the default filesystem for all new Darwin-based systems the most straightforward fix is to skip this test on Darwin as well as Windows.
2017-12-30Remove excessive trailing newlines.kennytm-4/+0
2017-12-26Revert "Just compare the symbol names and types, not the addresses"Bastian Köcher-6/+6
This reverts commit 7d4d98e5c870a2dcdca8ea3aa47ecee680a35e60.
2017-12-26Use `start` for the `sepcomp-inlining` testBastian Köcher-3/+8
2017-12-26The test functions are now in the same compile unitBastian Köcher-2/+2
2017-12-26Just compare the symbol names and types, not the addressesBastian Köcher-6/+6
2017-12-22Rollup merge of #46858 - QuietMisdreavus:external-doc-error, r=estebankkennytm-1/+7
tweaks and fixes for doc(include) This PR makes a handful of changes around `#[doc(include="file.md")]` (https://github.com/rust-lang/rust/issues/44732): * Turns errors when loading files into full errors. This matches the original RFC text. * Makes the `missing_docs` lint check for `#[doc(include="file.md")]` as well as regular `#[doc="text"]` attributes. * Loads files included by `#[doc(include="file.md")]` into dep-info, mirroring the behavior of `include_str!()` and friends. * Adds or modifies tests to check for all of these.
2017-12-19add files loaded through doc(include) into dep-infoQuietMisdreavus-1/+7
2017-12-19Fix a `compile_input` testvarkor-1/+1
2017-12-18Prevent rustc overwriting input filesvarkor-2/+23
If rustc is invoked on a file that would be overwritten by the compilation, the compilation now fails, to avoid accidental loss. This resolves #13019.
2017-12-14Use PathBuf instead of String where applicableOliver Schneider-5/+5
2017-12-04rustc_back: move dynamic_lib to rustc_metadata.Irina-Gabriela Popa-2/+2
2017-11-28Disable the cdylib-fewer-symbols test for all Windows (test was broken).kennytm-1/+3
2017-11-28Replace most call to grep in run-make by a script that cat the input.kennytm-119/+152
Introduced a new src/etc/cat-and-grep.sh script (called in run-make as $(CGREP)), which prints the input and do a grep simultaneously. This is mainly used to debug spurious failures in run-make, such as the sanitizer error in #45810, as well as real errors such as #46126.
2017-11-27Auto merge of #46273 - semarie:openbsd-libc++, r=alexcrichtonbors-1/+1
make OpenBSD to use libc++ instead of (e)stdc++
2017-11-26make OpenBSD to use libc++ instead of (e)stdc++Sébastien Marie-1/+1
2017-11-25rustc_trans: don't apply noalias on returned references.Eduard-Mihai Burtescu-0/+23
2017-11-24rustbuild: Update LLVM and enable ThinLTOAlex Crichton-1/+10
This commit updates LLVM to fix #45511 (https://reviews.llvm.org/D39981) and also reenables ThinLTO for libtest now that we shouldn't hit #45768. This also opportunistically enables ThinLTO for libstd which was previously blocked (#45661) on test failures related to debuginfo with a presumed cause of #45511. Closes #45511
2017-11-24Auto merge of #45946 - estebank:crate-conflict-diag, r=arielb1bors-3/+2
Use multiline text for crate conflict diagnostics After: ``` error[E0464]: multiple matching crates for `libc` --> /checkout/src/rustc/dlmalloc_shim/../../dlmalloc/src/linux.rs:1:1 | 1 | extern crate libc; | ^^^^^^^^^^^^^^^^^^ | = note: candidates: crate `libc`: /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-658d35794c10b003.rlib crate `libc`: /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-f32a17a3111b01aa.rlib ``` Before: ``` error[E0464]: multiple matching crates for `libc` --> /checkout/src/rustc/dlmalloc_shim/../../dlmalloc/src/linux.rs:1:1 | 1 | extern crate libc; | ^^^^^^^^^^^^^^^^^^ | = note: candidates: = note: path: /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-658d35794c10b003.rlib = note: crate name: libc = note: path: /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-f32a17a3111b01aa.rlib = note: crate name: libc ```
2017-11-22Use multiline text for crate conflict diagnosticsEsteban Küber-3/+2
2017-11-23Auto merge of #45721 - nikomatsakis:hir-tree, r=arielb1bors-0/+22
add -Zunpretty=hir-tree This uses the debug impls to dump the raw HIR. Particularly useful when learning how the compiler works. cc @qmx
2017-11-20add a simple test that running with hir-tree doesn't go bonkersNiko Matsakis-0/+22
Akin to the existing expanded test.
2017-11-19Revert "tests: Update run-make/issue-25581 to reflect how fat pointers are ↵Eduard-Mihai Burtescu-4/+9
passed." This reverts commit b12dcdef4fae5e3856e6911fd6cfbeedadcf3821.
2017-11-16Auto merge of #45920 - sunfishcode:trap-on-unreachable, r=Zoxcbors-2/+12
Enable TrapUnreachable in LLVM. This patch enables LLVM's TrapUnreachable flag, which tells it to translate `unreachable` instructions into hardware trap instructions, rather than allowing control flow to "fall through" into whatever code happens to follow it in memory. This follows up on https://github.com/rust-lang/rust/issues/28728#issuecomment-332581533. For example, for @zackw's testcase [here](https://github.com/rust-lang/rust/issues/42009#issue-228745924), the output function contains a `ud2` instead of no code, so it won't "fall through" into whatever happens to be next in memory. (I'm also working on the problem of LLVM optimizing away infinite loops, but the patch here is useful independently.) I tested this patch on a few different codebases, and the code size increase ranged from 0.0% to 0.1%.
2017-11-13Auto merge of #45824 - dotdash:stack_pop, r=alexcrichtonbors-0/+34
Update LLVM to fix miscompiles with -Copt-level=z on Windows Fixes #45034
2017-11-13Auto merge of #45810 - SimonSapin:ac-dc, r=aturonbors-2/+4
Disable LLVM assertions on Nightly, enable them in "alt" builds. Per IRC discussion https://mozilla.logbot.info/rust-infra/20171106#c13812170-c13812204 Background: https://internals.rust-lang.org/t/disabling-llvm-assertions-in-nightly-builds/5388/14
2017-11-12Update LLVM to fix miscompiles with -Copt-level=z on WindowsBjörn Steinbrink-0/+34
Fixes #45034
2017-11-12Do not silence output in run-make/sanitizer-memorySimon Sapin-2/+4
2017-11-11Add comments to the intrinsic-unreachable test programs.Dan Gohman-0/+6
The return value in these tests is just being used to generate extra code so that it can be detected in the test script, which is just counting lines in the assembly output.
2017-11-10Update the "[run-make] run-make/intrinsic-unreachable" test.Dan Gohman-2/+6
With rustc now emitting "ud2" on unreachable code, a "return nothing" sequence may take the same number of lines as an "unreachable" sequence in assembly code. This test is testing that intrinsics::unreachable() works by testing that it reduces the number of lines in the assembly code. Fix it by adding a return value, which requires an extra instruction in the reachable case, which provides the test what it's looking for.
2017-11-07Update run-make tests.Michael Woerister-2/+16
2017-11-05Auto merge of #45748 - petrochenkov:short, r=alexcrichtonbors-1/+1
Shorten paths to auxiliary files created by tests I'm hitting issues with long file paths to object files created by the test suite, similar to https://github.com/rust-lang/rust/issues/45103#issuecomment-335622075. If we look at the object file path in https://github.com/rust-lang/rust/issues/45103 we can see that the patch contains of few components: ``` specialization-cross-crate-defaults.stage2-x86_64-pc-windows-gnu.run-pass.libaux\specialization_cross_crate_defaults.specialization_cross_crate_defaults0.rust-cgu.o ``` => 1. specialization-cross-crate-defaults // test name, required 2. stage2 // stage disambiguator, required 3. x86_64-pc-windows-gnu // target disambiguator, required 4. run-pass // mode disambiguator, rarely required 5. libaux // suffix, can be shortened 6. specialization_cross_crate_defaults // required, there may be several libraries in the directory 7. specialization_cross_crate_defaults0 // codegen unit name, can be shortened? 8. rust-cgu // suffix, can be shortened? 9. o // object file extension This patch addresses items `4`, `5` and `8`. `libaux` is shortened to `aux`, `rust-cgu` is shortened to `rcgu`, mode disambiguator is omitted unless it's necessary (for pretty-printing and debuginfo tests, see https://github.com/rust-lang/rust/pull/24537/commits/38d26d811a44ba93637c84ce77a58af88c47f0ac) I haven't touched names of codegen units though (`specialization_cross_crate_defaults0`). Is it useful for them to have descriptive names including the crate name, as opposed to just `0` or `cgu0` or something?
2017-11-04rustc: Handle some libstd symbole exports betterAlex Crichton-0/+33
Right now symbol exports, particularly in a cdylib, are handled by assuming that `pub extern` combined with `#[no_mangle]` means "export this". This isn't actually what we want for some symbols that the standard library uses to implement itself, for example symbols related to allocation. Additionally other special symbols like `rust_eh_personallity` have no need to be exported from cdylib crate types (only needed in dylib crate types). This commit updates how rustc handles these special symbols by adding to the hardcoded logic of symbols like `rust_eh_personallity` but also adding a new attribute, `#[rustc_std_internal_symbol]`, which forces the export level to be considered the same as all other Rust functions instead of looking like a C function. The eventual goal here is to prevent functions like `__rdl_alloc` from showing up as part of a Rust cdylib as it's just an internal implementation detail. This then further allows such symbols to get gc'd by the linker when creating a cdylib.
2017-11-03Shorten paths to auxiliary files created by testsVadim Petrochenkov-1/+1
2017-11-03auto trait future compatibility lintleonardo.yvens-0/+2
2017-11-02Auto merge of #45647 - nrc:rls-bugs, r=eddybbors-0/+5
save-analysis: support unions r? @eddyb
2017-10-31Add regression test for symbol visibility when compiling rlib+cdylib in one ↵Michael Woerister-2/+12
session.
2017-10-31save-analysis: support unionsNick Cameron-0/+5
2017-10-27Implement RFC 1861: Extern typesPaul Lietar-0/+49
2017-10-16Auto merge of #45202 - alexcrichton:fix-inline-always, r=michaelwoeristerbors-0/+33
rustc: Handle #[inline(always)] at -O0 This commit updates the handling of `#[inline(always)]` functions at -O0 to ensure that it's always inlined regardless of the number of codegen units used. Closes #45201
2017-10-15rustbuild: Support specifying archiver and linker explicitlyVadim Petrochenkov-13/+20
2017-10-11rustc: Handle #[inline(always)] at -O0Alex Crichton-0/+33
This commit updates the handling of `#[inline(always)]` functions at -O0 to ensure that it's always inlined regardless of the number of codegen units used. Closes #45201