Pure LLVM IR output


I read kotlin-native uses LLVM toolchain behind the scenes and it can target mac, pi and linux directly. Is it possible to configure konan or kotlinc to emit pure llvm IR instead? (eg. .ll or .bc etc)

Best Regards,

1 Like

You can use the --print_bitcode option of kotlinc, which will print the LLVM IR to the console via stderr. You can redirect this to a file if you want by using 2>