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 10 pull requests #74243

Closed
wants to merge 27 commits into from

Conversation

Manishearth
Copy link
Member

Successful merges:

Failed merges:

r? @ghost

MaulingMonkey and others added 27 commits June 24, 2020 19:28
- Mangles (T0, T1) as tuple<T0, T1>, possibly unblocking rust-lang#70052 "Update hashbrown to 0.8.0"
- Prettifies Rust tuples similar to VS2017's std::tuple
- Improves debuginfo test coverage
PDB debug information doesn't appear to be emitted for basic types.
By defining u32 as a typedef for unsigned __int32 when targeting MSVC,
we allow CDB and other debuggers to recognize "u32" as a type/expression.

This in turn unblocks rust-lang#70052 "Update hashbrown to 0.8.0" by
allowing $T1 ..= $T3 to resolve, which would otherwise fail to resolve
when builtin types fail to parse.
This patch avoids undefined behavior by linking different object files.
Also this would it could be propagated properly to LTO.

See https://reviews.llvm.org/D52322 and https://reviews.llvm.org/D52323.
When cross-compiling, the LLVM build system recurses to build tools
that need to run on the host system. However, since we pass cmake defines
to set the compiler and target, LLVM still compiles these tools for the
target system, rather than the host. The tools then fail to execute
during the LLVM build.

This change sets defines for the tools that need to run on the
host (llvm-nm, llvm-tablegen, and llvm-config), so that the LLVM build
does not attempt to build them, and instead relies on the tools already built.

If compiling with clang-cl, this change also adds the `--target` option
to specify the target triple. MSVC compilers do not require this, since there
is a separate compiler binary for cross-compilation.
As of rust-lang#73564, the --eh-frame-hdr flag is unconditionally
passed to linkers on many platforms.  The illumos link editor does not
currently support this flag.

The linker machinery in the Rust toolchain currently seems to use the
(potentially cross-compiled) target to choose linker flags, rather than
looking at what might be running on the build system.  Disabling the
flag for all illumos/Solaris targets seems like the best we can do for
now without more serious surgery.
Use `matches!` instead of old `if let`
Stabilize `transmute` in constants and statics but not const fn

cc rust-lang#53605 (leaving issue open so we can add `transmute` to `const fn` later)

Previous attempt: rust-lang#64011

r? @RalfJung

cc @rust-lang/wg-const-eval
…manieu

debuginfo:  Mangle tuples to be natvis friendly, typedef basic types

These changes are meant to unblock rust-lang#70052 "Update hashbrown to 0.8.0" by allowing the use of `tuple<u64, u64>` as a .natvis expression in MSVC style debuggers (MSVC, WinDbg, CDB, etc.)

* f8eb81b does the actual mangling of `(u64, u64)` -> `tuple<u64, 64>`
* 24a728a allows `u64` to resolve (fixing `$T1` / `$T2` when used to visualize `HashMap<u64, u64, ...>`)
Add support for storing code model to LLVM module IR

This patch avoids undefined behavior by linking different object files.
Also this would it could be propagated properly to LTO.

See https://reviews.llvm.org/D52322 and https://reviews.llvm.org/D52323.
Fix cross compilation of LLVM to aarch64 Windows targets

When cross-compiling, the LLVM build system recurses to build tools that need to run on the host system. However, since we pass cmake defines to set the compiler and target, LLVM still compiles these tools for the target system, rather than the host. The tools then fail to execute during the LLVM build.

This change sets defines for the tools that need to run on the host (llvm-nm, llvm-tablegen, and llvm-config), so that the LLVM build does not attempt to build them, and instead relies on the tools already built.

If compiling with clang-cl, adds the `--target` option to specify the target triple. MSVC compilers do not require this, since there is a separate compiler binary for each cross-compilation target.

Related issue: rust-lang#72881
Requires LLVM change: rust-lang/llvm-project#67
…-fix, r=petrochenkov

linker: illumos ld does not support --eh-frame-hdr

