[lldb] [llvm] [lldb][telemetry] Implement LLDB Telemetry (part 1) (PR #119716)

Pavel Labath via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 20 06:13:19 PST 2024


================
@@ -108,6 +108,9 @@ endfunction(add_lldb_test_dependency)
 add_lldb_test_dependency(lldb)
 add_lldb_test_dependency(lldb-test)
 
+# Enable Telemetry for testing.
+target_compile_definitions(lldb PRIVATE -DTEST_TELEMETRY)
+
----------------
labath wrote:

This doesn't do what you think it does. It builds the *lldb* binary with the macro definition *if* `LLDB_INCLUDE_TESTS` is defined (because that's the condition that guards cmake [entering this directory](https://github.com/llvm/llvm-project/blob/54665f5252695922dd000f311f82af717f1df0c6/lldb/CMakeLists.txt#L154)).

(Or, to put it differently `target_compile_definitions` always defines a macro for the target it gets as an argument, regardless of where the macro is called from)

https://github.com/llvm/llvm-project/pull/119716


More information about the llvm-commits mailing list