-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 ERROR: Unexpected anonymous function when writing summary #51947
Comments
|
Could this be hitting the case where linking is performed without thinlto, but bitcode is still being written through thinlto buffers? It might be worth trying to apply these changes and see if it fixes the issue: https://github.com/rust-lang/rust/pull/51007/files#diff-a3c60982b42eac1d2e3fd67f4d562ae8R550 |
Yeah, the error message definitely sounds related to thinlto. At least "summary" is a thinlto concept. That being said, it doesn’t seem like thinlto is disabled anywhere in the original report, so… |
I just tried it with "-Z thinlto=no", and it does NOT help. |
Hi @japaric , Did you figure our how to fix this issue? Can you let me know if you could successfully run the sample on this version of Cortex M4? Thanks lot in advance, Angelo Ribeiro. |
Same problem here! Any solution or workaround known? |
Running with |
Here is a reproducer without the compiler_builtins/thumb dependency: #![feature(linkage)]
#[linkage = "weak"]
pub fn fn1(a: u32, b: u32, c: u32) -> u32 {
a + b + c
}
#[linkage = "weak"]
pub fn fn2(a: u32, b: u32, c: u32) -> u32 {
a + b + c
} Compiled with |
If we're going to emit bitcode (through ThinLTOBuffer), then we need to ensure that anon globals are named. This was already done after optimization passes, but also has to happen after LTO passes, as we always emit the final result in a ThinLTO-compatible manner. Fixes rust-lang#51947.
Run name-anon-globals after LTO passes as well If we're going to emit bitcode (through ThinLTOBuffer), then we need to ensure that anon globals are named. This was already done after optimization passes, but also has to happen after LTO passes, as we always emit the final result in a ThinLTO-compatible manner. I added the test as `run-make`. The important bit is that we emit bitcode in some way (e.g. `--crate-type rlib` or `--emit=llvm-bc`). Please tell me if there is a better way to test for that. Fixes rust-lang#51947
When compiling the
compiler_builtins
crate for any of thethumb
targets in release mode and with debuginfo enabled. Without debuginfo the build succeeds (we are testing this by building rust-std for thethumb
targets). This doesn't affect the ARM Linux targets.STR
Metadata
Needs bisecting
cc @alexcrichton
The text was updated successfully, but these errors were encountered: