[PATCH] D23934: Add a -ffixed-date-time= flag that sets the initial value of __DATE__, __TIME__, __TIMESTAMP__
Nico Weber via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 26 10:28:20 PDT 2016
thakis created this revision.
thakis added a reviewer: rsmith.
thakis added a subscriber: cfe-commits.
This is useful for creating reproducible builds. Defining these via -D triggers warnings, and can cause bugs (presently, e.g. PR29119). It makes it also impossible to override __DATE__ and __TIME__ and forget __TIMESTAMP__.
__TIMESTAMP__ has slightly different semantics in that it's the timestamp of the current TU, not the time of compilation, but either meaning is bad for reproducible builds.
https://reviews.llvm.org/D23934
Files:
include/clang/Driver/Options.td
include/clang/Lex/PreprocessorOptions.h
lib/Driver/Tools.cpp
lib/Frontend/CompilerInvocation.cpp
lib/Lex/PPMacroExpansion.cpp
test/Preprocessor/fixed-date-time.cc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23934.69396.patch
Type: text/x-patch
Size: 6811 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160826/a8624bf1/attachment-0001.bin>
More information about the cfe-commits
mailing list