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

add system-llvm-libunwind config option #77703

Merged
merged 1 commit into from
Oct 27, 2020

Conversation

Keruspe
Copy link
Contributor

@Keruspe Keruspe commented Oct 8, 2020

allows using the system-wide llvm-libunwind as the unwinder

Workaround for #76020

@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 8, 2020
@Mark-Simulacrum
Copy link
Member

cc @cuviper

Do we not expect to be able to fix the linked issue? I would prefer to fix the build rather than working around it like this.

I would also prefer that this not be a separate option that controls two things, that seems error prone -- can we instead make the current llvm-libunwind option take either "system" or "in-tree" or something like that?

@Keruspe
Copy link
Contributor Author

Keruspe commented Oct 9, 2020

@Mark-Simulacrum I don't know if/how the issue is fixable atm, but regardless I think it could be a useful option to be able to use the system llvm-libunwind.

Just pushed a less intrusive version, using llvm-libunwind=system as you suggested

@cuviper
Copy link
Member

cuviper commented Oct 9, 2020

cc @cuviper

For my part, we don't even have llvm-libunwind packages.

@Keruspe
Copy link
Contributor Author

Keruspe commented Oct 11, 2020

Proper fix for the initial issue in #77815

@Keruspe
Copy link
Contributor Author

Keruspe commented Oct 13, 2020

Regardless of #77815, I think it would be a good thing to get this option in

library/unwind/build.rs Outdated Show resolved Hide resolved
src/bootstrap/config.rs Outdated Show resolved Hide resolved
config.toml.example Show resolved Hide resolved
@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 13, 2020
@Keruspe
Copy link
Contributor Author

Keruspe commented Oct 13, 2020

Fwiw, with this PR, lddtree on stage1 rustc:

llvm-libunwind disabled:

rustc => bin/rustc (interpreter => /usr/x86_64-pc-linux-gnu/lib/ld-linux-x86-64.so.2)
    librustc_driver-cda070a11d817f0b.so => bin/../lib/librustc_driver-cda070a11d817f0b.so
        libz.so.1 => /usr/host/lib/libz.so.1
        libdl.so.2 => /usr/host/lib/libdl.so.2
        libpthread.so.0 => /usr/host/lib/libpthread.so.0
        libm.so.6 => /usr/host/lib/libm.so.6
        libstdc++.so.6 => /usr/host/lib/libstdc++.so.6
        libgcc_s.so.1 => /usr/host/lib/libgcc_s.so.1
        ld-linux-x86-64.so.2 => /usr/x86_64-pc-linux-gnu/lib/ld-linux-x86-64.so.2
    libstd-ebe70738ef90f50c.so => bin/../lib/libstd-ebe70738ef90f50c.so
    libc.so.6 => /usr/host/lib/libc.so.6

llvm-libunwind in-tree still fails the same way it currently does

llvm-libunwind system:

rustc => bin/rustc (interpreter => /usr/x86_64-pc-linux-gnu/lib/ld-linux-x86-64.so.2)
    librustc_driver-cda070a11d817f0b.so => bin/../lib/librustc_driver-cda070a11d817f0b.so
        libz.so.1 => /usr/host/lib/libz.so.1
        libdl.so.2 => /usr/host/lib/libdl.so.2
        libpthread.so.0 => /usr/host/lib/libpthread.so.0
        libm.so.6 => /usr/host/lib/libm.so.6
        libstdc++.so.6 => /usr/host/lib/libstdc++.so.6
        libunwind.so.1 => /usr/host/lib/libunwind.so.1
        ld-linux-x86-64.so.2 => /usr/x86_64-pc-linux-gnu/lib/ld-linux-x86-64.so.2
    libstd-310057861b09b0d1.so => bin/../lib/libstd-310057861b09b0d1.so
    libc.so.6 => /usr/host/lib/libc.so.6

@Keruspe
Copy link
Contributor Author

Keruspe commented Oct 17, 2020

@Mark-Simulacrum Did some more testing on some of my systems and I think this is good to go now?

@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 17, 2020
@Keruspe
Copy link
Contributor Author

Keruspe commented Oct 21, 2020

Not sure what happened with CI here

@Mark-Simulacrum
Copy link
Member

r=me with commits squashed

@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 26, 2020
@Keruspe
Copy link
Contributor Author

