C++ Logo

std-proposals

Advanced search

Re: [std-proposals] constexpr support for std::chrono::system_clock

From: Thiago Macieira <thiago_at_[hidden]>
Date: Fri, 07 Mar 2025 08:07:49 -0800
On Thursday, 6 March 2025 23:03:16 Pacific Standard Time Tiago Freire via Std-
Proposals wrote:
> The simplest solution would be to just create a shell script that generates
> a file with the current time, let the build system call that shell script
> before build, and then not touch the compiler.

The drawback of that it that this does not obey $SOURCE_DATE_EPOCH (unless you
knew about it and coded your script that way), which in turn makes your code
non-reproducible. That adds to the workload of Linux distributions when trying
to figure out where the non-reproducibility came from.

That means there is an advantage of centralising this in the compiler.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Principal Engineer - Intel DCAI Platform & System Engineering

Received on 2025-03-07 16:07:53