[PATCH] Add a new flag -fmodules-require-modular-includes

Richard Smith richard at metafoo.co.uk
Mon Apr 14 18:59:53 PDT 2014


Sure, this sounds like a good idea to me.

On Mon, Apr 14, 2014 at 4:24 PM, Ben Langmuir <blangmuir at apple.com> wrote:

> Fair point. In that case how about we add all -Werror= and -Wfatal-error=
> options to the module hash? That way we are consistent about any diagnostic
> options that would prevent us from building the module.  We don’t need/want
> to include regular warning flags, since we won’t get warnings anyway after
> the module is built the first time.  I suppose we would want to track only
> the canonical (last) options and sort them to avoid spurious hash changes.
>
> Then we could replace -f with -Werror= for this option.
>
> Ben
>
>
>
> On Apr 14, 2014, at 11:24 AM, Richard Smith <richard at metafoo.co.uk> wrote:
>
> I don't see why this is a special case. We have that same issue with *all*
> warning flags.
>
> On Mon, Apr 14, 2014 at 9:22 AM, Ben Langmuir <blangmuir at apple.com> wrote:
>
>> The primary reason I didn’t go that route is that this flag should show
>> up in the module hash so that we don’t load modules that depend on
>> non-modular content simply because they are already built.
>>
>> Ben
>>
>> On Apr 13, 2014, at 6:15 PM, Richard Smith <richard at metafoo.co.uk> wrote:
>>
>> Have you considered making this be a normal warning flag, instead of a
>> language options and an error?
>>
>>
>> On Thu, Apr 10, 2014 at 6:43 AM, Ben Langmuir <blangmuir at apple.com>wrote:
>>
>>> As suggested off-list, this updated patch only affects frameworks for
>>> now, although the intent is to include all modules in the future.  It also
>>> has small fix for submodules including non-modular content and files that
>>> are nested inside umbrella directories.
>>>
>>> Ben
>>>
>>>
>>>
>>>
>>> On Apr 8, 2014, at 5:09 PM, Ben Langmuir <blangmuir at apple.com> wrote:
>>>
>>> > When set, the new flag enforces that all of the files included by a
>>> module are themselves part of a module, or are explicitly excluded by some
>>> module. This will not affect headers that are part of the module being
>>> built, nor files included outside of the module build (e.g. in an
>>> implementation file with -fmodule-name set).
>>> >
>>> > Ben
>>> >
>>> >
>>> <non-modular-includes.patch>_______________________________________________
>>> > cfe-commits mailing list
>>> > cfe-commits at cs.uiuc.edu
>>> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>>
>>>
>>> _______________________________________________
>>> cfe-commits mailing list
>>> cfe-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>>
>>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140414/bef49c79/attachment.html>


More information about the cfe-commits mailing list