Keruspe commented Oct 26, 2020

@Mark-Simulacrum squashed

@Mark-Simulacrum
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Oct 26, 2020

📌 Commit 66fa42a has been approved by Mark-Simulacrum

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 26, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 27, 2020
Rollup of 16 pull requests

Successful merges:

 - rust-lang#76635 (Add [T]::as_chunks(_mut))
 - rust-lang#77703 (add system-llvm-libunwind config option)
 - rust-lang#78219 (Prefer to use `print_def_path`)
 - rust-lang#78298 (Add test for bad NLL higher-ranked subtype)
 - rust-lang#78332 (Update description for error E0308)
 - rust-lang#78342 (Use check-pass in single-use-lifetime ui tests)
 - rust-lang#78347 (Add lexicographical comparison doc)
 - rust-lang#78348 (Make some functions private that don't have to be public)
 - rust-lang#78349 (Use its own `TypeckResults` to avoid ICE)
 - rust-lang#78375 (Use ? in core/std macros)
 - rust-lang#78377 (Fix typo in debug statement)
 - rust-lang#78388 (Add some regression tests)
 - rust-lang#78394 (fix(docs): typo in BufWriter documentation)
 - rust-lang#78396 (Add compiler support for LLVM's x86_64 ERMSB feature)
 - rust-lang#78405 (Fix typo in lint description)
 - rust-lang#78412 (Improve formatting of hash collections docs)

Failed merges:

r? `@ghost`
@bors bors merged commit 2c307fa into rust-lang:master Oct 27, 2020
@rustbot rustbot added this to the 1.49.0 milestone Oct 27, 2020
@tmandry
Copy link
Member

tmandry commented Oct 28, 2020

This was a breaking change to config.toml, so it deserves an entry in the bootstrap changelog or general changelog. I don't think changelog-seen needs a bump here since the breaking change always results in an error for anyone who was using this.

@rustbot modify labels: +relnotes

@rustbot rustbot added the relnotes Marks issues that should be documented in the release notes of the next release. label Oct 28, 2020
@Mark-Simulacrum
Copy link
Member

Hm, good point. I should really do better at doing so. Would you be up for filing a PR to update the bootstrap changelog? I think general changelog is too high level for this right now.

tmandry added a commit that referenced this pull request Dec 28, 2020
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Dec 29, 2020
…imulacrum

Add llvm-libunwind change to bootstrap CHANGELOG

From rust-lang#77703.

This doesn't need a `changelog-seen` version bump because the old values aren't accepted anymore, meaning anyone who was using this had to change it already.

r? `@Mark-Simulacrum`
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Dec 30, 2020
…imulacrum

Add llvm-libunwind change to bootstrap CHANGELOG

From rust-lang#77703.

This doesn't need a `changelog-seen` version bump because the old values aren't accepted anymore, meaning anyone who was using this had to change it already.

r? ``@Mark-Simulacrum``
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Feb 14, 2021
Pkgsrc changes:
 * Adjust patches, convert tabs to spaces so that tests pass.
 * Remove patches which are no longer needed (upstream changed)
 * Minor adjustments for SunOS, e.g. disable stack probes.
 * Adjust cargo checksum patching accordingly.
 * Remove commented-out use of PATCHELF on NetBSD, which doesn't work anyway...

Upstream changes:

Version 1.49.0 (2020-12-31)
============================

Language
-----------------------

- [Unions can now implement `Drop`, and you can now have a field in a union
  with `ManuallyDrop<T>`.][77547]
- [You can now cast uninhabited enums to integers.][76199]
- [You can now bind by reference and by move in patterns.][76119] This
  allows you to selectively borrow individual components of a type. E.g.
  ```rust
  #[derive(Debug)]
  struct Person {
      name: String,
      age: u8,
  }

  let person = Person {
      name: String::from("Alice"),
      age: 20,
  };

  // `name` is moved out of person, but `age` is referenced.
  let Person { name, ref age } = person;
  println!("{} {}", name, age);
  ```

Compiler
-----------------------

- [Added tier 1\* support for `aarch64-unknown-linux-gnu`.][78228]
- [Added tier 2 support for `aarch64-apple-darwin`.][75991]
- [Added tier 2 support for `aarch64-pc-windows-msvc`.][75914]
- [Added tier 3 support for `mipsel-unknown-none`.][78676]
- [Raised the minimum supported LLVM version to LLVM 9.][78848]
- [Output from threads spawned in tests is now captured.][78227]
- [Change os and vendor values to "none" and "unknown" for some targets][78951]

