summaryrefslogtreecommitdiffstats
path: root/llvm/utils/lit
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2018-12-01 00:22:21 +0000
committerZachary Turner <zturner@google.com>2018-12-01 00:22:21 +0000
commitba968c0d1d849d0598ebb2dbcdbace97f0709a29 (patch)
tree0adb998fa731bdb6749dde219b171db35a675c37 /llvm/utils/lit
parente5664b15593d6e0302e89d96fd62b39b407eeff9 (diff)
downloadbcm5719-llvm-ba968c0d1d849d0598ebb2dbcdbace97f0709a29.tar.gz
bcm5719-llvm-ba968c0d1d849d0598ebb2dbcdbace97f0709a29.zip
[lit] Add a generic build script with a lit substitution.
This adds a script called build.py as well as a lit substitution called %build that we can use to invoke it. The idea is that this allows a lit test to build test inferiors without having to worry about architecture / platform specific differences, command line syntax, finding / configurationg a proper toolchain, and other issues. They can simply write something like: %build --arch=32 -o %t.exe %p/Inputs/foo.cpp and it will just work. This paves the way for being able to run lit tests with multiple configurations, platforms, and compilers with a single test. Differential Revision: https://reviews.llvm.org/D54914 llvm-svn: 348058
Diffstat (limited to 'llvm/utils/lit')
-rw-r--r--llvm/utils/lit/lit/llvm/config.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/utils/lit/lit/llvm/config.py b/llvm/utils/lit/lit/llvm/config.py
index fde3d5aa8cd..fbe534bfc4f 100644
--- a/llvm/utils/lit/lit/llvm/config.py
+++ b/llvm/utils/lit/lit/llvm/config.py
@@ -33,6 +33,8 @@ class LLVMConfig(object):
['cmp.exe', 'grep.exe', 'sed.exe'])
if path is not None:
self.with_environment('PATH', path, append_path=True)
+ # Many tools behave strangely if these environment variables aren't set.
+ self.with_system_environment(['SystemDrive', 'SystemRoot', 'TEMP', 'TMP'])
self.use_lit_shell = True
# Choose between lit's internal shell pipeline runner and a real shell. If
OpenPOWER on IntegriCloud