compor / llvm-ir-cmake-utils

LLVM IR CMake utils for bitcode file manipulation by opt and friends
GNU Lesser General Public License v2.1
68 stars 14 forks source link

How to support px4 compilation? #31

Open Lqs66 opened 1 year ago

Lqs66 commented 1 year ago

hello, I'm trying to generate llvm IR in px4 compilation using your tool, I imported cmake as you requested and added include to CMakeLists.txt, during cmake I see the console output - LLVM IR Utils. finally I run make to compile but it doesn't work until I don't see IR until the binary is generated. Does your tool support px4 compilation?

create-issue-branch[bot] commented 1 year ago

Branch issue-31-How_to_support_px4_compilation created!

compor commented 1 year ago

Hello @Lqs66,

I'm not familiar px4; does it use llvm/clang? what is the source language?

Internally, llvm-ir-cmake-utils depend on the source language as required by cmake to generate LLVM IR. You can see this roughly here.

If the px4 compilation uses something custom, then maybe you can override those, but for CMake, it needs to be able to detect the LINKER_LANGUAGE.