[llvm] a649e8f - [lit] Allow passthrough of some QEMU_* environment variables to lit (#111373)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 8 03:32:16 PDT 2024


Author: Alex Bradbury
Date: 2024-10-08T11:32:12+01:00
New Revision: a649e8ff891e54a279768a8e877b76c8f000a5a7

URL: https://github.com/llvm/llvm-project/commit/a649e8ff891e54a279768a8e877b76c8f000a5a7
DIFF: https://github.com/llvm/llvm-project/commit/a649e8ff891e54a279768a8e877b76c8f000a5a7.diff

LOG: [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.

Added: 
    

Modified: 
    llvm/utils/lit/lit/TestingConfig.py

Removed: 
    


################################################################################
diff  --git a/llvm/utils/lit/lit/TestingConfig.py b/llvm/utils/lit/lit/TestingConfig.py
index f81b07baeeaed0..b0d8e7149e553c 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"):


        


More information about the llvm-commits mailing list