Skip to content

Commit bb650db

Browse files
committed
Merge branch 'master' of https://github.com/The-OpenROAD-Project-private/OpenROAD into secure-fix-escape-hier-delim
Signed-off-by: Jaehyun Kim <[email protected]>
2 parents 12b8926 + 09a2160 commit bb650db

File tree

194 files changed

+861714
-784381
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

194 files changed

+861714
-784381
lines changed

.clang-tidy

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,11 @@ Checks: >
6060
-misc-use-anonymous-namespace,
6161
6262
CheckOptions:
63-
- key: google-runtime-int.TypeSuffix
64-
value: _t
65-
63+
- key: google-runtime-int.TypeSuffix
64+
value: _t
65+
- key: misc-include-cleaner.IgnoreHeaders
66+
value: '.*/QtCore/.*;.*/QtGui/.*;.*/QtWidgets/.*;.*/spdlog/fmt/bundled/.*'
67+
6668
# All modules but sta
6769
# Exclude build as there is too much noise from swig generated code
6870
HeaderFilterRegex: "(?!build/.*)/(ant|cgt|cts|cut|dbSta|dft|dpl|drt|dst|est|exa|fin|gpl|grt|gui|ifp|mpl|odb|ord|pad|par|pdn|ppl|psm|rcx|ram|rmp|rsz|stt|tap|upf|utl)/.*"

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ build
2929
build_linux
3030
build_mac
3131
test/results
32-
flow
3332

3433
docs/main
3534
README2.md
@@ -57,7 +56,8 @@ obj-x86_64-linux-gnu/
5756

5857
user.bazelrc
5958

60-
bazel-*
59+
# Limit ignore to these files, so we see and clean out other cruft that pollutes grep
60+
/bazel-*
6161

6262
projectview.bazelproject
6363
.bsp/

Dockerfile

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
################################################################################
2+
# Install dependencies for dev #
3+
################################################################################
4+
5+
# https://github.com/moby/moby/issues/38379#issuecomment-448445652
6+
ARG fromImage=ubuntu:24.04
7+
ARG devImage=dev
8+
9+
FROM $fromImage AS dev
10+
11+
ENV DEBIAN_FRONTEND=noninteractive
12+
ENV TZ=America/Los_Angeles
13+
ENV LANG=C.UTF-8
14+
ENV LC_ALL=C.UTF-8
15+
16+
ARG INSTALLER_ARGS=""
17+
18+
COPY etc/DependencyInstaller.sh /tmp/.
19+
RUN <<EOF
20+
set -e
21+
/tmp/DependencyInstaller.sh -ci -base
22+
/tmp/DependencyInstaller.sh -ci -common $INSTALLER_ARGS
23+
if echo "$fromImage" | grep -q "ubuntu"; then
24+
echo "fromImage contains 'ubuntu' — stripping section from libQt5Core.so"
25+
strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so || true
26+
else
27+
echo "Skipping strip command as fromImage does not contain 'ubuntu'"
28+
fi
29+
rm -f /tmp/DependencyInstaller.sh
30+
EOF
31+
32+
################################################################################
33+
# Build OpenROAD from source #
34+
################################################################################
35+
36+
FROM $devImage AS builder
37+
38+
ARG compiler=gcc
39+
ARG numThreads=NotSet
40+
ARG orVersion=NotSet
41+
42+
RUN <<EOF
43+
groupadd user --gid 9000
44+
useradd --create-home --uid 9000 -g user --skel /etc/skel --shell /bin/bash user
45+
EOF
46+
47+
USER user
48+
WORKDIR /OpenROAD
49+
COPY --chown=user:user . .
50+
RUN <<EOF
51+
# enable compiler for RHEL8
52+
if [ -f /opt/rh/gcc-toolset-13/enable ]; then
53+
source /opt/rh/gcc-toolset-13/enable
54+
fi
55+
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DOPENROAD_VERSION=${orVersion}
56+
if [ "$numThreads" = "NotSet" ]; then
57+
numThreads=$(nproc)
58+
fi
59+
cmake --build build -- -j ${numThreads}
60+
EOF
61+
62+
COPY --chmod=775 --chown=user:user etc/docker-entrypoint.sh /usr/local/bin/.
63+
64+
################################################################################
65+
# Final Image #
66+
################################################################################
67+
68+
FROM $devImage AS final
69+
70+
COPY --from=builder /OpenROAD/build/src/openroad /usr/bin/.
71+
ENV OPENROAD_EXE=/usr/bin/openroad
72+
73+
RUN <<EOF
74+
groupadd user --gid 9000
75+
useradd --create-home --uid 9000 -g user --skel /etc/skel --shell /bin/bash user
76+
EOF
77+
78+
USER user
79+
WORKDIR /home/user
80+
81+
ENTRYPOINT [ "openroad" ]

0 commit comments

Comments
 (0)