Skip to content

Commit

Permalink
Build IWYU for LLVM 7 in iwyu docker-compose job
Browse files Browse the repository at this point in the history
Change-Id: I3bf8bd27728094656e81af480de607853259c694
  • Loading branch information
wesm committed Feb 14, 2019
1 parent 69d595a commit e1c46c7
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
4 changes: 1 addition & 3 deletions dev/lint/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ RUN apt-get install -y -q gnupg && \
apt update && \
apt-get install -y -q \
clang-7 \
libclang-7-dev \
clang-format-7 \
clang-tidy-7 \
clang-tools-7

RUN conda install flake8 && \
conda clean --all -y

# https://bugs.launchpad.net/ubuntu/+source/iwyu/+bug/1769334
RUN ln -sv /usr/lib/clang/6.0 /usr/lib/clang/5.0.1
23 changes: 21 additions & 2 deletions dev/lint/run_iwyu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,34 @@ mkdir -p /build/lint
pushd /build/lint

cmake -GNinja \
-DARROW_FLIGHT=ON \
-DARROW_GANDIVA=ON \
-DARROW_PARQUET=ON \
-DARROW_PYTHON=ON \
-DCMAKE_CXX_FLAGS='-D_GLIBCXX_USE_CXX11_ABI=0' \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
/arrow/cpp
# Make so that vendored bits are built
ninja arrow_shared

popd

# Build IWYU for current Clang
git clone https://github.com/include-what-you-use/include-what-you-use.git
pushd include-what-you-use
git checkout clang_7.0
popd

export CC=clang-7
export CXX=clang++-7

mkdir -p iwyu
pushd iwyu
cmake -G "Unix Makefiles" \
-DCMAKE_PREFIX_PATH=/usr/lib/llvm-7 \
../include-what-you-use
make -j4
popd

export PATH=`pwd`/iwyu/bin:$PATH

export IWYU_COMPILATION_DATABASE_PATH=/build/lint
/arrow/cpp/build-support/iwyu/iwyu.sh all
3 changes: 0 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,6 @@ services:
# docker-compose build lint
# docker-compose run iwyu
image: arrow:lint
environment:
CC: clang
CXX: clang++
command: arrow/dev/lint/run_iwyu.sh
volumes: *ubuntu-volumes

Expand Down

0 comments on commit e1c46c7

Please sign in to comment.