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

Fix up setting strip = true in Cargo.toml makes build scripts fail in… #130781

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

monkeydbobo
Copy link
Contributor

Fix issue: #110536
Strip binary is PATH dependent which breaks builds in MacOS.
For example, on my Mac, the output of 'which strip' is '/opt/homebrew/opt/binutils/bin/strip', which leads to incorrect 'strip' results. Therefore, just like on other systems, it is also necessary to specify 'stripcmd' on macOS. However, it seems that there is a bug in binutils bugzilla-Bug 31571, which leads to the problem mentioned above.

@rustbot
Copy link
Collaborator

rustbot commented Sep 24, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @davidtwco (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added 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. labels Sep 24, 2024
@jieyouxu jieyouxu added the O-macos Operating system: macOS label Sep 24, 2024
@davidtwco
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Sep 25, 2024

📌 Commit 802bf71 has been approved by davidtwco

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 Sep 25, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 25, 2024
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#130735 (Simple validation for unsize coercion in MIR validation)
 - rust-lang#130781 (Fix up setting strip = true in Cargo.toml makes build scripts fail in…)
 - rust-lang#130811 (add link from random() helper fn to extensive DefaultRandomSource docs)
 - rust-lang#130819 (Add `must_use` attribute to `len_utf8` and `len_utf16`.)
 - rust-lang#130832 (fix some cfg logic around optimize_for_size and 16-bit targets)
 - rust-lang#130842 (Add tracking issue for io_error_inprogress)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 81ac893 into rust-lang:master Sep 25, 2024
6 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Sep 25, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Sep 25, 2024
Rollup merge of rust-lang#130781 - monkeydbobo:mdb/fix_up_cross_compile_osx, r=davidtwco

Fix up setting strip = true in Cargo.toml makes build scripts fail in…

Fix issue: rust-lang#110536
Strip binary is PATH dependent which breaks builds in MacOS.
For example, on my Mac, the output of 'which strip' is '/opt/homebrew/opt/binutils/bin/strip', which leads to incorrect 'strip' results. Therefore, just like on other systems, it is also necessary to specify 'stripcmd' on macOS. However, it seems that there is a bug in binutils [bugzilla-Bug 31571](https://sourceware.org/bugzilla/show_bug.cgi?id=31571), which leads to the problem mentioned above.
rvolosatovs added a commit to rvolosatovs/nixify that referenced this pull request Oct 3, 2024
pin to version before rust-lang-ci/rust@0399709
rust-lang/rust#130781
rust-lang/rust#131206

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
rvolosatovs added a commit to rvolosatovs/nixify that referenced this pull request Oct 3, 2024
pin to version before rust-lang-ci/rust@0399709
rust-lang/rust#130781
rust-lang/rust#131206

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
rvolosatovs added a commit to rvolosatovs/nixify that referenced this pull request Oct 3, 2024
pin to version before rust-lang-ci/rust@0399709
rust-lang/rust#130781
rust-lang/rust#131206

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 5, 2024
…=jieyouxu,albertlarsan68

bootstrap/codegen_ssa: ship llvm-strip and use it for -Cstrip

Fixes rust-lang#131206.

- Includes `llvm-strip` (a symlink to `llvm-objcopy`) in the compiler dist artifact so that it can be used for `-Cstrip` instead of the system tooling.
- Uses `llvm-strip` instead of `/usr/bin/strip` for macOS. macOS needs a specific linker and the system one is preferred, hence rust-lang#130781 but that doesn't work when cross-compiling, so use the `llvm-strip` utility instead.

cc rust-lang#123151
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Nov 6, 2024
Rollup merge of rust-lang#131405 - davidtwco:hardcoded-strip-macos, r=jieyouxu,albertlarsan68

bootstrap/codegen_ssa: ship llvm-strip and use it for -Cstrip

Fixes rust-lang#131206.

- Includes `llvm-strip` (a symlink to `llvm-objcopy`) in the compiler dist artifact so that it can be used for `-Cstrip` instead of the system tooling.
- Uses `llvm-strip` instead of `/usr/bin/strip` for macOS. macOS needs a specific linker and the system one is preferred, hence rust-lang#130781 but that doesn't work when cross-compiling, so use the `llvm-strip` utility instead.

cc rust-lang#123151
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-macos Operating system: macOS S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

5 participants