Skip to content

Conversation

cuviper
Copy link
Member

@cuviper cuviper commented Aug 15, 2018

The former code used target.contains("64") to detect Elf64 targets,
but this is inaccurate in a few cases:

  • s390x-unknown-linux-gnu is 64-bit
  • sparcv9-sun-solaris is 64-bit
  • x86_64-unknown-linux-gnux32 is 32-bit

Instead the std build script can use CARGO_CFG_TARGET_POINTER_WIDTH
to reliably detect 64-bit targets for libbacktrace.

Also update to backtrace-sys 0.1.24 for rust-lang/backtrace-rs#122.

The former code used `target.contains("64")` to detect Elf64 targets,
but this is inaccurate in a few cases:

- `s390x-unknown-linux-gnu` is 64-bit
- `sparcv9-sun-solaris` is 64-bit
- `x86_64-unknown-linux-gnux32` is 32-bit

Instead the `std` build script can use `CARGO_CFG_TARGET_POINTER_WIDTH`
to reliably detect 64-bit targets for libbacktrace.

Also update to backtrace-sys 0.1.24 for rust-lang/backtrace-rs#122.
@cuviper
Copy link
Member Author

cuviper commented Aug 15, 2018

r? @alexcrichton

Fixes #53372 when std has debuginfo, but I'm still seeing the backtrace tests hang when std does not have debuginfo. I will keep investigating that...

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Collaborator

bors commented Aug 15, 2018

📌 Commit e0d8364 has been approved by alexcrichton

@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 Aug 15, 2018
@cuviper cuviper added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Aug 15, 2018
kennytm added a commit to kennytm/rust that referenced this pull request Aug 16, 2018
…chton

std: Use target_pointer_width for BACKTRACE_ELF_SIZE

The former code used `target.contains("64")` to detect Elf64 targets,
but this is inaccurate in a few cases:

- `s390x-unknown-linux-gnu` is 64-bit
- `sparcv9-sun-solaris` is 64-bit
- `x86_64-unknown-linux-gnux32` is 32-bit

Instead the `std` build script can use `CARGO_CFG_TARGET_POINTER_WIDTH`
to reliably detect 64-bit targets for libbacktrace.

Also update to backtrace-sys 0.1.24 for rust-lang/backtrace-rs#122.
bors added a commit that referenced this pull request Aug 16, 2018
Rollup of 10 pull requests

Successful merges:

 - #52946 (Documented impl From on line 367 of libserialize/json.rs)
 - #53234 (Remove Travis shutdown debug scripts, and remove CI-specific DNS settings)
 - #53313 (Two small improvements)
 - #53360 (Addressed #51602)
 - #53364 (Warn if the user tries to use GATs)
 - #53373 (Tweak unclosed delimiter parser error)
 - #53377 (std: Use target_pointer_width for BACKTRACE_ELF_SIZE)
 - #53395 (Use #[non_exhaustive] on internal enums)
 - #53399 (Tidy: ignore non-Markdown files when linting for the Unstable Book)
 - #53412 (syntax_ext: remove leftover span_err_if_not_stage0 macro.)
@bors bors merged commit e0d8364 into rust-lang:master Aug 16, 2018
@pietroalbini pietroalbini added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Aug 25, 2018
@pietroalbini
Copy link
Member

Ping @rust-lang/libs, should this PR be backported to beta?

@alexcrichton alexcrichton added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Aug 30, 2018
@alexcrichton
Copy link
Member

Ah certainly! This is fine to backport

@pietroalbini pietroalbini removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Sep 1, 2018
bors added a commit that referenced this pull request Sep 1, 2018
[beta] Rollup backports

Merged and approved:

* #53653: Address two regressions
* #53377: std: Use target_pointer_width for BACKTRACE_ELF_SIZE
* #52969: rustbuild: fix local_rebuild

r? @ghost
bors added a commit that referenced this pull request Sep 4, 2018
[beta] update backtrace-sys to 0.1.24

This is the other part of #53377 that was missed in the #53880 backport.

r? @pietroalbini
@cuviper cuviper deleted the pointer-elf_size branch March 27, 2019 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants