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

Compiler problem for #46

Open
simeondmr opened this issue May 6, 2023 · 1 comment
Open

Compiler problem for #46

simeondmr opened this issue May 6, 2023 · 1 comment

Comments

@simeondmr
Copy link

Hello,

I have follow the book, at the moment I have created a json for Atmega1284p but during the compilation I have this error:

"LLVM ERROR: Expected a constant shift ammount!"
"error: could not compile 'core' (lib)"

This is my code:

`#![no_std]
#![no_main]

#[no_mangle]
pub extern fn main() {

}`

I have searched a lot for this problem, but I have found nothing about that...
Please could you help me??

Thanks

Simeon

@jamesrwaugh
Copy link

rust-lang/compiler-builtins#523 (comment)

This was an internal LLVM issue which was fixed, so best to just upgrade the compiler.

But now the latest nightly compiler has an issue with "ran out of registers during register allocation" unless you compile with LTO enabled. But I've still gotten this trying to add debug information.

More info
rust-lang/rust#112140

[profile.release]
lto = true

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

2 participants