diff options
author | Bernhard M. Wiedemann <bwiedemann@suse.de> | 2018-07-11 10:05:55 +0200 |
---|---|---|
committer | Bernhard M. Wiedemann <bwiedemann@suse.de> | 2018-12-14 12:09:06 +0000 |
commit | 1ffcca4cc208c48ddb06b6a23abf1756f9724351 (patch) | |
tree | 96c5a330ba213ccda651e595954845864d912d0c /src/tools/rcc/rcc.cpp | |
parent | 81dd1bcad1d43350300c62466e3d9e56c2118148 (diff) |
rcc: Use SOURCE_DATE_EPOCH for mtime
Use the standard variable name in addition to the QT-specific one
to make builds reproducible out-of-the-box.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.
Task-number: QTBUG-62511
Change-Id: I401a2a9d258e751b83ae7b83f4100d9088b9ad71
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/tools/rcc/rcc.cpp')
-rw-r--r-- | src/tools/rcc/rcc.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tools/rcc/rcc.cpp b/src/tools/rcc/rcc.cpp index f284749781..a7919e31f9 100644 --- a/src/tools/rcc/rcc.cpp +++ b/src/tools/rcc/rcc.cpp @@ -230,6 +230,9 @@ void RCCFileInfo::writeDataInfo(RCCResourceLibrary &lib) static const quint64 sourceDate = 1000 * qgetenv("QT_RCC_SOURCE_DATE_OVERRIDE").toULongLong(); if (sourceDate != 0) lastmod = sourceDate; + static const quint64 sourceDate2 = 1000 * qgetenv("SOURCE_DATE_EPOCH").toULongLong(); + if (sourceDate2 != 0) + lastmod = sourceDate2; lib.writeNumber8(lastmod); if (text || pass1) lib.writeChar('\n'); |