summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@spawned.biz>2023-06-13 10:07:16 +0200
committerJoel Klinghed <the_jk@spawned.biz>2023-06-13 10:07:16 +0200
commitfc4547b412e28164af1bf8981234c6af959ccc0b (patch)
tree061253e7a4f6abaca282223b36d10f0bed8cad23 /scripts
WIP
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