Fwd: r256287 - Document that we recommend to turn off -gmodules when building a static

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 8 10:52:19 PST 2016


(oops, forgot to reply-all)

---------- Forwarded message ----------
From: David Blaikie <dblaikie at gmail.com>
Date: Fri, Jan 8, 2016 at 10:51 AM
Subject: Re: r256287 - Document that we recommend to turn off -gmodules
when building a static
To: Adrian Prantl <aprantl at apple.com>




On Fri, Jan 8, 2016 at 8:34 AM, Adrian Prantl <aprantl at apple.com> wrote:

>
> On Jan 7, 2016, at 6:54 PM, David Blaikie <dblaikie at gmail.com> wrote:
>
> Presumably this only applies when using implicit modules builds, not when
> using explicit modules builds. (though I'm not sure what the current
> behavior of -gmodules is with explicit modules, maybe it's
> untested/broken/etc anyway)
>
>
> Why would explicit modules be any different? Unless you distribute the
> modules together with the static library (and ensure they end up in the
> same location on the other machine) you would still run into the problem,
> wouldn’t you?
>

Right - though it'd be a bit more obvious/easy (I would imagine/assume) to
find and move that build product too, since it'd be in your build tree
rather than an OS-wide cache somewhere else.


>
> -- adrian
>
>
> On Tue, Dec 22, 2015 at 2:37 PM, Adrian Prantl via cfe-commits <
> cfe-commits at lists.llvm.org> wrote:
>
>> Author: adrian
>> Date: Tue Dec 22 16:37:22 2015
>> New Revision: 256287
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=256287&view=rev
>> Log:
>> Document that we recommend to turn off -gmodules when building a static
>> library for distribution to other machines on the clang man page.
>>
>> Modified:
>>     cfe/trunk/docs/CommandGuide/clang.rst
>>
>> Modified: cfe/trunk/docs/CommandGuide/clang.rst
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/CommandGuide/clang.rst?rev=256287&r1=256286&r2=256287&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/docs/CommandGuide/clang.rst (original)
>> +++ cfe/trunk/docs/CommandGuide/clang.rst Tue Dec 22 16:37:22 2015
>> @@ -262,7 +262,12 @@ Code Generation Options
>>    Generate debug information that contains external references to
>>    types defined in clang modules or precompiled headers instead of
>>    emitting redundant debug type information into every object file.
>> -  This option implies `-fmodule-format=obj`.
>> +  This option implies :option:`-fmodule-format=obj`.
>> +
>> +  This option should not be used when building static libraries for
>> +  distribution to other machines because the debug info will contain
>> +  references to the module cache on the machine the object files in
>> +  the library were built on.
>>
>>  .. option:: -fstandalone-debug -fno-standalone-debug
>>
>>
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160108/1479c2cb/attachment.html>


More information about the cfe-commits mailing list