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

Fails to build with lto=true in aarch64 architectures. #1833

Closed
LGFae opened this issue Dec 10, 2022 · 2 comments
Closed

Fails to build with lto=true in aarch64 architectures. #1833

LGFae opened this issue Dec 10, 2022 · 2 comments

Comments

@LGFae
Copy link

LGFae commented Dec 10, 2022

For more details, check this issue.

The gist of it is:

image will, reliably, fail at the function image::io::free_functions::load_decoder() with the message:

Both operands to a binary operator are not of the same type!
  %7198 = xor i64 %7197, i32 4
in function _ZN5image2io14free_functions12load_decoder17h972a54ccb2943d7eE
LLVM ERROR: Broken function found, compilation aborted!

It appears to only happen when lto = true is chosen in the [profile.release] section of Cargo.toml.

Expected

The crate should compile.

Actual behaviour

Compilation stops with a broken function error.

Reproduction steps

Unfortunately, I do not own an aarch64 system, and cannot offer a minimal reproduction example. If someone could point out a way I could try going about that, I'd be more than willing to try.


I do not know whether I should bring this directly to the rust team themselves, but thought it was better to first try my luck here instead.

@HeroicKatora
Copy link
Member

HeroicKatora commented Dec 10, 2022

I do not know whether I should bring this directly to the rust team themselves, but thought it was better to first try my luck here instead.

I believe so. This is an LLVM specific error which should be invisible behind the Rust language, so not at all related to any implementation details we're doing here. (We're not making use of any inline assembly etc.). This is a bug in rustc.

@nekopsykose
Copy link

fyi this looks like rust-lang/rust#104099

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants