Skip to content

[lldb][tests] Fix passing pthread library to a linker for some API tests #118530

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

dzhidzhoev
Copy link
Member

Specify ENABLE_THREADS := YES within test's Makefile instead of passing -lpthread explicitly via the compiler's CFLAGS options.

Refactoring fix.

…sts.

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
@dzhidzhoev dzhidzhoev added the lldb label Dec 3, 2024
@dzhidzhoev dzhidzhoev self-assigned this Dec 3, 2024
@llvmbot
Copy link
Member

llvmbot commented Dec 3, 2024

@llvm/pr-subscribers-lldb

Author: Vladislav Dzhidzhoev (dzhidzhoev)

Changes

Specify ENABLE_THREADS := YES within test's Makefile instead of passing -lpthread explicitly via the compiler's CFLAGS options.

Refactoring fix.


Full diff: https://github.com/llvm/llvm-project/pull/118530.diff

4 Files Affected:

  • (modified) lldb/test/API/commands/register/register/aarch64_sme_z_registers/za_dynamic_resize/Makefile (+2-1)
  • (modified) lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_dynamic_resize/Makefile (+2-1)
  • (modified) lldb/test/API/functionalities/process_save_core_minidump/Makefile (+1-1)
  • (modified) lldb/test/API/tools/lldb-dap/threads/Makefile (+2-1)
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 57d926b37d45cf..bee03ac62a60fb 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 efa5ca913f6e2d..1c65300b737388 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 2d177981fdde16..e9a26189f5dad5 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 121868fa8ec338..aa6b054685d615 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

@dzhidzhoev dzhidzhoev merged commit 4e80c53 into llvm:main Dec 4, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants