beanz added a subscriber: filcab.
beanz added a comment.

To address both @bogner and @gribozavr...

The problem is we're wildly inconsistent on what -nodefaultlibs and -nostdlibs 
mean.

For example, on GNUTools or FreeBSD -fsanitize *always* adds sanitizer 
libraries regardless of the presence of the -no* flags. On Darwin we're even 
inconsistent among the sanitizers. The safestack library is added regardless of 
the flags, but the other sanitizers are not.

To answer @bogner's question about the PGO libraries, they are universally 
always added regardless of the -no* flags. That behavior is at least consistent 
across all driver implementations.

Agnostic to the discussion about a warning, I feel that this change (whether 
you agree with it or not) is an improvement because it at least makes the 
behavior of -fsanitize and the -no* flags consistent across all Driver 
implementations. That is significantly better than where we are today.

And in case you want to argue that maybe we should change the other drivers to 
match Darwin, @filcab pointed out the last attempt at doing that was in 
https://reviews.llvm.org/rL218541, and it was later reverted 
(https://reviews.llvm.org/rL220455) because we rely on that behavior in libcxx. 
The path of least resistance to consistency is to make Darwin behave like 
GNUTools and FreeBSD.


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