[Openmp-commits] [openmp] Drop timestamp in generated source code (PR #146822)

Bernhard M. Wiedemann via Openmp-commits openmp-commits at lists.llvm.org
Wed Jul 2 22:58:04 PDT 2025


https://github.com/bmwiedemann created https://github.com/llvm/llvm-project/pull/146822

Fixes #72206

This helps reproducible builds of libomp.so -- 
probably because LLVM's LTO computed a hash of inputs to generate its symbol names.

note: if it is desired to keep the timestamp, we could instead use [`SOURCE_DATE_EPOCH`](https://reproducible-builds.org/docs/source-date-epoch/) to make it deterministic.

This PR was done while working on [reproducible builds for openSUSE](https://en.opensuse.org/openSUSE:Reproducible_Builds).

>From d11da8017ba6e7bb925a8997b7c488243a26a537 Mon Sep 17 00:00:00 2001
From: "Bernhard M. Wiedemann" <bwiedemann at suse.de>
Date: Thu, 3 Jul 2025 07:50:30 +0200
Subject: [PATCH] Drop timestamp in generated source code

Fixes #72206

This helps reproducible builds of libomp.so
probably because LLVM's LTO computed a hash of inputs
to generate its symbol names.

This patch was done while working on reproducible builds for openSUSE.
---
 openmp/runtime/tools/message-converter.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/openmp/runtime/tools/message-converter.py b/openmp/runtime/tools/message-converter.py
index a493d64c1692d..5e2aeba6c99d6 100644
--- a/openmp/runtime/tools/message-converter.py
+++ b/openmp/runtime/tools/message-converter.py
@@ -11,7 +11,6 @@
 #
 
 import argparse
-import datetime
 import os
 import platform
 import re
@@ -188,11 +187,10 @@ def insert_header(f, data, commentChar="//"):
     f.write(
         "{0} Do not edit this file! {0}\n"
         "{0} The file was generated from"
-        " {1} by {2} on {3}. {0}\n\n".format(
+        " {1} by {2}. {0}\n\n".format(
             commentChar,
             os.path.basename(data.filename),
             os.path.basename(__file__),
-            datetime.datetime.now().ctime(),
         )
     )
 



More information about the Openmp-commits mailing list