Author: Jonas Devlieghere Date: 2025-02-06T17:05:33-08:00 New Revision: 0892dddc23c64bf2aab2c5ee1fc9f4dcd68771e0
URL: https://github.com/llvm/llvm-project/commit/0892dddc23c64bf2aab2c5ee1fc9f4dcd68771e0 DIFF: https://github.com/llvm/llvm-project/commit/0892dddc23c64bf2aab2c5ee1fc9f4dcd68771e0.diff LOG: [llvm] Add CMake flag to compile out the telemetry framework (#124850) Add a CMake flag (LLVM_BUILD_TELEMETRY) to disable building the telemetry framework. The flag being enabled does *not* mean that telemetry is being collected, it merely means we're building the generic telemetry framework. Hence the flag is enabled by default. Motivated by this Discourse thread: https://discourse.llvm.org/t/how-to-disable-building-llvm-clang-telemetry/84305 (cherry picked from commit bac62ee5b473e70981a6bd9759ec316315fca07d) Added: Modified: llvm/CMakeLists.txt llvm/lib/CMakeLists.txt llvm/unittests/CMakeLists.txt Removed: ################################################################################ diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt index c9ff3696e22d698..d1b4c2700ce8ef7 100644 --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt @@ -829,6 +829,7 @@ option (LLVM_ENABLE_DOXYGEN "Use doxygen to generate llvm API documentation." OF option (LLVM_ENABLE_SPHINX "Use Sphinx to generate llvm documentation." OFF) option (LLVM_ENABLE_OCAMLDOC "Build OCaml bindings documentation." ON) option (LLVM_ENABLE_BINDINGS "Build bindings." ON) +option (LLVM_BUILD_TELEMETRY "Build the telemtry library. This does not enable telemetry." ON) set(LLVM_INSTALL_DOXYGEN_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/llvm/doxygen-html" CACHE STRING "Doxygen-generated HTML documentation install directory") diff --git a/llvm/lib/CMakeLists.txt b/llvm/lib/CMakeLists.txt index f6465612d30c0b4..d0a2bc929438179 100644 --- a/llvm/lib/CMakeLists.txt +++ b/llvm/lib/CMakeLists.txt @@ -41,7 +41,9 @@ add_subdirectory(ProfileData) add_subdirectory(Passes) add_subdirectory(TargetParser) add_subdirectory(TextAPI) -add_subdirectory(Telemetry) +if (LLVM_BUILD_TELEMETRY) + add_subdirectory(Telemetry) +endif() add_subdirectory(ToolDrivers) add_subdirectory(XRay) if (LLVM_INCLUDE_TESTS) diff --git a/llvm/unittests/CMakeLists.txt b/llvm/unittests/CMakeLists.txt index 81abce51b8939f0..12e229b1c349840 100644 --- a/llvm/unittests/CMakeLists.txt +++ b/llvm/unittests/CMakeLists.txt @@ -63,7 +63,9 @@ add_subdirectory(Support) add_subdirectory(TableGen) add_subdirectory(Target) add_subdirectory(TargetParser) -add_subdirectory(Telemetry) +if (LLVM_BUILD_TELEMETRY) + add_subdirectory(Telemetry) +endif() add_subdirectory(Testing) add_subdirectory(TextAPI) add_subdirectory(Transforms) _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits