zaks.anna added a comment.

> -fsanitize=* as a driver argument *when linking* is an explicit request to 
> link against the sanitizer runtimes.


Sanitizer users pass this option to the clang driver to get the runtime 
checking. Not all of them understand the implications and immediately realize 
that extra libraries will be linked in (which might be incompatible with other 
options they pass) or at least they are not thinking about it when using the 
feature. So I do not view this as an *explicit request* to link against the 
extra libraries. (I might be missing the point you are trying to convey by 
highlighting *when linking*. When this option is passed, we both compile and 
link differently. I view this as an option to turn on the sanitizers feature as 
a whole.)

We saw several occurrences of people passing this option to clang when building 
libsystem components and not realizing why there is a problem at link time. 
This is not a great experience, but happy linking and running into problems at 
run time would be worse.


https://reviews.llvm.org/D24048



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to