[lld] [LLD] [COFF] Pick timestamps from the SOURCE_DATE_EPOCH variable (PR #81326)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 12 02:09:52 PST 2024


mstorsjo wrote:

> FYI: https://lab.llvm.org/buildbot/#/builders/178/builds/6797/steps/7/logs/FAIL__lld__timestamp_test
> 
> Only happens on the 32 bit bot.

Oops, sorry about that, and sorry for not noticing the buildbot mail earlier.

It looks like the code itself is right, but `llvm-readobj` might not be able to print the value correctly on hosts with a 32 bit `time_t`.

Although, https://learn.microsoft.com/en-us/windows/win32/debug/pe-format doesn't seem to say anything explicitly about the signedness of this field either, but treating it as an unsigned seems reasonable. It does say that the value `0xFFFFFFFF` that we're using in the test doesn't represent a real timestamp. So perhaps we should test with a different value.

I guess the simplest way forward is to test with `0x7FFFFFFF` which should work safely everywhere. (And potentially test with `0xFFFFFFFE` if we know the host isn't limited to a 32 bit `time_t`?)

https://github.com/llvm/llvm-project/pull/81326


More information about the llvm-commits mailing list