[cfe-dev] Giving __DATE__ and __TIME__ fixed values
Nico Weber via cfe-dev
cfe-dev at lists.llvm.org
Wed Aug 24 08:36:18 PDT 2016
On Wed, Aug 24, 2016 at 11:07 AM, Reid Kleckner <rnk at google.com> wrote:
> It's still hacky, but I bet -U__DATE__ -D__DATE__=x still works.
>
That's a good idea, but it seems to trigger "warning: undefining builtin
macro [-Wbuiltin-macro-redefined]" instead.
> Sent from phone
>
> On Aug 24, 2016 7:53 AM, "Nico Weber via cfe-dev" <cfe-dev at lists.llvm.org>
> wrote:
>
>> Hi,
>>
>> we're trying to make our build more deterministic. Several third-party
>> libraries we depend on use __DATE__ and __TIME__, which makes that part of
>> the build nondeterministic. So we'd like to force both of them to a fixed
>> value via some flag.
>>
>> -D__DATE__= -D__TIME__= kind of works, but it
>> triggers Wbuiltin-macro-redefined warnings (and it also causes a crash
>> when using them with pchs). Is using -D flags the right approach for this?
>> It seems a bit hacky. Would there be interest in adding a (say)
>> -ffixed-date-time=1997-07-16T19:20+01:00 flag that sets the initial
>> value of __DATE__ and __TIME__ so that we don't have to redefine them?
>>
>> Nico
>>
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160824/b4d292d2/attachment.html>
More information about the cfe-dev
mailing list