[Lldb-commits] [lldb] [lldb][tests] Fix passing pthread library to a linker for some API tests. (PR #93648)
Vladimir Vereschaka via lldb-commits
lldb-commits at lists.llvm.org
Tue May 28 21:43:03 PDT 2024
https://github.com/vvereschaka created https://github.com/llvm/llvm-project/pull/93648
Specify ENABLE_THREADS := YES within test's Makefile instead passing -lpthread throuhg the compiler's CFLAGS options.
Updated the following tests:
* lldb/test/API/commands/register/register/aarch64_sme_z_registers/za_dynamic_resize/Makefile
* lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_dynamic_resize/Makefile
* lldb/test/API/functionalities/process_save_core_minidump/Makefile
* lldb/test/API/tools/lldb-dap/threads/Makefile
Fixes the following compiler/linker messages and error:
```
clang: warning: -lpthread: 'linker' input unused [-Wunused-command-line-argument]
...
ld.lld: error: undefined symbol: pthread_create
...
```
Depends on #93639
>From dc5913d7c2e65ea6afaa752c4dacb588cc545b8d Mon Sep 17 00:00:00 2001
From: Vladimir Vereschaka <vvereschaka at accesssoftek.com>
Date: Tue, 28 May 2024 21:40:10 -0700
Subject: [PATCH] [lldb][tests] Fix passing pthread library to a linker for
some API tests.
Specify ENABLE_THREADS := YES within test's Makefile instead passing -lpthread
throuhg the compiler's CFLAGS options.
Updated the following tests:
* lldb/test/API/commands/register/register/aarch64_sme_z_registers/za_dynamic_resize/Makefile
* lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_dynamic_resize/Makefile
* lldb/test/API/functionalities/process_save_core_minidump/Makefile
* lldb/test/API/tools/lldb-dap/threads/Makefile
---
.../aarch64_sme_z_registers/za_dynamic_resize/Makefile | 3 ++-
.../aarch64_sve_registers/rw_access_dynamic_resize/Makefile | 3 ++-
.../API/functionalities/process_save_core_minidump/Makefile | 2 +-
lldb/test/API/tools/lldb-dap/threads/Makefile | 3 ++-
4 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/lldb/test/API/commands/register/register/aarch64_sme_z_registers/za_dynamic_resize/Makefile b/lldb/test/API/commands/register/register/aarch64_sme_z_registers/za_dynamic_resize/Makefile
index 57d926b37d45c..bee03ac62a60f 100644
--- a/lldb/test/API/commands/register/register/aarch64_sme_z_registers/za_dynamic_resize/Makefile
+++ b/lldb/test/API/commands/register/register/aarch64_sme_z_registers/za_dynamic_resize/Makefile
@@ -1,5 +1,6 @@
C_SOURCES := main.c
-CFLAGS_EXTRAS := -march=armv8-a+sve+sme -lpthread
+CFLAGS_EXTRAS := -march=armv8-a+sve+sme
+ENABLE_THREADS := YES
include Makefile.rules
diff --git a/lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_dynamic_resize/Makefile b/lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_dynamic_resize/Makefile
index efa5ca913f6e2..1c65300b73738 100644
--- a/lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_dynamic_resize/Makefile
+++ b/lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_dynamic_resize/Makefile
@@ -1,5 +1,6 @@
C_SOURCES := main.c
-CFLAGS_EXTRAS := -march=armv8-a+sve -lpthread
+CFLAGS_EXTRAS := -march=armv8-a+sve
+ENABLE_THREADS := YES
include Makefile.rules
diff --git a/lldb/test/API/functionalities/process_save_core_minidump/Makefile b/lldb/test/API/functionalities/process_save_core_minidump/Makefile
index 2d177981fdde1..e9a26189f5dad 100644
--- a/lldb/test/API/functionalities/process_save_core_minidump/Makefile
+++ b/lldb/test/API/functionalities/process_save_core_minidump/Makefile
@@ -1,6 +1,6 @@
CXX_SOURCES := main.cpp
-CFLAGS_EXTRAS := -lpthread
+ENABLE_THREADS := YES
include Makefile.rules
diff --git a/lldb/test/API/tools/lldb-dap/threads/Makefile b/lldb/test/API/tools/lldb-dap/threads/Makefile
index 121868fa8ec33..aa6b054685d61 100644
--- a/lldb/test/API/tools/lldb-dap/threads/Makefile
+++ b/lldb/test/API/tools/lldb-dap/threads/Makefile
@@ -1,4 +1,5 @@
C_SOURCES := main.c
-CFLAGS_EXTRAS := -lpthread
+
+ENABLE_THREADS := YES
include Makefile.rules
More information about the lldb-commits
mailing list