Skip to content

Commit

Permalink
docker: Set timestamp to zero for reproducible builds
Browse files Browse the repository at this point in the history
Signed-off-by: Eryk Szpotanski <eszpotanski@antmicro.com>
  • Loading branch information
eszpotanski committed Sep 13, 2024
1 parent 091a06b commit aea19e1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docker/Dockerfile.builder
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ COPY --link tools tools
ARG numThreads=$(nproc)
RUN echo "" > tools/yosys/abc/.gitcommit && \
env CFLAGS="-D__TIME__=0 -D__DATE__=0 -D__TIMESTAMP__=0 -Wno-builtin-macro-redefined" \
CXXFLAGS="-D__TIME__=0 -D__DATE__=0 -D__TIMESTAMP__=0 -Wno-builtin-macro-redefined" \
./build_openroad.sh --no_init --local --threads ${numThreads}

FROM orfs-base
Expand Down
5 changes: 4 additions & 1 deletion docker/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ COPY InstallerOpenROAD.sh \
/tmp/installer/tools/OpenROAD/etc/DependencyInstaller.sh

ARG options=""
ARG constantBuildDir="-constant-build-dir"

RUN ./DependencyInstaller.sh $options \
RUN env CFLAGS="-D__TIME__=0 -D__DATE__=0 -D__TIMESTAMP__=0 -Wno-builtin-macro-redefined" \
CXXFLAGS="-D__TIME__=0 -D__DATE__=0 -D__TIMESTAMP__=0 -Wno-builtin-macro-redefined" \
./DependencyInstaller.sh $options $constantBuildDir \
&& rm -rf /tmp/installer /tmp/* /var/tmp/* /var/lib/apt/lists/*

ARG fromImage
Expand Down

0 comments on commit aea19e1

Please sign in to comment.