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 7 pull requests #94807

Closed
wants to merge 20 commits into from
Closed

Conversation

Dylan-DPC
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Jeff and others added 20 commits March 3, 2022 19:45
PR rust-lang#93918 made it so that `-static-libstdc++` was only set in one place,
and was only set during linking, but accidentally also made it so that
it is no longer passed when building LLD or sanitizers, only when
building LLVM itself. This moves the logic for setting
`-static-libstdc++` in the linker flags back to `configure_cmake` so
that it takes effect for all CMake invocations in `native.rs`.

As a side-effect, this also causes libstdc++ to be statically compiled
into sanitizers and LLD if `llvm-tools-enabled` is set but
`llvm-static-stdcpp` is not, even though previously it was only linked
statically if `llvm-static-stdcpp` was set explicitly. But that seems
more like the expected behavior anyway.
…r=Mark-Simulacrum

Use in-tree libunwind by default on Fuchsia

Fuchsia doesn't ship libunwind in its SDK, so we must provide it statically.
…aaaa, r=petrochenkov

[1/2] Implement macro meta-variable expressions

See rust-lang#93545 (comment)

The logic behind `length`, `index` and `count` was removed but the parsing code is still present, i.e., everything is simply ignored like `ignored`.

r? `@petrochenkov`
Better error for normalization errors from parent crates that use `#![feature(generic_const_exprs)]`

This PR implements a somewhat rudimentary heuristic to suggest using `#![feature(generic_const_exprs)]` in a child crate when a function from a foreign crate (that may have used `#![feature(generic_const_exprs)]`) fails to normalize during codegen.

cc: rust-lang#79018
cc: rust-lang#94287
…ottmcm

Document new recommended use of `FromIterator::from_iter`

rust-lang#90107
Most of the added prose was paraphrased from the links provided in the issue. The suggested `VecDeque` example seemed to make the point well enough so I just used that.
…ss, r=joshtriplett

Fix soundness issue in scoped threads.

This was discovered in rust-lang#94559 (comment)

The `scope()` function returns when all threads are finished, but I accidentally considered a thread 'finished' before dropping their panic payload or ignored return value.

So if a thread returned (or panics with) something that in its `Drop` implementation still uses borrowed stuff, it goes wrong.

https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=2a1f19ac4676cdabe43e24e536ff9358
…mulacrum

Statically compile libstdc++ everywhere if asked

PR rust-lang#93918 made it so that `-static-libstdc++` was only set in one place,
and was only set during linking, but accidentally also made it so that
it is no longer passed when building LLD, only when building LLVM
itself. This moves the logic for setting `-static-libstdc++` in the
linker flags to `configure_cmake` so that it takes effect for all CMake
invocations in `native.rs`.

As a side-effect, this also causes libstdc++ to be statically compiled
into sanitizers, whereas previously the `llvm-static-stdcpp` flag had no
effect on sanitizers. It also makes it so that LLD will be compiled
statically if `llvm-tools-enabled` is set, even though previously it was
only linked statically if `llvm-static-stdcpp` was set explicitly. Both
of these seem like they match expected behavior than what was there
prior to rust-lang#93918.
…eta, r=michaelwoerister

Only emit pointer-like metadata for `Box<T, A>` when `A` is ZST

Basically copy the change in rust-lang#94043, but for debuginfo.

r? `@michaelwoerister`

Fixes rust-lang#94725
@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Mar 10, 2022
@Dylan-DPC
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Mar 10, 2022

📌 Commit a17d8a0 has been approved by Dylan-DPC

@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 Mar 10, 2022
@bors
Copy link
Contributor

bors commented Mar 10, 2022

⌛ Testing commit a17d8a0 with merge 24d81d6287a79a7c3c1dd58488ce68a9c3ba7796...

@rust-log-analyzer
Copy link
Collaborator

