r218404 - pass environment when invoking llvm-config and clang from lit.cfg

Scott Douglass sdouglass at arm.com
Wed Sep 24 11:37:52 PDT 2014


Author: scott-0
Date: Wed Sep 24 13:37:52 2014
New Revision: 218404

URL: http://llvm.org/viewvc/llvm-project?rev=218404&view=rev
Log:
pass environment when invoking llvm-config and clang from lit.cfg

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.

Modified:
    cfe/trunk/test/lit.cfg

Modified: cfe/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/lit.cfg?rev=218404&r1=218403&r2=218404&view=diff
==============================================================================
--- cfe/trunk/test/lit.cfg (original)
+++ cfe/trunk/test/lit.cfg Wed Sep 24 13:37:52 2014
@@ -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')





More information about the cfe-commits mailing list