Bug 247622 - Avoid using __TIMESTAMP__ when building for a compilation cache
Summary: Avoid using __TIMESTAMP__ when building for a compilation cache
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Elliott Williams
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-11-08 08:37 PST by Elliott Williams
Modified: 2023-06-26 13:57 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Elliott Williams 2022-11-08 08:37:03 PST
__TIME__, __DATE__, and __TIMESTAMP__ are non-deterministic and interfere with cache reproducibility.
Comment 1 Elliott Williams 2022-11-08 08:54:39 PST
<rdar://problem/102056857>
Comment 2 Elliott Williams 2022-11-08 08:54:54 PST
Pull request: https://github.com/WebKit/WebKit/pull/6256
Comment 3 EWS 2022-11-17 17:46:37 PST
Committed 256816@main (adb96155be5e): <https://commits.webkit.org/256816@main>

Reviewed commits have been landed. Closing PR #6256 and removing active labels.
Comment 4 Alexander Kanavin 2023-06-26 03:09:34 PDT
This actually broke reproducibility of cmake-based builds, as (non-reproducible) TIMESTAMP is now injected into binaries where this previously did not happen (look at the changes to CMakeLists.txt in the PR linked to this ticket).
Comment 5 Elliott Williams 2023-06-26 11:05:36 PDT
> This actually broke reproducibility of cmake-based builds, as (non-reproducible) TIMESTAMP is now injected into binaries where this previously did not happen

How was it reproducible before? We used to call `jscBytecodeCacheVersion()` in all builds, which was based on __TIMESTAMP__.

My intention was to maintain the status quo for cmake builds, since the checksum-based approach did not seem to be easily compatible with cmake's ninja generator.
Comment 6 Michael Catanzaro 2023-06-26 13:57:17 PDT
(In reply to Elliott Williams from comment #5)
> How was it reproducible before?

__TIMESTAMP__ is the file modification time, which was previously fixed but now changes on every build. See bug #252308 and bug #258517.