[libcxx-commits] [PATCH] D116050: [libc++] Disable coverage with sanitize-coverage=0

Ben Wagner via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Dec 23 17:53:00 PST 2021


bungeman added a comment.

Perhaps the commit comment could have been a bit more detailed.

`CMAKE_REQUIRED_FLAGS` is extra compile flags when running CMake build configuration steps (like `check_cxx_compiler_flag`). It does not affect the compile flags for the actual build of the project (unless of course these flags change whether or not a given source compiles and links or not). So libcxx, libcxxabi, and libunwind would still be built with any specified sanitize-coverage as before. The build configuration steps (which are mostly checking to see if certain compiler flags are available) will not try to compile and link `int main() { return 0;}` (or other specified source) with sanitize-coverage (which can fail to link at this stage in building, since the final compile flags required are yet to be determined).

The change to `LIBFUZZER_CFLAGS` was done to keep it consistent with the obvious intention of disabling all sanitize-coverage. This appears to be intentional, preventing the fuzzer driver itself from showing up in any coverage calculations. This is somewhat less important for my use case, but it seemed a good idea to update all of these.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116050/new/

https://reviews.llvm.org/D116050



More information about the libcxx-commits mailing list