[llvm-commits] [PATCH] avoid substituting -clang in lit

Patrik Hägglund H patrik.h.hagglund at ericsson.com
Mon Sep 26 03:42:54 PDT 2011


I tried to build in a subdirectory 'build-clang'. That made 'make check' fail:

/local/scratch/uabpath/master/build-clang/test/BugPoint/Output/metadata.ll.script: line 2: /local/scratch/uabpath/master/build-/local/scratch/uabpath/master/build-clang/Debug+Asserts/bin/clang/Debug+Asserts/bin/bugpoint: No such file or directory

Here is a patch:

diff --git a/test/lit.cfg b/test/lit.cfg
index c588efa..85f54d8 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -177,12 +177,12 @@ for sub in ['llvmgcc', 'llvmgxx', 'emitir', 'compile_cxx', 'compile_c',
 # includes every tool placed in $(LLVM_OBJ_ROOT)/$(BuildMode)/bin
 # (llvm_tools_dir in lit parlance).
                 # Don't match 'bugpoint-' or 'clang-'.
-                                        # Don't match '/clang'.
+                                        # Don't match '/clang' or '-clang'.
 if os.pathsep == ';':
     pathext = os.environ.get('PATHEXT', '').split(';')
 else:
     pathext = ['']
-for pattern in [r"\bbugpoint\b(?!-)",   r"(?<!/)\bclang\b(?!-)",
+for pattern in [r"\bbugpoint\b(?!-)",   r"(?<!/|-)\bclang\b(?!-)",
                 r"\bgold\b",
                 r"\bllc\b",             r"\blli\b",
                 r"\bllvm-ar\b",         r"\bllvm-as\b",

Regards,
Patrik Hägglund
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lit.cfg.diff
Type: application/octet-stream
Size: 904 bytes
Desc: lit.cfg.diff
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110926/ec02043e/attachment.obj>


More information about the llvm-commits mailing list