Skip to content

Commit f6a2ca4

Browse files
authored
[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 ```
1 parent 7051073 commit f6a2ca4

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

lldb/test/API/commands/target/basic/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,8 @@
33
# C_SOURCES := b.c
44
# EXE := b.out
55

6+
ifndef PIE
7+
LDFLAGS := -no-pie
8+
endif
9+
610
include Makefile.rules

lldb/test/API/lang/c/global_variables/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,8 @@ C_SOURCES := main.c
22

33
DYLIB_NAME := a
44
DYLIB_C_SOURCES := a.c
5+
ifndef PIE
6+
LDFLAGS := -no-pie
7+
endif
58

69
include Makefile.rules
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
CXX_SOURCES := main.cpp
22
CXXFLAGS_EXTRAS := -std=c++2a -fchar8_t
3+
ifndef PIE
4+
LDFLAGS := -no-pie
5+
endif
36

47
include Makefile.rules

0 commit comments

Comments
 (0)