The job dist-various-2 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
running: "x86_64-fuchsia-clang++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=x86_64-fuchsia" "-I" "/checkout/src/llvm-project/libunwind/include" "-nostdinc++" "-fno-exceptions" "-fno-rtti" "-fstrict-aliasing" "-funwind-tables" "-fvisibility=hidden" "-D_LIBUNWIND_DISABLE_VISIBILITY_ANNOTATIONS" "-o" "/checkout/obj/build/x86_64-fuchsia/native/libunwind/Unwind-EHABI.o" "-c" "/checkout/src/llvm-project/libunwind/src/Unwind-EHABI.cpp"
exit status: 0
running: "x86_64-fuchsia-clang++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=x86_64-fuchsia" "-I" "/checkout/src/llvm-project/libunwind/include" "-nostdinc++" "-fno-exceptions" "-fno-rtti" "-fstrict-aliasing" "-funwind-tables" "-fvisibility=hidden" "-D_LIBUNWIND_DISABLE_VISIBILITY_ANNOTATIONS" "-o" "/checkout/obj/build/x86_64-fuchsia/native/libunwind/Unwind-seh.o" "-c" "/checkout/src/llvm-project/libunwind/src/Unwind-seh.cpp"
exit status: 0
running: "x86_64-fuchsia-clang++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=x86_64-fuchsia" "-I" "/checkout/src/llvm-project/libunwind/include" "-nostdinc++" "-fno-exceptions" "-fno-rtti" "-fstrict-aliasing" "-funwind-tables" "-fvisibility=hidden" "-D_LIBUNWIND_DISABLE_VISIBILITY_ANNOTATIONS" "-o" "/checkout/obj/build/x86_64-fuchsia/native/libunwind/libunwind.o" "-c" "/checkout/src/llvm-project/libunwind/src/libunwind.cpp"
cargo:warning=In file included from /checkout/src/llvm-project/libunwind/src/libunwind.cpp:30:
cargo:warning=In file included from /checkout/src/llvm-project/libunwind/src/AddressSpace.hpp:23:
cargo:warning=In file included from /checkout/src/llvm-project/libunwind/src/EHHeaderParser.hpp:17:
cargo:warning=In file included from /checkout/src/llvm-project/libunwind/src/DwarfParser.hpp:22:
cargo:warning=/checkout/src/llvm-project/libunwind/src/Registers.hpp:116:3: error: use of undeclared identifier 'static_assert'; did you mean 'static_cast'?
cargo:warning=  static_assert((check_fit<Registers_x86, unw_context_t>::does_fit),
cargo:warning=  ^
cargo:warning=/checkout/src/llvm-project/libunwind/src/Registers.hpp:342:3: error: use of undeclared identifier 'static_assert'; did you mean 'static_cast'?
cargo:warning=  static_assert((check_fit<Registers_x86_64, unw_context_t>::does_fit),
cargo:warning=  ^
cargo:warning=/checkout/src/llvm-project/libunwind/src/Registers.hpp:670:3: error: use of undeclared identifier 'static_assert'; did you mean 'static_cast'?
cargo:warning=  static_assert((check_fit<Registers_ppc, unw_context_t>::does_fit),
cargo:warning=  ^
cargo:warning=/checkout/src/llvm-project/libunwind/src/Registers.hpp:674:3: error: use of undeclared identifier 'static_assert'; did you mean 'static_cast'?
cargo:warning=  static_assert(sizeof(ppc_thread_state_t) == 160,
cargo:warning=  ^
cargo:warning=/checkout/src/llvm-project/libunwind/src/Registers.hpp:679:3: error: use of undeclared identifier 'static_assert'; did you mean 'static_cast'?
cargo:warning=  static_assert(sizeof(ppc_thread_state_t) + sizeof(ppc_float_state_t) == 424,
cargo:warning=  ^
cargo:warning=/checkout/src/llvm-project/libunwind/src/Registers.hpp:1237:3: error: use of undeclared identifier 'static_assert'; did you mean 'static_cast'?
cargo:warning=  static_assert((check_fit<Registers_ppc64, unw_context_t>::does_fit),
cargo:warning=  ^
cargo:warning=/checkout/src/llvm-project/libunwind/src/Registers.hpp:1241:3: error: use of undeclared identifier 'static_assert'; did you mean 'static_cast'?
cargo:warning=  static_assert(sizeof(_registers) == 312,
cargo:warning=  ^
cargo:warning=/checkout/src/llvm-project/libunwind/src/Registers.hpp:1246:3: error: use of undeclared identifier 'static_assert'; did you mean 'static_cast'?
cargo:warning=  static_assert(sizeof(_registers) +
cargo:warning=  ^
cargo:warning=/checkout/src/llvm-project/libunwind/src/Registers.hpp:1845:3: error: use of undeclared identifier 'static_assert'; did you mean 'static_cast'?
cargo:warning=  static_assert((check_fit<Registers_arm64, unw_context_t>::does_fit),
cargo:warning=  ^
cargo:warning=/checkout/src/llvm-project/libunwind/src/Registers.hpp:1848:3: error: use of undeclared identifier 'static_assert'; did you mean 'static_cast'?
cargo:warning=  static_assert(sizeof(GPRs) == 0x110,
cargo:warning=  ^
cargo:warning=/checkout/src/llvm-project/libunwind/src/Registers.hpp:2198:3: error: use of undeclared identifier 'static_assert'; did you mean 'static_cast'?
cargo:warning=  static_assert((check_fit<Registers_arm, unw_context_t>::does_fit),
cargo:warning=  ^
cargo:warning=/checkout/src/llvm-project/libunwind/src/Registers.hpp:2625:3: error: use of undeclared identifier 'static_assert'; did you mean 'static_cast'?
cargo:warning=  static_assert((check_fit<Registers_or1k, unw_context_t>::does_fit),
cargo:warning=  ^
cargo:warning=/checkout/src/llvm-project/libunwind/src/Registers.hpp:2831:3: error: use of undeclared identifier 'static_assert'; did you mean 'static_cast'?
cargo:warning=  static_assert((check_fit<Registers_mips_o32, unw_context_t>::does_fit),
cargo:warning=  ^
cargo:warning=/checkout/src/llvm-project/libunwind/src/Registers.hpp:3153:3: error: use of undeclared identifier 'static_assert'; did you mean 'static_cast'?
cargo:warning=  static_assert((check_fit<Registers_mips_newabi, unw_context_t>::does_fit),
cargo:warning=  ^
cargo:warning=/checkout/src/llvm-project/libunwind/src/Registers.hpp:3442:3: error: use of undeclared identifier 'static_assert'; did you mean 'static_cast'?
cargo:warning=  static_assert((check_fit<Registers_sparc, unw_context_t>::does_fit),
cargo:warning=  ^
cargo:warning=/checkout/src/llvm-project/libunwind/src/Registers.hpp:3595:25: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
cargo:warning=  Registers_sparc64() = default;
cargo:warning=                        ^
cargo:warning=/checkout/src/llvm-project/libunwind/src/Registers.hpp:3625:26: error: function definition does not declare parameters
cargo:warning=  sparc64_thread_state_t _registers{};
cargo:warning=                         ^
cargo:warning=/checkout/src/llvm-project/libunwind/src/Registers.hpp:3626:21: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=  uint64_t _wcookie = 0;
cargo:warning=                    ^
cargo:warning=/checkout/src/llvm-project/libunwind/src/Registers.hpp:3614:35: error: use of undeclared identifier '_registers'
cargo:warning=  uint64_t getSP() const { return _registers.__regs[UNW_SPARC_O6] + 2047; }
cargo:warning=                                  ^
cargo:warning=/checkout/src/llvm-project/libunwind/src/Registers.hpp:3615:32: error: use of undeclared identifier '_registers'
cargo:warning=  void setSP(uint64_t value) { _registers.__regs[UNW_SPARC_O6] = value - 2047; }
cargo:warning=                               ^
cargo:warning=/checkout/src/llvm-project/libunwind/src/Registers.hpp:3616:35: error: use of undeclared identifier '_registers'
cargo:warning=  uint64_t getIP() const { return _registers.__regs[UNW_SPARC_O7]; }
cargo:warning=                                  ^
cargo:warning=fatal error: too many errors emitted, stopping now [-ferror-limit=]
cargo:warning=2 warnings and 20 errors generated.
exit status: 1


error occurred: Command "x86_64-fuchsia-clang++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=x86_64-fuchsia" "-I" "/checkout/src/llvm-project/libunwind/include" "-nostdinc++" "-fno-exceptions" "-fno-rtti" "-fstrict-aliasing" "-funwind-tables" "-fvisibility=hidden" "-D_LIBUNWIND_DISABLE_VISIBILITY_ANNOTATIONS" "-o" "/checkout/obj/build/x86_64-fuchsia/native/libunwind/libunwind.o" "-c" "/checkout/src/llvm-project/libunwind/src/libunwind.cpp" with args "x86_64-fuchsia-clang++" did not execute successfully (status code exit status: 1).

Build completed unsuccessfully in 0:09:25

@bors
Copy link
Contributor

bors commented Mar 10, 2022

💔 Test failed - checks-actions

@bors bors removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Mar 10, 2022
@bors bors added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 10, 2022
@Dylan-DPC Dylan-DPC closed this Mar 10, 2022
@Dylan-DPC Dylan-DPC deleted the rollup-md5jg31 branch March 10, 2022 18:53
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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants