summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/iwyu.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/iwyu.sh b/scripts/iwyu.sh
new file mode 100644
index 0000000..dfdd651
--- /dev/null
+++ b/scripts/iwyu.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+iwyu_tool=iwyu-tool
+
+if ! command -v "$iwyu_tool" &> /dev/null; then
+ iwyu_tool=iwyu_tool.py
+fi
+
+cpus=`grep processor /proc/cpuinfo | wc -l`
+
+exec $iwyu_tool -o clang -j $cpus -p "${MESON_BUILD_ROOT}" -- -Xiwyu --mapping_file="${MESON_SOURCE_ROOT}"/iwyu-mappings.imp