forked from The-OpenROAD-Project/OpenROAD-flow-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
39 lines (29 loc) · 1.62 KB
/
Copy pathDockerfile.dev
File metadata and controls
39 lines (29 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# create image with dependencies needed to compile openroad app and run openroad flow scripts
# NOTE: don't use this file directly unless you know what you are doing,
# instead use etc/DockerHelper.sh
ARG fromImage=ubuntu:22.04
FROM $fromImage
WORKDIR /tmp/installer/etc
COPY DependencyInstaller.sh .
COPY InstallerOpenROAD.sh \
/tmp/installer/tools/OpenROAD/etc/DependencyInstaller.sh
ARG options=""
ARG constantBuildDir="-constant-build-dir"
# add compiler wrapper scripts
# inject the macro definitions during compilation only
RUN mkdir -p /usr/local/bin/wrapped-cc && \
echo '#!/bin/sh' > /usr/local/bin/wrapped-cc/gcc && \
echo 'exec /usr/bin/gcc -D__TIME__="\"0\"" -D__DATE__="\"0\"" -D__TIMESTAMP__="\"0\"" -Wno-builtin-macro-redefined "$@"' >> /usr/local/bin/wrapped-cc/gcc && \
chmod +x /usr/local/bin/wrapped-cc/gcc && \
ln -s /usr/local/bin/wrapped-cc/gcc /usr/local/bin/wrapped-cc/cc && \
echo '#!/bin/sh' > /usr/local/bin/wrapped-cc/g++ && \
echo 'exec /usr/bin/g++ -D__TIME__="\"0\"" -D__DATE__="\"0\"" -D__TIMESTAMP__="\"0\"" -Wno-builtin-macro-redefined "$@"' >> /usr/local/bin/wrapped-cc/g++ && \
chmod +x /usr/local/bin/wrapped-cc/g++
ENV PATH="/usr/local/bin/wrapped-cc:$PATH"
RUN ./DependencyInstaller.sh -base $options $constantBuildDir \
&& ./DependencyInstaller.sh -common $options $constantBuildDir \
&& rm -rf /tmp/installer /tmp/* /var/tmp/* /var/lib/apt/lists/*
ARG fromImage
RUN echo "$fromImage" | grep -q "ubuntu" && \
strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so || \
echo "Skipping strip command as fromImage does not contain 'ubuntu'"