[PATCH] D82926: [libfuzzer] [clang] Add __has_feature(fuzzing_coverage)

2020-07-01 Thread Max Moroz via Phabricator via cfe-commits
Dor1s added a comment. If we still decide to proceed with this, would it make sense to expand it to `sanitizer_coverage` based on any sancov instrumentation being enabled? As you mentioned in the description, there might be users who manually enable certain sancov flags. I think it's good to be

[PATCH] D82926: [libfuzzer] [clang] Add __has_feature(fuzzing_coverage)

2020-07-01 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. In D82926#2125950 , @hctim wrote: > So - the `FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION` flag is a property of the > build system and not that of the compiler. There are some places (android) > where enabling `FUZZING_BUILD_MODE

[PATCH] D82926: [libfuzzer] [clang] Add __has_feature(fuzzing_coverage)

2020-07-01 Thread Mitch Phillips via Phabricator via cfe-commits
hctim added a comment. So - the `FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION` flag is a property of the build system and not that of the compiler. There are some places (android) where enabling `FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION` globally changes the behaviour of large amounts of libraries

[PATCH] D82926: [libfuzzer] [clang] Add __has_feature(fuzzing_coverage)

2020-07-01 Thread Max Moroz via Phabricator via cfe-commits
Dor1s added a comment. What usecase(s) do you have for this in mind? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82926/new/ https://reviews.llvm.org/D82926 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D82926: [libfuzzer] [clang] Add __has_feature(fuzzing_coverage)

2020-06-30 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. Can we just use `FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION` instead? I'm a little wary of introducing a new way to do conditional compilation since fuzzers that don't use sancov can't rely on it. Repo

[PATCH] D82926: [libfuzzer] [clang] Add __has_feature(fuzzing_coverage)

2020-06-30 Thread Mitch Phillips via Phabricator via cfe-commits
hctim updated this revision to Diff 274656. hctim added a comment. Changed the filename and fixed up the inverted test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82926/new/ https://reviews.llvm.org/D82926 Files: clang/include/clang/Basic/Fea

[PATCH] D82926: [libfuzzer] [clang] Add __has_feature(fuzzing_coverage)

2020-06-30 Thread Mitch Phillips via Phabricator via cfe-commits
hctim created this revision. hctim added reviewers: morehouse, Dor1s. Herald added a project: clang. Herald added a subscriber: cfe-commits. Probably a useful feature for checking whether a file was built with -fsanitize=fuzzer or -fsanitize=fuzzer-no-link. N.B. __has_feature(fuzzing_coverage) do