The reason is that this (a) seems to work just fine and (b) is useful when building stuff with
sanitizer+coverage, but needing to exclude the sanitizer for a particular source file.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
For the context, this is supposed to fix this problem:
https://bugs.chromium.org/p/chromium/issues/detail?id=618534
Of course there are other ways of dealing with that that do not require changing the compiler, but this change seems like the right thing to do. The limitation on the standalone use of coverage seems arbitrary.
Comment Actions
Can you at least add a compiler-rt test where we ensure that this flag can not be used such that it wil compile but fail to link?
E.g.
clang -fsanitize-coverage=edge x.c
should compile *and* link (and run)