Skip to content

Commit a649e8f

Browse files
authored
[lit] Allow passthrough of some QEMU_* environment variables to lit (#111373)
This is an alternate implementation of a patch proposed by @preames in <https://reviews.llvm.org/D128840>. As noted there, when running non-native binaries with binfmt_misc and qemu-user you typically need to set some environment variables (at least, QEMU_LD_PREFIX), but lit strips them by default. This patch adds what I think are the two main ones to the list of those that aren't stripped. It does so in a place that applies to all lit test suites (rather than just LLVM's), and as can be seen from the other env vars in `pass_vars` I think there's already plenty of precedent for passing through environment variables known to be potentially useful to LLVM developers.
1 parent e3e5517 commit a649e8f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/utils/lit/lit/TestingConfig.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ def fromdefaults(litConfig):
6464
"SOURCE_DATE_EPOCH",
6565
"GTEST_FILTER",
6666
"DFLTCC",
67+
"QEMU_LD_PREFIX",
68+
"QEMU_CPU",
6769
]
6870

6971
if sys.platform.startswith("aix"):

0 commit comments

Comments
 (0)