As of rust-lang#73564, the --eh-frame-hdr flag is unconditionally
passed to linkers on many platforms.  The illumos link editor does not
currently support this flag.

The linker machinery in the Rust toolchain currently seems to use the
(potentially cross-compiled) target to choose linker flags, rather than
looking at what might be running on the build system.  Disabling the
flag for all illumos/Solaris targets seems like the best we can do for
now without more serious surgery.
…s, r=petrochenkov

Add a help to use `in_band_lifetimes` in nightly

Fixes rust-lang#73775
Minor refactor for rustc_resolve diagnostics match

Use `matches!` instead of old `if let`
update miri

This incorporates rust-lang/miri#1474. [Last time](rust-lang#74146) that change caused trouble but I fixed xargo since then and [now it should work](rust-lang#74146 (comment)).

Cc @rust-lang/miri r? @ghost
@Manishearth
Copy link
Member Author

@rustbot modify labels: +rollup
@bors r+ rollup=never p=5

@rustbot rustbot added the rollup A PR which is a rollup label Jul 11, 2020
@bors
Copy link
Contributor

bors commented Jul 11, 2020

📌 Commit d6c4c9e has been approved by Manishearth

@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 Jul 11, 2020
@bors
Copy link
Contributor

bors commented Jul 11, 2020

⌛ Testing commit d6c4c9e with merge 88ef62950e85497518bbc56a412ad6e9b7aa62ad...

@bors
Copy link
Contributor

bors commented Jul 11, 2020

💔 Test failed - checks-actions

@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 Jul 11, 2020
@Manishearth
Copy link
Member Author

2020-07-11T15:40:58.7249200Z test [codegen] codegen/lto-removes-invokes.rs ... �[32mok�(B�[m
2020-07-11T15:40:58.7249787Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:344:22
2020-07-11T15:40:58.7249896Z 
2020-07-11T15:40:58.7250031Z failures:
2020-07-11T15:40:58.7250117Z 
2020-07-11T15:40:58.7250446Z ---- [codegen] codegen/codemodels.rs#MODEL-KERNEL stdout ----
2020-07-11T15:40:58.7250533Z 
2020-07-11T15:40:58.7250832Z error in revision `MODEL-KERNEL`: compilation failed!
2020-07-11T15:40:58.7250984Z status: exit code: 101
2020-07-11T15:40:58.7251937Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/codegen/codemodels.rs" "-Zthreads=1" "--target=wasm32-unknown-emscripten" "--cfg" "model_kernel" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/codemodels.MODEL-KERNEL" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/wasm32-unknown-emscripten/native/rust-test-helpers" "-C" "code-model=kernel" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/codemodels.MODEL-KERNEL/auxiliary" "--emit=llvm-ir"
2020-07-11T15:40:58.7252879Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2020-07-11T15:40:58.7255604Z stdout:
2020-07-11T15:40:58.7256264Z ------------------------------------------
2020-07-11T15:40:58.7256379Z 
2020-07-11T15:40:58.7256718Z ------------------------------------------
2020-07-11T15:40:58.7256998Z stderr:
2020-07-11T15:40:58.7257310Z ------------------------------------------
2020-07-11T15:40:58.7257477Z LLVM ERROR: Target does not support the kernel CodeModel
2020-07-11T15:40:58.7257585Z 
2020-07-11T15:40:58.7257875Z ------------------------------------------
2020-07-11T15:40:58.7257970Z 
2020-07-11T15:40:58.7258033Z 
2020-07-11T15:40:58.7258112Z 
2020-07-11T15:40:58.7258242Z failures:
2020-07-11T15:40:58.7258545Z     [codegen] codegen/codemodels.rs#MODEL-KERNEL
2020-07-11T15:40:58.7258626Z 
2020-07-11T15:40:58.7259007Z test result: �[31mFAILED�(B�[m. 150 passed; 1 failed; 59 ignored; 0 measured; 0 filtered out

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.

rustfmt no longer builds after rust-lang/rust#74073