[llvm-dev] Removing the timestamp

Russell Wallace via llvm-dev llvm-dev at lists.llvm.org
Mon Aug 10 01:24:36 PDT 2015

Linking a program with llvm and using the -version commandline option gets
output similar to the following:

LLVM (http://llvm.org/):
  LLVM version 3.7.0
  DEBUG build with assertions.
  Built Aug 10 2015 (04:08:22).
  Default target: x86_64-pc-windows-msvc
  Host CPU: sandybridge

I want to remove the time stamp on the fourth line as a step towards
reproducible builds. The relevant code fragment seems to be

       << "  Built " << __DATE__ << " (" << __TIME__ << ").\n"

so ENABLE_TIMESTAMPS needs to be set to 0 or undefined. Presumably this
needs to be done during cmake, maybe as a command line parameter to same?
I've tried "-DCMAKE_CXX_FLAGS=-DENABLE_TIMESTAMPS=0" but it doesn't make
any difference. What is the command I should be using for this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150810/cd5469c3/attachment.html>

More information about the llvm-dev mailing list