Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 8 pull requests #59942

Closed
wants to merge 30 commits into from
Closed

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Apr 13, 2019

Successful merges:

Failed merges:

r? @ghost

RalfJung and others added 30 commits April 7, 2019 11:16
This commit adds a test demonstrating the current behaviour when a macro
defined in a module with the `#[macro_export]` is imported from the
module rather than the crate root.
This commit suggests importing a macro from the root of a crate as the
intent may have been to import a macro from the definition location that
was annotated with `#[macro_export]`.
This commit extends the suggestion to handle imports that are aliased to
another name.
This commit introduces more dirty span manipulation into the compiler
in order to handle the various edge cases in moving/renaming the macro
import so it is at the root of the import.
This commit removes the assumption that the start of a use statement
will always be on one line with a single space - which was silly in the
first place.
This commit changes the suggestion so that it is split into multiple
parts in an effort to reduce the impact the applied suggestion could
have on formatting.
…eta regression).

This is result of squashing two revert commits:

Revert "compile all crates under test w/ -Zemit-stack-sizes"

This reverts commit 7d365cf.

Revert "bootstrap: build compiler-builtins with -Z emit-stack-sizes"

This reverts commit 8b8488c.
Use a proc macro to declare preallocated symbols

r? @petrochenkov
… r=alexcrichton

compiletest normalization: preserve non-JSON lines such as ICEs

Currently, every non-JSON line from stderr gets normalized away when compiletest normalizes the output. In particular, ICEs get normalized to the empty output. That does not seem desirable, so this changes normalization to preserve non-JSON lines instead.

Also see Manishearth/compiletest-rs#169: because of that bug, Miri currently *looks* green in the toolstate, but some tests ICE. That same bug is likely no longer present in latest compiletest because the error code gets checked separately, but it still seems like a good idea to also make sure that ICEs are considered stderr output:
This change found an accidental user-visible `error!` in CTFE validation (fixed), and a non-deterministic panic when there are two `main` symbols (not fixed, no idea where this comes from). Both got missed before because non-JSON output got ignored.
…x, r=QuietMisdreavus

Apply resource-suffix to search-index and source-files scripts as well

Fixes rust-lang#59771.

r? @QuietMisdreavus
…mp, r=alexcrichton

Exclude profiler-generated symbols from MSVC __imp_-symbol workaround.

LLVM's profiling instrumentation adds a few symbols that are used by the profiler runtime. Since these show up as globals in the LLVM IR, the compiler generates `dllimport`-related `__imp_` stubs for them. This can lead to linker errors because the instrumentation symbols have weak linkage or are in a comdat section, but the `__imp_` stubs aren't.

Instead of trying to replicate the linkage/comdat setup for the stubs, this PR just excludes the profiler-related symbols from stub-generation since they aren't supposed to be referenced via `__declspec(dllimport)` anywhere anyway.

r? @alexcrichton

EDIT: I considered making this more general, i.e. inferring from the symbol name if it is a Rust symbol or not. But then I figured out that that would yield false negatives for `#[no_mangle]` et al, so I went with a blacklist approach.
…ramertj

Clean up handling of `-Z pgo-gen` commandline option.

This PR adapts the `-Z pgo-gen` flag to how Clang and GCC handle the corresponding `-fprofile-generate` flag. In particular, the flag now optionally takes a directory to place the profiling data in and allows to omit the argument (instead of having to pass an empty string).
…, r=QuietMisdreavus

Don't generate empty json variables

r? @rust-lang/rustdoc
…t-stack-sizes-gc-sections-ld-gold-bug, r=alexcrichton

Revert "compile crates under test w/ -Zemit-stack-sizes"

Revert PR rust-lang#59401 to fix issue rust-lang#59652 (a stable-to-beta regression).

This is result of squashing two revert commits:

Revert "compile all crates under test w/ -Zemit-stack-sizes"

This reverts commit 7d365cf.

