[Lldb-commits] [lldb] f6a2ca4 - [lldb][test] Disable PIE for some API tests (#93808)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Jun 12 08:10:24 PDT 2024
Author: Vladislav Dzhidzhoev
Date: 2024-06-12T17:10:20+02:00
New Revision: f6a2ca4f22e3d737a7aa488a4edde88d53dc8b26
URL: https://github.com/llvm/llvm-project/commit/f6a2ca4f22e3d737a7aa488a4edde88d53dc8b26
DIFF: https://github.com/llvm/llvm-project/commit/f6a2ca4f22e3d737a7aa488a4edde88d53dc8b26.diff
LOG: [lldb][test] Disable PIE for some API tests (#93808)
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.
It fixes the following tests when built with clang on Ubuntu aarch64:
```
commands/target/basic/TestTargetCommand.py
lang/c/global_variables/TestGlobalVariables.py
lang/cpp/char8_t/TestCxxChar8_t.py
```
Added:
Modified:
lldb/test/API/commands/target/basic/Makefile
lldb/test/API/lang/c/global_variables/Makefile
lldb/test/API/lang/cpp/char8_t/Makefile
Removed:
################################################################################
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
More information about the lldb-commits
mailing list