-
Notifications
You must be signed in to change notification settings - Fork 210
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
adapt data layout to match LLVM's #420
Conversation
adapt data-layout to match LLVM's
I'm not sure why the those last two tests fail... any help is appreciated. It seems like the |
Thanks a lot for the PR! I'll look into the test failures. |
Ok, this is very strange. The error happens in the BIOS build when we call
The |
Here's a hacky workaround: diff --git a/bios/stage-4/src/main.rs b/bios/stage-4/src/main.rs
index 9ade45f..439b1fe 100644
--- a/bios/stage-4/src/main.rs
+++ b/bios/stage-4/src/main.rs
@@ -262,6 +262,7 @@ fn detect_rsdp() -> Option<PhysAddr> {
#[derive(Clone)]
struct IdentityMapped;
impl AcpiHandler for IdentityMapped {
+ #[inline(never)]
unsafe fn map_physical_region<T>(
&self,
physical_address: usize,
|
I tried compiling stage-4 with |
I agree with @Freax13, this should be investigated further. However, to unblock people (including myself), I've added the workaround, @phil-opp obv it depends on you whether you want this merged for now. I also don't think I'm experienced enough with I'm not sure what the Semver Checks do, and I'm not sure why they still fail with the data layout mismatch. |
Interesting! I guess a good next step could be to use the (Note that this might not be a bug caused by rustc. It could also be some undefined behavior in the |
@tsatke Thanks for implementing the workaround! I'm still debating whether I want to merge it before understanding the actual issue though...
This check runs the cargo-semver-checks tool to detect accidental breaking changes. It works by comparing the latest crates.io version with the PR code, which won't work in this case because the crates.io release doesn't compile anymore on the latest nightly. So the failure is expected here. |
Does this mean that the whole tutorial path is broken right now? Is there a workaround we can do to progress with the blog? |
searched nightlies: from nightly-2024-02-13 to nightly-2024-02-15 bisected with cargo-bisect-rustc v0.6.8Host triple: x86_64-unknown-linux-gnu cargo bisect-rustc --start 2024-02-13 --end 2024-02-15 --with-src --target x86_64-unknown-none --component llvm-tools -vvv -- test --target x86_64-unknown-linux-gnu check_boot_info |
It turns out that the IR emitted by |
So for some reason LLVM decides to optimize this whole function out, right? Could you upload the LLVM here or tell us the exact build options that you used for it? |
Update required because of rust-lang/rust#116672, which became effective once rust-lang/rust#120055 was merged.