Revert "bootstrap: build compiler-builtins with -Z emit-stack-sizes"

This reverts commit 8b8488c.

----

(My intention is that someone can re-add this code again later, either after the `ld.gold` issue itself is fixed, or with safe-guards to check whether `ld.gold` is in use and then issuing warnings about the problems here when they arise.)
@Centril
Copy link
Contributor Author

Centril commented Apr 13, 2019

@bors r+ p=8

@bors
Copy link
Contributor

bors commented Apr 13, 2019

📌 Commit 6319184 has been approved by Centril

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Apr 13, 2019
@bors
Copy link
Contributor

bors commented Apr 13, 2019

⌛ Testing commit 6319184 with merge 7eba7a08ad89cfeb893528ca92e7ecc793ad2218...

@bors
Copy link
Contributor

bors commented Apr 13, 2019

💔 Test failed - checks-travis

@rust-highfive
Copy link
Collaborator

The job dist-i586-gnu-i586-i686-musl of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[01:03:58] diff of stderr:
[01:03:58] 
[01:03:58] 1 error: the type `TYPE` is too big for the current architecture
[01:03:58] 2 
[01:03:58] + thread '<unnamed>' panicked at 'Metadata module not compiled?', src/libcore/option.rs:1034:5
[01:03:58] + note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
[01:03:58] 4 
[01:03:58] 5 
[01:03:58] 
[01:03:58] 
[01:03:58] 
[01:03:58] The actual stderr differed from the expected stderr.
[01:03:58] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/huge-enum/huge-enum.stderr
[01:03:58] To update references, rerun the tests and pass the `--bless` flag
[01:03:58] To only update this specific test, also pass `--test-args huge-enum.rs`
[01:03:58] error: 1 errors occurred comparing output.
[01:03:58] status: exit code: 1
[01:03:58] status: exit code: 1
[01:03:58] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/huge-enum.rs" "-Zthreads=1" "--target=i686-unknown-linux-musl" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/huge-enum/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/i686-unknown-linux-musl/native/rust-test-helpers" "-Clinker=/musl-i686/bin/musl-gcc" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/huge-enum/auxiliary" "-A" "unused"
[01:03:58] ------------------------------------------
[01:03:58] 
[01:03:58] ------------------------------------------
[01:03:58] stderr:
[01:03:58] stderr:
[01:03:58] ------------------------------------------
[01:03:58] {"message":"the type `std::option::Option<[u32; 536870911]>` is too big for the current architecture","code":null,"level":"error","spans":[],"children":[],"rendered":"error: the type `std::option::Option<[u32; 536870911]>` is too big for the current architecture\n\n"}
[01:03:58] thread '<unnamed>' panicked at 'Metadata module not compiled?', src/libcore/option.rs:1034:5
[01:03:58] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[01:03:58] 
[01:03:58] ------------------------------------------
[01:03:58] 
---
[01:03:58] 
[01:03:58] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:516:22
[01:03:58] 
[01:03:58] 
[01:03:58] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/i686-unknown-linux-musl/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-i686-unknown-linux-musl" "--mode" "ui" "--target" "i686-unknown-linux-musl" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--linker" "/musl-i686/bin/musl-gcc" "--host-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/i686-unknown-linux-musl/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--llvm-version" "8.0.0-rust-1.35.0-nightly\n" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:03:58] 
[01:03:58] 
[01:03:58] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --target i586-unknown-linux-gnu,i686-unknown-linux-musl
[01:03:58] Build completed unsuccessfully in 1:00:37
---
travis_time:end:0048f4f8:start=1555193854506374976,finish=1555193854528977784,duration=22602808
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:013ffec0
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:0291c946
travis_time:start:0291c946
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:201bf247
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 13, 2019
@Centril Centril closed this Apr 13, 2019
@Centril Centril deleted the rollup-6f3dag0 branch April 13, 2019 22:36
@Centril Centril added the rollup A PR which is a rollup label Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants