From b5964f272582248b39841e9edd5d7b62bf585616 Mon Sep 17 00:00:00 2001 From: Alex Bradbury Date: Mon, 7 Oct 2024 13:43:51 +0100 Subject: [PATCH] [lit] Allow passthrough of some QEMU_* environment variables to lit This is an alternate implementation of a patch proposed by @preames in . 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. --- llvm/utils/lit/lit/TestingConfig.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/llvm/utils/lit/lit/TestingConfig.py b/llvm/utils/lit/lit/TestingConfig.py index f81b07baeeaed..b0d8e7149e553 100644 --- a/llvm/utils/lit/lit/TestingConfig.py +++ b/llvm/utils/lit/lit/TestingConfig.py @@ -64,6 +64,8 @@ def fromdefaults(litConfig): "SOURCE_DATE_EPOCH", "GTEST_FILTER", "DFLTCC", + "QEMU_LD_PREFIX", + "QEMU_CPU", ] if sys.platform.startswith("aix"):