I wasn't able to build all the LLVM projects when LLVM_BUILD_INSTRUMENTED_COVERAGE is set to ON since the compiler is finding some issues with unresolved symbols inside compiler-rt. If the compiler-rt isn't meant to be built with LLVM_BUILD_INSTRUMENTED_COVERAGE by default, I think that something like this makes sense.
Details
Diff Detail
Unit Tests
Event Timeline
compiler-rt/CMakeLists.txt | ||
---|---|---|
313–316 | It looks like support for what you're trying to do might already exist. Could you share more context on COMPILER_RT_HAS_FNO_PROFILE_INSTR_GENERATE_FLAG & COMPILER_RT_ENABLE_PGO, and why these are/aren't applicable for your workflow? |
compiler-rt/CMakeLists.txt | ||
---|---|---|
313–316 | Basically, I am facing similar problems as described in the D75499. That patch disabled PGO related flags for compiler-rt, but it applies to the LLVM_BUILD_INSTRUMENTED option only. |
Ping. :)
This is very similar to D75499. The patch disabled PGO related flags for compiler-rt in the case of LLVM_BUILD_INSTRUMENTED.
There is another instrumentation option LLVM_BUILD_INSTRUMENTED_COVERAGE which should have been addressed as well.
Can you combine the conditions? Maybe looks like:
(LLVM_BUILD_INSTRUMENTED OR LLVM_BUILD_INSTRUMENTED_COVERAGE) AND COMPILER_RT_HAS_FNO_PROFILE_INSTR_GENERATE_FLAG
It looks like support for what you're trying to do might already exist. Could you share more context on COMPILER_RT_HAS_FNO_PROFILE_INSTR_GENERATE_FLAG & COMPILER_RT_ENABLE_PGO, and why these are/aren't applicable for your workflow?