[clang-tools-extra] [llvm] clangd: Add a build option to disable building dexp (PR #133124)
https://github.com/ycongal-smile created https://github.com/llvm/llvm-project/pull/133124 Building dexp on Debian 11 currently causes intermittent failure[0] [1]. Adding the CLANGD_BUILD_DEXP option to disable dexp from the build allows Debian 11 users to build clang (albeit without the dexp tool). This option is set to "Build Dexp" by default so, no change is expected without manual setting. [0]: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15803 [1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1101322 >From c547879623079717c76222c1cbe2f6c322b76c0b Mon Sep 17 00:00:00 2001 From: Yoann Congal Date: Tue, 25 Mar 2025 22:25:55 +0100 Subject: [PATCH] clangd: Add a build option to disable building dexp Building dexp on Debian 11 currently causes intermittent failure[0][1]. Adding the CLANGD_BUILD_DEXP option to disable dexp from the build allows Debian 11 users to build clang (albeit without the dexp tool). This option is set to "Build Dexp" by default so, no change is expected without manual setting. [0]: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15803 [1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1101322 --- clang-tools-extra/clangd/CMakeLists.txt| 6 +- clang-tools-extra/clangd/test/CMakeLists.txt | 7 +-- clang-tools-extra/clangd/test/lit.site.cfg.py.in | 1 + .../gn/secondary/clang-tools-extra/clangd/test/BUILD.gn| 6 +- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/clang-tools-extra/clangd/CMakeLists.txt b/clang-tools-extra/clangd/CMakeLists.txt index 6f10afe4a5625..279515d635d38 100644 --- a/clang-tools-extra/clangd/CMakeLists.txt +++ b/clang-tools-extra/clangd/CMakeLists.txt @@ -220,4 +220,8 @@ option(CLANGD_ENABLE_REMOTE "Use gRPC library to enable remote index support for set(GRPC_INSTALL_PATH "" CACHE PATH "Path to gRPC library manual installation.") add_subdirectory(index/remote) -add_subdirectory(index/dex/dexp) + +option(CLANGD_BUILD_DEXP "Build the dexp tool as part of Clangd" ON) +if(CLANGD_BUILD_DEXP) + add_subdirectory(index/dex/dexp) +endif() diff --git a/clang-tools-extra/clangd/test/CMakeLists.txt b/clang-tools-extra/clangd/test/CMakeLists.txt index b51f461a49866..42fc3506641f2 100644 --- a/clang-tools-extra/clangd/test/CMakeLists.txt +++ b/clang-tools-extra/clangd/test/CMakeLists.txt @@ -3,8 +3,6 @@ set(CLANGD_TEST_DEPS ClangdTests clangd-indexer split-file - # No tests for it, but we should still make sure they build. - dexp ) if(CLANGD_BUILD_XPC) @@ -12,6 +10,11 @@ if(CLANGD_BUILD_XPC) list(APPEND CLANGD_TEST_DEPS ClangdXpcUnitTests) endif() +if(CLANGD_BUILD_DEXP) + # No tests for it, but we should still make sure they build. + list(APPEND CLANGD_TEST_DEPS dexp) +endif() + if(CLANGD_ENABLE_REMOTE) list(APPEND CLANGD_TEST_DEPS clangd-index-server clangd-index-server-monitor) endif() diff --git a/clang-tools-extra/clangd/test/lit.site.cfg.py.in b/clang-tools-extra/clangd/test/lit.site.cfg.py.in index 1fe7c8d0f3244..a0bb3561e19ee 100644 --- a/clang-tools-extra/clangd/test/lit.site.cfg.py.in +++ b/clang-tools-extra/clangd/test/lit.site.cfg.py.in @@ -15,6 +15,7 @@ config.llvm_shlib_dir = "@SHLIBDIR@" config.clangd_source_dir = "@CMAKE_CURRENT_SOURCE_DIR@/.." config.clangd_binary_dir = "@CMAKE_CURRENT_BINARY_DIR@/.." config.clangd_build_xpc = @CLANGD_BUILD_XPC@ +config.clangd_build_dexp = @CLANGD_BUILD_DEXP@ config.clangd_enable_remote = @CLANGD_ENABLE_REMOTE@ config.clangd_tidy_checks = @CLANGD_TIDY_CHECKS@ config.have_zlib = @LLVM_ENABLE_ZLIB@ diff --git a/llvm/utils/gn/secondary/clang-tools-extra/clangd/test/BUILD.gn b/llvm/utils/gn/secondary/clang-tools-extra/clangd/test/BUILD.gn index 9d42409f1973f..8bfcb1282f0e5 100644 --- a/llvm/utils/gn/secondary/clang-tools-extra/clangd/test/BUILD.gn +++ b/llvm/utils/gn/secondary/clang-tools-extra/clangd/test/BUILD.gn @@ -77,7 +77,6 @@ group("test") { deps = [ ":lit_site_cfg", ":lit_unit_site_cfg", -"//clang-tools-extra/clangd/index/dex/dexp", "//clang-tools-extra/clangd/indexer:clangd-indexer", "//clang-tools-extra/clangd/tool:clangd", "//clang-tools-extra/clangd/unittests:ClangdTests", @@ -92,6 +91,11 @@ group("test") { "//clang-tools-extra/clangd/xpc/test-client:clangd-xpc-test-client", ] } + if (clangd_build_dexp) { +deps += [ + "//clang-tools-extra/clangd/index/dex/dexp", +] + } testonly = true } ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang-tools-extra] [llvm] clangd: Add a build option to disable building dexp (PR #133124)
@@ -15,6 +15,7 @@ config.llvm_shlib_dir = "@SHLIBDIR@" config.clangd_source_dir = "@CMAKE_CURRENT_SOURCE_DIR@/.." config.clangd_binary_dir = "@CMAKE_CURRENT_BINARY_DIR@/.." config.clangd_build_xpc = @CLANGD_BUILD_XPC@ +config.clangd_build_dexp = @CLANGD_BUILD_DEXP@ ycongal-smile wrote: This causes: ``` llvm-lit: /var/lib/buildkite-agent/builds/linux-56-59b8f5d88-h94vh-1/llvm-project/github-pull-requests/llvm/utils/lit/lit/TestingConfig.py:156: fatal: unable to parse config file '/var/lib/buildkite-agent/builds/linux-56-59b8f5d88-h94vh-1/llvm-project/github-pull-requests/build/tools/clang/tools/extra/clangd/test/lit.site.cfg.py', traceback: Traceback (most recent call last): File "/var/lib/buildkite-agent/builds/linux-56-59b8f5d88-h94vh-1/llvm-project/github-pull-requests/llvm/utils/lit/lit/TestingConfig.py", line 144, in load_from_path exec(compile(data, path, "exec"), cfg_globals, None) File "/var/lib/buildkite-agent/builds/linux-56-59b8f5d88-h94vh-1/llvm-project/github-pull-requests/build/tools/clang/tools/extra/clangd/test/lit.site.cfg.py", line 31 config.clangd_build_dexp = ^ SyntaxError: invalid syntax FAILED: tools/clang/tools/extra/CMakeFiles/check-clang-tools /var/lib/buildkite-agent/builds/linux-56-59b8f5d88-h94vh-1/llvm-project/github-pull-requests/build/tools/clang/tools/extra/CMakeFiles/check-clang-tools ``` https://github.com/llvm/llvm-project/pull/133124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang-tools-extra] [llvm] clangd: Add a build option to disable building dexp (PR #133124)
https://github.com/ycongal-smile converted_to_draft https://github.com/llvm/llvm-project/pull/133124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang-tools-extra] clangd: Add a build option to disable building dexp (PR #133124)
https://github.com/ycongal-smile ready_for_review https://github.com/llvm/llvm-project/pull/133124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang-tools-extra] clangd: Add a build option to disable building dexp (PR #133124)
@@ -15,6 +15,7 @@ config.llvm_shlib_dir = "@SHLIBDIR@" config.clangd_source_dir = "@CMAKE_CURRENT_SOURCE_DIR@/.." config.clangd_binary_dir = "@CMAKE_CURRENT_BINARY_DIR@/.." config.clangd_build_xpc = @CLANGD_BUILD_XPC@ +config.clangd_build_dexp = @CLANGD_BUILD_DEXP@ ycongal-smile wrote: Fixed: put the CMake option before the test that uses it https://github.com/llvm/llvm-project/pull/133124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang-tools-extra] clangd: Add a build option to disable building dexp (PR #133124)
https://github.com/ycongal-smile updated https://github.com/llvm/llvm-project/pull/133124 >From 895bf3da0236bc6bf9f814ab3e00d1a4f52a9397 Mon Sep 17 00:00:00 2001 From: Yoann Congal Date: Tue, 25 Mar 2025 22:25:55 +0100 Subject: [PATCH] clangd: Add a build option to disable building dexp Building dexp on Debian 11 currently causes intermittent failure[0][1]. Adding the CLANGD_BUILD_DEXP option to disable dexp from the build allows Debian 11 users to build clang (albeit without the dexp tool). This option is set to "Build Dexp" by default so, no change is expected without manual setting. [0]: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15803 [1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1101322 --- clang-tools-extra/clangd/CMakeLists.txt | 8 +++- clang-tools-extra/clangd/test/CMakeLists.txt | 7 +-- clang-tools-extra/clangd/test/lit.site.cfg.py.in | 1 + 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/clang-tools-extra/clangd/CMakeLists.txt b/clang-tools-extra/clangd/CMakeLists.txt index 6f10afe4a5625..a1e9da41b4b32 100644 --- a/clang-tools-extra/clangd/CMakeLists.txt +++ b/clang-tools-extra/clangd/CMakeLists.txt @@ -210,6 +210,9 @@ if (CLANGD_ENABLE_REMOTE) include(AddGRPC) endif() +option(CLANGD_BUILD_DEXP "Build the dexp tool as part of Clangd" ON) +llvm_canonicalize_cmake_booleans(CLANGD_BUILD_DEXP) + if(CLANG_INCLUDE_TESTS) add_subdirectory(test) add_subdirectory(unittests) @@ -220,4 +223,7 @@ option(CLANGD_ENABLE_REMOTE "Use gRPC library to enable remote index support for set(GRPC_INSTALL_PATH "" CACHE PATH "Path to gRPC library manual installation.") add_subdirectory(index/remote) -add_subdirectory(index/dex/dexp) + +if(CLANGD_BUILD_DEXP) + add_subdirectory(index/dex/dexp) +endif() diff --git a/clang-tools-extra/clangd/test/CMakeLists.txt b/clang-tools-extra/clangd/test/CMakeLists.txt index b51f461a49866..42fc3506641f2 100644 --- a/clang-tools-extra/clangd/test/CMakeLists.txt +++ b/clang-tools-extra/clangd/test/CMakeLists.txt @@ -3,8 +3,6 @@ set(CLANGD_TEST_DEPS ClangdTests clangd-indexer split-file - # No tests for it, but we should still make sure they build. - dexp ) if(CLANGD_BUILD_XPC) @@ -12,6 +10,11 @@ if(CLANGD_BUILD_XPC) list(APPEND CLANGD_TEST_DEPS ClangdXpcUnitTests) endif() +if(CLANGD_BUILD_DEXP) + # No tests for it, but we should still make sure they build. + list(APPEND CLANGD_TEST_DEPS dexp) +endif() + if(CLANGD_ENABLE_REMOTE) list(APPEND CLANGD_TEST_DEPS clangd-index-server clangd-index-server-monitor) endif() diff --git a/clang-tools-extra/clangd/test/lit.site.cfg.py.in b/clang-tools-extra/clangd/test/lit.site.cfg.py.in index 1fe7c8d0f3244..a0bb3561e19ee 100644 --- a/clang-tools-extra/clangd/test/lit.site.cfg.py.in +++ b/clang-tools-extra/clangd/test/lit.site.cfg.py.in @@ -15,6 +15,7 @@ config.llvm_shlib_dir = "@SHLIBDIR@" config.clangd_source_dir = "@CMAKE_CURRENT_SOURCE_DIR@/.." config.clangd_binary_dir = "@CMAKE_CURRENT_BINARY_DIR@/.." config.clangd_build_xpc = @CLANGD_BUILD_XPC@ +config.clangd_build_dexp = @CLANGD_BUILD_DEXP@ config.clangd_enable_remote = @CLANGD_ENABLE_REMOTE@ config.clangd_tidy_checks = @CLANGD_TIDY_CHECKS@ config.have_zlib = @LLVM_ENABLE_ZLIB@ ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang-tools-extra] clangd: Add a build option to disable building dexp (PR #133124)
https://github.com/ycongal-smile updated https://github.com/llvm/llvm-project/pull/133124 >From 8001f900e602c0a8abcf118bda5869a2eb0d5ee9 Mon Sep 17 00:00:00 2001 From: Yoann Congal Date: Tue, 25 Mar 2025 22:25:55 +0100 Subject: [PATCH] clangd: Add a build option to disable building dexp Building dexp on Debian 11 currently causes intermittent failure[0][1]. Adding the CLANGD_BUILD_DEXP option to disable dexp from the build allows Debian 11 users to build clang (albeit without the dexp tool). This option is set to "Build Dexp" by default so, no change is expected without manual setting. [0]: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15803 [1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1101322 --- clang-tools-extra/clangd/CMakeLists.txt | 8 +++- clang-tools-extra/clangd/test/CMakeLists.txt | 7 +-- clang-tools-extra/clangd/test/lit.site.cfg.py.in | 1 + 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/clang-tools-extra/clangd/CMakeLists.txt b/clang-tools-extra/clangd/CMakeLists.txt index 6f10afe4a5625..a1e9da41b4b32 100644 --- a/clang-tools-extra/clangd/CMakeLists.txt +++ b/clang-tools-extra/clangd/CMakeLists.txt @@ -210,6 +210,9 @@ if (CLANGD_ENABLE_REMOTE) include(AddGRPC) endif() +option(CLANGD_BUILD_DEXP "Build the dexp tool as part of Clangd" ON) +llvm_canonicalize_cmake_booleans(CLANGD_BUILD_DEXP) + if(CLANG_INCLUDE_TESTS) add_subdirectory(test) add_subdirectory(unittests) @@ -220,4 +223,7 @@ option(CLANGD_ENABLE_REMOTE "Use gRPC library to enable remote index support for set(GRPC_INSTALL_PATH "" CACHE PATH "Path to gRPC library manual installation.") add_subdirectory(index/remote) -add_subdirectory(index/dex/dexp) + +if(CLANGD_BUILD_DEXP) + add_subdirectory(index/dex/dexp) +endif() diff --git a/clang-tools-extra/clangd/test/CMakeLists.txt b/clang-tools-extra/clangd/test/CMakeLists.txt index b51f461a49866..42fc3506641f2 100644 --- a/clang-tools-extra/clangd/test/CMakeLists.txt +++ b/clang-tools-extra/clangd/test/CMakeLists.txt @@ -3,8 +3,6 @@ set(CLANGD_TEST_DEPS ClangdTests clangd-indexer split-file - # No tests for it, but we should still make sure they build. - dexp ) if(CLANGD_BUILD_XPC) @@ -12,6 +10,11 @@ if(CLANGD_BUILD_XPC) list(APPEND CLANGD_TEST_DEPS ClangdXpcUnitTests) endif() +if(CLANGD_BUILD_DEXP) + # No tests for it, but we should still make sure they build. + list(APPEND CLANGD_TEST_DEPS dexp) +endif() + if(CLANGD_ENABLE_REMOTE) list(APPEND CLANGD_TEST_DEPS clangd-index-server clangd-index-server-monitor) endif() diff --git a/clang-tools-extra/clangd/test/lit.site.cfg.py.in b/clang-tools-extra/clangd/test/lit.site.cfg.py.in index 1fe7c8d0f3244..a0bb3561e19ee 100644 --- a/clang-tools-extra/clangd/test/lit.site.cfg.py.in +++ b/clang-tools-extra/clangd/test/lit.site.cfg.py.in @@ -15,6 +15,7 @@ config.llvm_shlib_dir = "@SHLIBDIR@" config.clangd_source_dir = "@CMAKE_CURRENT_SOURCE_DIR@/.." config.clangd_binary_dir = "@CMAKE_CURRENT_BINARY_DIR@/.." config.clangd_build_xpc = @CLANGD_BUILD_XPC@ +config.clangd_build_dexp = @CLANGD_BUILD_DEXP@ config.clangd_enable_remote = @CLANGD_ENABLE_REMOTE@ config.clangd_tidy_checks = @CLANGD_TIDY_CHECKS@ config.have_zlib = @LLVM_ENABLE_ZLIB@ ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang-tools-extra] clangd: Add a build option to disable building dexp (PR #133124)
ycongal-smile wrote: ping https://github.com/llvm/llvm-project/pull/133124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang-tools-extra] clangd: Add a build option to disable building dexp (PR #133124)
ycongal-smile wrote: I received 2 failing builds: - LLVM Buildbot: builder sanitizer-x86_64-linux-bootstrap-asan build 7561 - https://lab.llvm.org/buildbot/#/builders/52/builds/7561 - LLVM Buildbot: builder sanitizer-x86_64-linux-fast build 10441 - https://lab.llvm.org/buildbot/#/builders/169/builds/10441 I've looked at the logs. IMHO it is an unrelated error : my change change if a single tool is built, the error is a single test related to address sanitation failing. https://github.com/llvm/llvm-project/pull/133124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits