[llvm-dev] Removing the timestamp

İsmail Dönmez via llvm-dev llvm-dev at lists.llvm.org
Mon Aug 10 01:26:51 PDT 2015


Hi,

On Mon, Aug 10, 2015 at 11:24 AM, Russell Wallace via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> 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
>
> #if (ENABLE_TIMESTAMPS == 1)
>        << "  Built " << __DATE__ << " (" << __TIME__ << ").\n"
> #endif
>
> 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?

Use -DLLVM_ENABLE_TIMESTAMPS=OFF instead.

ismail


More information about the llvm-dev mailing list