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

LLVM 18 issue: tests/run-make/target-specs and rustdoc-target-spec-json-path broken after https://github.com/rust-lang/rust/commit/46652dd254bc9c413d14cec637c7f21ac6601e05 #120492

Closed
krasimirgg opened this issue Jan 30, 2024 · 2 comments · Fixed by #120529
Assignees
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@krasimirgg
Copy link
Contributor

The commit 46652dd added a check that stars firing due to the changes to the default target layouts in LLVM 18 (#116672):
https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/25552#018d505f-51d2-4820-8258-2f7b1b2ba0be/849-862

error: data-layout for target `my-awesome-platform-11748080347047929107`, `e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128`, differs from LLVM target's `i686-unknown-linux-gnu` default layout, `e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:32-n8:16:32-S128`
@krasimirgg krasimirgg added the C-bug Category: This is a bug. label Jan 30, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 30, 2024
@saethlin saethlin added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-testsuite Area: The testsuite used to check the correctness of rustc T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jan 30, 2024
@kennystrawnmusic
Copy link

Having this issue on x86_64-unknown-none as well:

error: data-layout for target `i686-stage-3-15880981762407934716`, `e-m:e-i32:32-f80:128-n8:16:32-S128-p:32:32`, differs from LLVM target's `i386-unknown-none` default layout, `e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128`

Why it's trying to compile for a 32-bit target is clearly beyond me because I'm using an entirely 64-bit host ― since @phil-opp happens to be the author of the crate this is failing on (namely, the 32-bit BIOS version of the bootloader crate which I explicitly avoid depending on for my intendedly UEFI-only kernel), pinging him for assistance.

@phil-opp
Copy link
Contributor

@kennystrawnmusic I think this issue thread is about some failing tests in the Rust repo. Your issue seems to be specific to the bootloader crate, which required some updates to the custom targets it is using. I published a new version already, which should fix the issue.

If you still have issues with the bootloader crate after a cargo update, please open an issue in the https://github.com/rust-osdev/bootloader repository.

nikic added a commit to nikic/rust that referenced this issue Jan 31, 2024
@nikic nikic self-assigned this Jan 31, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jan 31, 2024
…cuviper

Update data layouts in custom target tests for LLVM 18

Apply the data layout changes from rust-lang#116672 to custom target specs as well, as we started validating them since rust-lang#120062.

Fixes rust-lang#120492.

r? `@cuviper`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jan 31, 2024
…cuviper

Update data layouts in custom target tests for LLVM 18

Apply the data layout changes from rust-lang#116672 to custom target specs as well, as we started validating them since rust-lang#120062.

Fixes rust-lang#120492.

r? ``@cuviper``
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Feb 3, 2024
…cuviper

Update data layouts in custom target tests for LLVM 18

Apply the data layout changes from rust-lang#116672 to custom target specs as well, as we started validating them since rust-lang#120062.

Fixes rust-lang#120492.

r? ```@cuviper```
@bors bors closed this as completed in 8eb48b4 Feb 4, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Feb 4, 2024
Rollup merge of rust-lang#120529 - nikic:llvm-18-datalayout-fixes, r=cuviper

Update data layouts in custom target tests for LLVM 18

Apply the data layout changes from rust-lang#116672 to custom target specs as well, as we started validating them since rust-lang#120062.

Fixes rust-lang#120492.

r? ```@cuviper```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants