summaryrefslogtreecommitdiff
path: root/tools/buildman/builder.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-02-21 12:40:29 -0700
committerSimon Glass <sjg@chromium.org>2023-03-08 11:38:48 -0800
commitbfb708ad9987ebddd2cd8f55bf4884e4f2305234 (patch)
tree0c2b87057a453cb9342657aea39edb99bc35ffaf /tools/buildman/builder.py
parent93202d72d75ff2e04c14525bc8b585c5ed0d0740 (diff)
buildman: Add a flag for reproducible builds
This is quite a useful thing to use when building since it avoids small size changes between commits. Add a -r flag for it. Also undefine CONFIG_LOCALVERSION_AUTO since this appends the git hash to the version string, causing every build to be slightly different. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/buildman/builder.py')
-rw-r--r--tools/buildman/builder.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py
index 107086cc0e5..7b9be887e55 100644
--- a/tools/buildman/builder.py
+++ b/tools/buildman/builder.py
@@ -195,6 +195,7 @@ class Builder:
don't write to a separate output directory.
thread_exceptions: List of exceptions raised by thread jobs
no_lto (bool): True to set the NO_LTO flag when building
+ reproducible_builds (bool): True to set SOURCE_DATE_EPOCH=0 for builds
Private members:
_base_board_dict: Last-summarised Dict of boards
@@ -254,7 +255,7 @@ class Builder:
config_only=False, squash_config_y=False,
warnings_as_errors=False, work_in_output=False,
test_thread_exceptions=False, adjust_cfg=None,
- allow_missing=False, no_lto=False):
+ allow_missing=False, no_lto=False, reproducible_builds=False):
"""Create a new Builder object
Args:
@@ -334,6 +335,7 @@ class Builder:
self.allow_missing = allow_missing
self._ide = False
self.no_lto = no_lto
+ self.reproducible_builds = reproducible_builds
if not self.squash_config_y:
self.config_filenames += EXTRA_CONFIG_FILENAMES