]> granicus.if.org Git - clang/commitdiff
tests: Stash clang/clang-cc and LLVM src/obj paths for use elsewhere.
authorDaniel Dunbar <daniel@zuster.org>
Wed, 16 Sep 2009 01:39:52 +0000 (01:39 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Wed, 16 Sep 2009 01:39:52 +0000 (01:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81989 91177308-0d34-0410-b5e6-96231b3b80d8

test/lit.cfg

index 0b8e12bf0de1bf4ba99c45ce7699bb6147b5219c..46164f94b18f3285a03d7b0e8105db95286aaedb 100644 (file)
@@ -26,6 +26,13 @@ def config_new():
     if clang_obj_root is not None:
         config.test_exec_root = os.path.join(clang_obj_root, 'test')
 
+    # Set llvm_{src,obj}_root for use by others.
+    config.llvm_src_root = os.path.join(config.test_source_root,
+                                        '..', '..', '..')
+    if clang_obj_root is not None:
+        config.llvm_obj_root = os.path.join(clang_obj_root,
+                                            '..', '..')
+
     ###
 
     # Check that the object root is known.
@@ -121,15 +128,15 @@ def config_new():
 
         return clangcc
 
-    clang = inferClang(config.environment['PATH'])
+    config.clang = inferClang(config.environment['PATH'])
     if not lit.quiet:
-        lit.note('using clang: %r' % clang)
-    config.substitutions.append( (' clang ', ' ' + clang + ' ') )
+        lit.note('using clang: %r' % config.clang)
+    config.substitutions.append( (' clang ', ' ' + config.clang + ' ') )
 
-    clang_cc = inferClangCC(clang, config.environment['PATH'])
+    config.clang_cc = inferClangCC(config.clang, config.environment['PATH'])
     if not lit.quiet:
-        lit.note('using clang-cc: %r' % clang_cc)
-    config.substitutions.append( (' clang-cc ', ' ' + clang_cc + ' ') )
+        lit.note('using clang-cc: %r' % config.clang_cc)
+    config.substitutions.append( (' clang-cc ', ' ' + config.clang_cc + ' ') )
 
 if 'config' in globals():
     config_new()