Skip to content

Commit 6480d8d

Browse files
urutvaaggarg
authored andcommitted
devcontainer: Add ccache support
`ccache` is a compiler cache used to reduce the compilation time where possible. The working of ccache is described in the manual https://ccache.dev/manual/4.10.2.html. Signed-off-by: Devaraj Ranganna <[email protected]>
1 parent c9e877f commit 6480d8d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.devcontainer/Dockerfile

+9
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ RUN apt-get update && \
1919
apt-get -y install \
2020
bash-completion \
2121
build-essential \
22+
ccache \
2223
cppcheck \
2324
curl \
2425
fd-find \
@@ -197,3 +198,11 @@ RUN git clone https://github.com/uncrustify/uncrustify.git /tmp/uncrustify; \
197198
sudo cp uncrustify /usr/local/bin/uncrustify; \
198199
popd; popd; \
199200
rm -rf /tmp/uncrustify
201+
202+
# Setup ccache
203+
RUN sudo ln -s /usr/bin/ccache /usr/lib/ccache/arm-none-eabi-gcc; \
204+
sudo ln -s /usr/bin/ccache /usr/lib/ccache/arm-none-eabi-g++; \
205+
sudo ln -s /usr/bin/ccache /usr/lib/ccache/arm-none-eabi-c++; \
206+
sudo ln -s /usr/bin/ccache /usr/lib/ccache/arm-none-eabi-cpp; \
207+
sudo ln -s /usr/bin/ccache /usr/lib/ccache/arm-none-eabi-ar
208+
ENV PATH="/usr/lib/ccache:${PATH}"

0 commit comments

Comments
 (0)