[Lldb-commits] [lldb] WIP: [lldb][test] Workaround older systems that lack gettid (PR #104831)
Petr Hosek via lldb-commits
lldb-commits at lists.llvm.org
Tue Aug 20 01:08:14 PDT 2024
================
@@ -1,3 +1,14 @@
+include(CheckSymbolExists)
+include(CMakePushCheckState)
+
+cmake_push_check_state()
+set(CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
+check_symbol_exists(gettid "unistd.h" HAVE_GETTID)
+if(HAVE_GETTID)
+ add_compile_definitions(-DHAVE_GETTID)
----------------
petrhosek wrote:
You can make this more targeted by applying it only to `ProcessElfCoreTests` with `target_compile_definitions`, but either way is fine with me.
https://github.com/llvm/llvm-project/pull/104831
More information about the lldb-commits
mailing list