Skip to content

Commit bee5cda

Browse files
committed
Include what you use from system
1 parent 7151dc5 commit bee5cda

File tree

1 file changed

+1
-26
lines changed
  • integrations/docker/images/base/chip-build

1 file changed

+1
-26
lines changed

integrations/docker/images/base/chip-build/Dockerfile

+1-26
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ RUN set -x \
4747
git-lfs \
4848
gperf \
4949
iproute2 \
50+
iwyu \
5051
jq \
5152
lcov \
5253
libavahi-client-dev \
@@ -135,32 +136,6 @@ RUN set -x \
135136
&& rm -rf bloaty \
136137
&& : # last line
137138

138-
# Need newer version of include-what-you-use
139-
RUN set -x \
140-
&& apt-get update \
141-
# Install build and runtime requirements for IWYU
142-
&& DEBIAN_FRONTEND=noninteractive apt-get install -fy --fix-missing clang-18 libclang-18-dev llvm-18-dev \
143-
# Build and install IWYU
144-
&& git clone --depth=1 --branch=clang_18 https://github.com/include-what-you-use/include-what-you-use.git \
145-
&& mkdir -p include-what-you-use/build \
146-
&& cd include-what-you-use/build \
147-
&& cmake -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_PREFIX_PATH=/usr/lib/llvm-18 -DIWYU_LINK_CLANG_DYLIB=OFF .. \
148-
&& make -j$(nproc) \
149-
&& strip bin/include-what-you-use \
150-
&& make install \
151-
# Save clang-18 files, so we can restore them after build dependencies cleanup
152-
# AWK logic converts 'libLLVM.so.18.1 => /usr/lib/llvm-18/lib/libLLVM.so.18.1 (0x00007f781ede6000)' to '/usr/lib/llvm-18/lib/libLLVM.so.18.1'
153-
&& tar -cf clang-18-files.tar $(dpkg -L libclang-common-18-dev |grep /include) $(ldd bin/include-what-you-use | grep /usr/lib/llvm | awk '{print $3}') /usr/lib/llvm-18/lib/libLLVM.so.1 \
154-
# Cleanup build dependencies
155-
&& apt autopurge -fy clang-18 libclang-18-dev llvm-18-dev \
156-
&& rm -rf /var/lib/apt/lists/ \
157-
# Restore clang-18 files
158-
&& tar -xf clang-18-files.tar -C / \
159-
# Cleanup
160-
&& cd ../.. \
161-
&& rm -rf include-what-you-use \
162-
&& : # last line
163-
164139
# Build glib-2.0 from source with enabled thread sanitizer. This is needed for
165140
# running CHIP tests with TSAN enabled. When running applications with TSAN
166141
# all shared libraries should be built with TSAN enabled, otherwise TSAN might

0 commit comments

Comments
 (0)