]> granicus.if.org Git - clang/commitdiff
pass environment when invoking llvm-config and clang from lit.cfg
authorScott Douglass <sdouglass@arm.com>
Wed, 24 Sep 2014 18:37:52 +0000 (18:37 +0000)
committerScott Douglass <sdouglass@arm.com>
Wed, 24 Sep 2014 18:37:52 +0000 (18:37 +0000)
Use the same environment when invoking llvm-config from lit.cfg as
will be used when running tests, so that ASAN_OPTIONS, INCLUDE, etc.
are present.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218404 91177308-0d34-0410-b5e6-96231b3b80d8

test/lit.cfg

index 64570d763a3645304a9a7408a10ab585267a6d85..f0be64df7e28bedb76dd38609109b7f706d6328b 100644 (file)
@@ -223,7 +223,8 @@ def getClangBuiltinIncludeDir(clang):
     # FIXME: Rather than just getting the version, we should have clang print
     # out its resource dir here in an easy to scrape form.
     cmd = subprocess.Popen([clang, '-print-file-name=include'],
-                           stdout=subprocess.PIPE)
+                           stdout=subprocess.PIPE,
+                           env=config.environment)
     if not cmd.stdout:
       lit_config.fatal("Couldn't find the include dir for Clang ('%s')" % clang)
     dir = cmd.stdout.read().strip()
@@ -423,7 +424,8 @@ def get_llvm_config_props():
             '--assertion-mode',
             '--targets-built',
             ],
-        stdout=subprocess.PIPE
+        stdout=subprocess.PIPE,
+        env=config.environment
         )
     # 1st line corresponds to --assertion-mode, "ON" or "OFF".
     line = cmd.stdout.readline().strip().decode('ascii')