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

Move most of unwind's build script to lib.rs #104241

Merged
merged 1 commit into from
Nov 15, 2022

Conversation

bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Nov 10, 2022

Only the android libunwind detection remains in the build script

  • Reduces dependence on build scripts for building the standard library
  • Reduces dependence on exact target names in favor of using semantic cfg(target_*) usage.
  • Keeps almost all code related to linking of the unwinder in one file

@rustbot
Copy link
Collaborator

rustbot commented Nov 10, 2022

r? @Mark-Simulacrum

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

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 10, 2022
@rustbot
Copy link
Collaborator

rustbot commented Nov 10, 2022

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@@ -108,3 +108,27 @@ extern "C" {}
#[cfg(all(target_os = "windows", target_env = "gnu", target_abi = "llvm"))]
#[link(name = "unwind", kind = "static", modifiers = "-bundle")]
extern "C" {}

#[cfg(any(target_os = "freebsd", target_os = "netbsd"))]
#[link(name = "gcc_s")]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Several of the existing #[link] attributes use kind = "static", modifiers = "-bundle", but to keep behavior unchanged I didn't do this in the new #[link] attributes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those new targets don't need to use kind = "static", as the dynamic library are part of the base system.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On sparc64-unknown-openbsd libgcc is used, which is a static library afaik.

@Mark-Simulacrum
Copy link
Member

Seems like an improvement, thanks!

@bors r+

@bors
Copy link
Contributor

bors commented Nov 13, 2022

📌 Commit c2c88e631345fffd15a4f0c480248a76ee849d88 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@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-review Status: Awaiting review from the assignee but also interested parties. labels Nov 13, 2022
@bors
Copy link
Contributor

bors commented Nov 14, 2022

☔ The latest upstream changes (presumably #103894) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 14, 2022
Only the android libunwind detection remains in the build script

* Reduces dependence on build scripts for building the standard library
* Reduces dependence on exact target names in favor of using semantic
  cfg(target_*) usage.
* Keeps almost all code related to linking of the unwinder in one file
@bjorn3
Copy link
Member Author

bjorn3 commented Nov 14, 2022

Rebased and fixed conflict.

@Mark-Simulacrum
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Nov 14, 2022

📌 Commit 53852ee has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@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 Nov 14, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 15, 2022
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#103439 (Show note where the macro failed to match)
 - rust-lang#103734 (Adjust stabilization version to 1.65.0 for wasi fds)
 - rust-lang#104148 (Visit attributes of trait impl items during AST validation)
 - rust-lang#104241 (Move most of unwind's build script to lib.rs)
 - rust-lang#104258 (Deduce closure signature from a type alias `impl Trait`'s supertraits)
 - rust-lang#104296 (Walk types more carefully in `ProhibitOpaqueTypes` visitor)
 - rust-lang#104309 (Slightly improve error message for invalid identifier)
 - rust-lang#104316 (Simplify suggestions for errors in generators.)
 - rust-lang#104339 (Add `rustc_deny_explicit_impl`)

Failed merges:

 - rust-lang#103484 (Add `rust` to `let_underscore_lock` example)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit add6f14 into rust-lang:master Nov 15, 2022
@rustbot rustbot added this to the 1.67.0 milestone Nov 15, 2022
@bjorn3 bjorn3 deleted the smaller_unwind_build_script branch November 15, 2022 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

5 participants