https://bugs.llvm.org/show_bug.cgi?id=41570
Bug ID: 41570
Summary: Trunk LTO gives internal error if object is compiled
separately with clang -flto -c with a .bc file
extension
Product: tools
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: lto
Assignee: unassignedb...@nondot.org
Reporter: peter.sm...@linaro.org
CC: llvm-bugs@lists.llvm.org
With a clang built this morning:
clang --version
clang version 9.0.0 (trunk 358996)
I get an error when I compile with -flto separately with a .bc suffix and then
attempt to invoke the code-generator. The reason for doing this is to work
around LTO not supporting -Os and -Oz
(https://bugs.llvm.org/show_bug.cgi?id=41568).
I couldn't reproduce with clang 7.0.0 but I could with clang 8.0.0
cat main.c
int main(void) {
return 0;
}
clang -flto -Os -c main.c -o main.bc
clang -flto main.bc -o main
module flag identifiers must be unique (or of 'require' type)
!"EnableSplitLTOUnit"
fatal error: error in backend: Broken module found, compilation aborted!
clang-6: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
clang version 9.0.0 (trunk 358996)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /linaro/upstream/buildclang/bin
clang-9: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang-9: note: diagnostic msg: Error generating preprocessed source(s) - no
preprocessable inputs.
This seems to only occur when the .bc file extension is used, it doesn't when
.o is used so this maybe expected behaviour, it did have me confused for some
time though.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs