[PATCH] D24091: [Driver] Warn on -nodefaultlibs and -fsanitize

Bruno Cardoso Lopes via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 1 11:29:08 PDT 2016


On Wed, Aug 31, 2016 at 11:00 PM, Justin Bogner <mail at justinbogner.com> wrote:
> Chris Bieneman <beanz at apple.com> writes:
>> beanz created this revision.
>> beanz added reviewers: bogner, zaks.anna, bruno, filcab.
>> beanz added a subscriber: cfe-commits.
>> Herald added a subscriber: emaste.
>>
>> The FreeBSD and GNUTools drivers support -fsanitize arguments
>> bypassing -nodefaultlibs. With https://reviews.llvm.org/D24048, Darwin
>> will support that behavior as well.
>>
>> To make this a little less magical and behind the curtain this warning
>> will fire when -nodefaultlibs is used with sanitizer arguments.
>
> I don't think this makes any sense. If it's a legitimate use case to
> pass these flags together, then anyone who does will have to manually
> disable this warning - if it's invalid to pass the flags together, we
> should just disallow it instead of warning. The warning either hurts
> usability or doesn't do enough.

I disagree. Assuming that we go for allowing the behavior: I can see
the fact that the warning may be annoying, but I still think it's
better for the user to know what's happening and then disable the
warning, instead of relying on implicit assumptions. Maybe not
allowing the behavior and better modeling how these things
interoperate is a better solution, but I'll leave this topic for the
other thread.

-- 
Bruno Cardoso Lopes
http://www.brunocardoso.cc


More information about the cfe-commits mailing list