[Lldb-commits] [lldb] [lldb][test] Disable PIE for some API tests (PR #93808)
via lldb-commits
lldb-commits at lists.llvm.org
Thu May 30 04:29:56 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Vladislav Dzhidzhoev (dzhidzhoev)
<details>
<summary>Changes</summary>
When PIE is enabled on a platform by default, these tests fail since the `target variable` command can't read a global string variable value before running an inferior process.
---
Full diff: https://github.com/llvm/llvm-project/pull/93808.diff
3 Files Affected:
- (modified) lldb/test/API/commands/target/basic/Makefile (+4)
- (modified) lldb/test/API/lang/c/global_variables/Makefile (+3)
- (modified) lldb/test/API/lang/cpp/char8_t/Makefile (+3)
``````````diff
diff --git a/lldb/test/API/commands/target/basic/Makefile b/lldb/test/API/commands/target/basic/Makefile
index b31e594019f6f..e66971834b689 100644
--- a/lldb/test/API/commands/target/basic/Makefile
+++ b/lldb/test/API/commands/target/basic/Makefile
@@ -3,4 +3,8 @@
# C_SOURCES := b.c
# EXE := b.out
+ifndef PIE
+ LDFLAGS := -no-pie
+endif
+
include Makefile.rules
diff --git a/lldb/test/API/lang/c/global_variables/Makefile b/lldb/test/API/lang/c/global_variables/Makefile
index 7b94b6556f254..00c2557033d81 100644
--- a/lldb/test/API/lang/c/global_variables/Makefile
+++ b/lldb/test/API/lang/c/global_variables/Makefile
@@ -2,5 +2,8 @@ C_SOURCES := main.c
DYLIB_NAME := a
DYLIB_C_SOURCES := a.c
+ifndef PIE
+ LDFLAGS := -no-pie
+endif
include Makefile.rules
diff --git a/lldb/test/API/lang/cpp/char8_t/Makefile b/lldb/test/API/lang/cpp/char8_t/Makefile
index e7c9938b5a85e..28f982a0078d8 100644
--- a/lldb/test/API/lang/cpp/char8_t/Makefile
+++ b/lldb/test/API/lang/cpp/char8_t/Makefile
@@ -1,4 +1,7 @@
CXX_SOURCES := main.cpp
CXXFLAGS_EXTRAS := -std=c++2a -fchar8_t
+ifndef PIE
+ LDFLAGS := -no-pie
+endif
include Makefile.rules
``````````
</details>
https://github.com/llvm/llvm-project/pull/93808
More information about the lldb-commits
mailing list