summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/imports/iwyu.TARGETS6
-rw-r--r--etc/repos.json12
-rw-r--r--src/compilers/clang-18-native.TARGETS15
3 files changed, 31 insertions, 2 deletions
diff --git a/etc/imports/iwyu.TARGETS b/etc/imports/iwyu.TARGETS
new file mode 100644
index 0000000..53fa53d
--- /dev/null
+++ b/etc/imports/iwyu.TARGETS
@@ -0,0 +1,6 @@
+{ "sources": {"type": "export", "target": "files"}
+, "files":
+ { "type": "install"
+ , "dirs": [[["TREE", null, "."], "iwyu"]]
+ }
+}
diff --git a/etc/repos.json b/etc/repos.json
index e6c6e1a..aeca7b3 100644
--- a/etc/repos.json
+++ b/etc/repos.json
@@ -472,6 +472,7 @@
{ "rules": "rules/clang_with_gcc13"
, "binutils": "imports/binutils-latest"
, "patches": "patches"
+ , "iwyu": "iwyu-18"
}
}
, "tools/busybox-1.36.1":
@@ -801,5 +802,16 @@
{ "repository": {"type": "file", "path": "test"}
, "bindings": {"rules": "test/rules-clang-native"}
}
+ , "iwyu-18":
+ { "repository":
+ { "type": "archive"
+ , "content": "04ffb3d3e78e6d20fd0ea2fe627f83de4418528d"
+ , "fetch": "https://github.com/include-what-you-use/include-what-you-use/archive/refs/tags/0.22.tar.gz"
+ , "sha256": "34c7636da2abe7b86580b53b762f5269e71efff460f24f17d5913c56eb99cb7c"
+ , "subdir": "include-what-you-use-0.22"
+ }
+ , "target_file_name": "iwyu.TARGETS"
+ , "target_root": "imports"
+ }
}
}
diff --git a/src/compilers/clang-18-native.TARGETS b/src/compilers/clang-18-native.TARGETS
index c4eef3c..3a75343 100644
--- a/src/compilers/clang-18-native.TARGETS
+++ b/src/compilers/clang-18-native.TARGETS
@@ -65,7 +65,10 @@
{ "type": ["@", "rules", "CC/foreign/shell", "data"]
, "arguments_config": ["TOOLCHAIN_CONFIG"]
, "project": ["patched_sources"]
- , "localbase": ["binutils_dir"]
+ , "localbase":
+ [ "binutils_dir"
+ , ["@", "iwyu", "", "sources"]
+ ]
, "cmds":
[ { "type": "join"
, "$1":
@@ -161,7 +164,15 @@
, "default": {"type": "empty_map"}
}
}
- , "then": "-DLLVM_ENABLE_PROJECTS='clang;clang-tools-extra'"
+ , "then":
+ { "type": "join"
+ , "separator": " "
+ , "$1":
+ [ "-DLLVM_ENABLE_PROJECTS='clang;clang-tools-extra'"
+ , "-DLLVM_EXTERNAL_PROJECTS=iwyu"
+ , "-DLLVM_EXTERNAL_IWYU_SOURCE_DIR=${LOCALBASE}/iwyu"
+ ]
+ }
, "else": "-DLLVM_ENABLE_PROJECTS=clang"
}
, "-DLLVM_ENABLE_RUNTIMES='libcxx;libcxxabi;libunwind'"