Skip to content

Commit 9774515

Browse files
[lldb] fix arm64e tests not compiling with an arm64e target
1 parent e76fc59 commit 9774515

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

lldb/packages/Python/lldbsuite/test/lldbarm64e.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
@skipUnlessArm64eSupported
77
class Arm64eTestBase(TestBase):
88
def build(self):
9+
triple = configuration.triple.replace("arm64-", "arm64e-")
10+
# ARCH_CFLAGS is a Make command-line variable set by the test harness
11+
# to a plain (non-arm64e) `-mtargetos=...` flag. A plain in-Makefile
12+
# assignment can't override a command-line variable, so overriding
13+
# TRIPLE alone leaves the compiler without an explicit `-target`
14+
# flag and it silently falls back to the host's default (non-arm64e)
15+
# triple. Override ARCH_CFLAGS too so it wins as a later command-line
16+
# definition.
917
super().build(
10-
dictionary={"TRIPLE": configuration.triple.replace("arm64-", "arm64e-")}
18+
dictionary={"TRIPLE": triple, "ARCH_CFLAGS": "-target " + triple}
1119
)

0 commit comments

Comments
 (0)