diff options
| author | Ross Burton <ross.burton@arm.com> | 2025-07-29 14:45:18 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-08-04 18:04:04 +0100 |
| commit | dc1dd78b70b0d6231d05484882786e639ec7eb5b (patch) | |
| tree | 8c0bfb73e5a7475eca7bd01a6f09bb65bebfc291 | |
| parent | 24540125e3a99bc6917e49fcb3eb9825d3209941 (diff) | |
| download | poky-dc1dd78b70b0d6231d05484882786e639ec7eb5b.tar.gz | |
clang: don't install c-index-test
Specifically, c-index-test is a 35MB binary which isn't needed if we're
not running the tests.
(From OE-Core rev: a61c3ab08039d382ec2216b8a5deaf256d7bf9c5)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-devtools/clang/clang/no-c-index-test.patch | 43 | ||||
| -rw-r--r-- | meta/recipes-devtools/clang/common.inc | 1 |
2 files changed, 44 insertions, 0 deletions
diff --git a/meta/recipes-devtools/clang/clang/no-c-index-test.patch b/meta/recipes-devtools/clang/clang/no-c-index-test.patch new file mode 100644 index 0000000000..55737403d8 --- /dev/null +++ b/meta/recipes-devtools/clang/clang/no-c-index-test.patch | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | From 714a9cb319a8946fa670c7e8bbe7f29f847fa45f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: David Spickett <david.spickett@linaro.org> | ||
| 3 | Date: Tue, 29 Jul 2025 14:17:56 +0000 | ||
| 4 | Subject: [PATCH 1/2] [clang] Only build c-index-test when clang tests are | ||
| 5 | included | ||
| 6 | |||
| 7 | c-index-test is only used for testing, and it's used in tests | ||
| 8 | that are already guarded by CLANG_INCLUDE_TESTS in clang/CMakeLists.txt. | ||
| 9 | |||
| 10 | This change enables us to do builds with LLVM_INSTALL_TOOLCHAIN_ONLY=OFF, | ||
| 11 | and CLANG_INCLUDE_TESTS=OFF, which contain the required files | ||
| 12 | to build other bits of llvm-project standalone, but does not | ||
| 13 | include c-index-test which we have no need for. | ||
| 14 | |||
| 15 | Upstream-Status: Submitted [https://github.com/llvm/llvm-project/pull/151157] | ||
| 16 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
| 17 | --- | ||
| 18 | clang/tools/CMakeLists.txt | 4 +++- | ||
| 19 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
| 20 | |||
| 21 | diff --git i/clang/tools/CMakeLists.txt w/clang/tools/CMakeLists.txt | ||
| 22 | index 98c018e96848..5410dd8de843 100644 | ||
| 23 | --- i/clang/tools/CMakeLists.txt | ||
| 24 | +++ w/clang/tools/CMakeLists.txt | ||
| 25 | @@ -2,7 +2,6 @@ create_subdirectory_options(CLANG TOOL) | ||
| 26 | |||
| 27 | add_clang_subdirectory(diagtool) | ||
| 28 | add_clang_subdirectory(driver) | ||
| 29 | -add_clang_subdirectory(apinotes-test) | ||
| 30 | add_clang_subdirectory(clang-diff) | ||
| 31 | add_clang_subdirectory(clang-format) | ||
| 32 | add_clang_subdirectory(clang-fuzzer) | ||
| 33 | @@ -18,7 +17,10 @@ if(HAVE_CLANG_REPL_SUPPORT) | ||
| 34 | add_clang_subdirectory(clang-repl) | ||
| 35 | endif() | ||
| 36 | |||
| 37 | +if(CLANG_INCLUDE_TESTS) | ||
| 38 | +add_clang_subdirectory(apinotes-test) | ||
| 39 | add_clang_subdirectory(c-index-test) | ||
| 40 | +endif() | ||
| 41 | |||
| 42 | add_clang_subdirectory(clang-refactor) | ||
| 43 | # For MinGW we only enable shared library if LLVM_LINK_LLVM_DYLIB=ON. | ||
diff --git a/meta/recipes-devtools/clang/common.inc b/meta/recipes-devtools/clang/common.inc index d6280c2fbe..b2e08f829b 100644 --- a/meta/recipes-devtools/clang/common.inc +++ b/meta/recipes-devtools/clang/common.inc | |||
| @@ -60,6 +60,7 @@ SRC_URI = "\ | |||
| 60 | file://0037-compiler-rt-Exclude-sync_fetch_and_-for-any-pre-ARMv.patch \ | 60 | file://0037-compiler-rt-Exclude-sync_fetch_and_-for-any-pre-ARMv.patch \ |
| 61 | file://0038-compiler-rt-Hardcode-uptr-sptr-typedefs-on-Mips-Linu.patch \ | 61 | file://0038-compiler-rt-Hardcode-uptr-sptr-typedefs-on-Mips-Linu.patch \ |
| 62 | file://0001-libclc-allow-existing-prepare-builtins-in-standalone.patch \ | 62 | file://0001-libclc-allow-existing-prepare-builtins-in-standalone.patch \ |
| 63 | file://no-c-index-test.patch \ | ||
| 63 | " | 64 | " |
| 64 | # Fallback to no-PIE if not set | 65 | # Fallback to no-PIE if not set |
| 65 | GCCPIE ??= "" | 66 | GCCPIE ??= "" |
