Closed compor closed 7 years ago
This mainly concerns the linking phase.
However, all the relevant variables
(e.g. CMAKE_SHARED_LINKER_FLAGS
) work during the linking phase.
Any separately set target properties (e.g. LINK_DEPENDS
) should also be set for the relevant bitcode targets. This is duplication of work, but it can be avoid with a trivial user-defined macro.
The rationale behind this is that the bitcode targets might require different stuff during linking and leaving this as is provides for such needed flexibility.
e.g., adding a preprocessor definitions with
target_compile_definitions
holds for the bitcode target but not for the exec and lib target provided by LLVM IR utils.