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))
Maybe use -flto
option for clang, and after that llvm-dis
with desired bitcode file?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.