This is an archive of the discontinued LLVM Phabricator instance.

Support SOURCE_DATE_EPOCH environment variable
AbandonedPublic

Authored by emaste on May 30 2016, 8:17 AM.

Details

Reviewers
None
Summary

SOURCE_DATE_EPOCH specifies a UNIX timestamp (number of seconds since 01 Jan 1970 00:00:00 UTC) to be used as the timestamp input for build processes e.g. __DATE__ and __TIME__

See https://reproducible-builds.org/specs/source-date-epoch/ for details, and GCC support at https://gcc.gnu.org/onlinedocs/cpp/Environment-Variables.html.

Diff Detail

Event Timeline

emaste updated this revision to Diff 58959.May 30 2016, 8:17 AM
emaste retitled this revision from to Support SOURCE_DATE_EPOCH environment variable.
emaste updated this object.
emaste added a subscriber: cfe-commits.
emaste added a subscriber: dim.
mattia added a subscriber: mattia.May 30 2016, 8:25 AM
emaste updated this revision to Diff 58977.May 30 2016, 10:32 AM

Use gmtime to report in UTC when SOURCE_DATE_EPOCH is set. This follows GCC and makes sense given the purpose of SOURCE_DATE_EPOCH.

For reference here is discussion on the GCC list when this was introduced there: https://gcc.gnu.org/ml/gcc-patches/2015-06/msg02210.html

emaste abandoned this revision.Jan 3 2017, 10:55 AM

Abandon in favour of D23934