\* Refer to Rust's [platform support page][forge-platform-support] for more
information on Rust's tiered platform support.

Libraries
-----------------------

- [`RangeInclusive` now checks for exhaustion when calling `contains`
  and indexing.][78109]
- [`ToString::to_string` now no longer shrinks the internal buffer
  in the default implementation.][77997]
- [`ops::{Index, IndexMut}` are now implemented for fixed sized
  arrays of any length.][74989]

Stabilized APIs
---------------

- [`slice::select_nth_unstable`]
- [`slice::select_nth_unstable_by`]
- [`slice::select_nth_unstable_by_key`]

The following previously stable methods are now `const`.

- [`Poll::is_ready`]
- [`Poll::is_pending`]

Cargo
-----------------------
- [Building a crate with `cargo-package` should now be independently
  reproducible.][cargo/8864]
- [`cargo-tree` now marks proc-macro crates.][cargo/8765]
- [Added `CARGO_PRIMARY_PACKAGE` build-time environment
  variable.]  [cargo/8758] This variable will be set if the crate
  being built is one the user selected to build, either with `-p`
  or through defaults.
- [You can now use glob patterns when specifying packages &
  targets.][cargo/8752]


Compatibility Notes
-------------------
- [Demoted `i686-unknown-freebsd` from host tier 2 to target tier
  2 support.][78746]
- [Macros that end with a semi-colon are now treated as statements
  even if they expand to nothing.][78376]
- [Rustc will now check for the validity of some built-in attributes
  on enum variants.][77015] Previously such invalid or unused
  attributes could be ignored.
- Leading whitespace is stripped more uniformly in documentation
  comments, which may change behavior. You read [this post about
  the changes][rustdoc-ws-post] for more details.
- [Trait bounds are no longer inferred for associated types.][79904]

Internal Only
-------------
These changes provide no direct user facing benefits, but represent
significant improvements to the internals and overall performance
of rustc and related tools.

- [rustc's internal crates are now compiled using the `initial-exec` Thread
  Local Storage model.][78201]
- [Calculate visibilities once in resolve.][78077]
- [Added `system` to the `llvm-libunwind` bootstrap config option.][77703]
- [Added `--color` for configuring terminal color support to bootstrap.][79004]


[75991]: rust-lang/rust#75991
[78951]: rust-lang/rust#78951
[78848]: rust-lang/rust#78848
[78746]: rust-lang/rust#78746
[78376]: rust-lang/rust#78376
[78228]: rust-lang/rust#78228
[78227]: rust-lang/rust#78227
[78201]: rust-lang/rust#78201
[78109]: rust-lang/rust#78109
[78077]: rust-lang/rust#78077
[77997]: rust-lang/rust#77997
[77703]: rust-lang/rust#77703
[77547]: rust-lang/rust#77547
[77015]: rust-lang/rust#77015
[76199]: rust-lang/rust#76199
[76119]: rust-lang/rust#76119
[75914]: rust-lang/rust#75914
[74989]: rust-lang/rust#74989
[79004]: rust-lang/rust#79004
[78676]: rust-lang/rust#78676
[79904]: rust-lang/rust#79904
[cargo/8864]: rust-lang/cargo#8864
[cargo/8765]: rust-lang/cargo#8765
[cargo/8758]: rust-lang/cargo#8758
[cargo/8752]: rust-lang/cargo#8752
[`slice::select_nth_unstable`]: https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.select_nth_unstable
[`slice::select_nth_unstable_by`]: https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.select_nth_unstable_by
[`slice::select_nth_unstable_by_key`]: https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.select_nth_unstable_by_key
[`hint::spin_loop`]: https://doc.rust-lang.org/stable/std/hint/fn.spin_loop.html
[`Poll::is_ready`]: https://doc.rust-lang.org/stable/std/task/enum.Poll.html#method.is_ready
[`Poll::is_pending`]: https://doc.rust-lang.org/stable/std/task/enum.Poll.html#method.is_pending
[rustdoc-ws-post]: https://blog.guillaume-gomez.fr/articles/2020-11-11+New+doc+comment+handling+in+rustdoc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants