Reputation: 1179
Was able to get LLVM IR for smaller projects by appending -emit-llvm -S flags to compiler. However this breaks linking. So build is showing errors and with big project like Android AOSP or LineageOS and submodules it creates many errors, breaks.
How to get LLVM IR for bigger clang/clang++ 9 projects?
I found somewhere on SO that you have to call -emit-llvm -S on each C/C++ file manually?
I would like to get so called ll LLVM IR files (LLVM assembly language format (.ll))
Upvotes: 0
Views: 334
Reputation: 1035
Maybe use -flto
option for clang, and after that llvm-dis
with desired bitcode file?
Upvotes: 1