1 # -*- Python -*- 2 3 # Configuration file for the 'lit' test runner. 4 5 def getRoot(config): 6 if not config.parent: 7 return config 8 return getRoot(config.parent) 9 10 root = getRoot(config) 11 12 # testFormat: The test format to use to interpret tests. 13 target_obj_root = root.llvm_obj_root 14 cxxflags = ['-D__STDC_LIMIT_MACROS', 15 '-D__STDC_CONSTANT_MACROS', 16 '-Wno-sign-compare', 17 '-I%s/include' % root.llvm_src_root, 18 '-I%s/include' % root.llvm_obj_root, 19 '-I%s/lib/Target/Alpha' % root.llvm_src_root, 20 '-I%s/lib/Target/ARM' % root.llvm_src_root, 21 '-I%s/lib/Target/Blackfin' % root.llvm_src_root, 22 '-I%s/lib/Target/CBackend' % root.llvm_src_root, 23 '-I%s/lib/Target/CellSPU' % root.llvm_src_root, 24 '-I%s/lib/Target/CppBackend' % root.llvm_src_root, 25 '-I%s/lib/Target/Mips' % root.llvm_src_root, 26 '-I%s/lib/Target/MSIL' % root.llvm_src_root, 27 '-I%s/lib/Target/MSP430' % root.llvm_src_root, 28 '-I%s/lib/Target/PIC16' % root.llvm_src_root, 29 '-I%s/lib/Target/PowerPC' % root.llvm_src_root, 30 '-I%s/lib/Target/Sparc' % root.llvm_src_root, 31 '-I%s/lib/Target/SystemZ' % root.llvm_src_root, 32 '-I%s/lib/Target/X86' % root.llvm_src_root, 33 '-I%s/lib/Target/XCore' % root.llvm_src_root, 34 '-I%s/lib/Target/Alpha' % target_obj_root, 35 '-I%s/lib/Target/ARM' % target_obj_root, 36 '-I%s/lib/Target/Blackfin' % target_obj_root, 37 '-I%s/lib/Target/CBackend' % target_obj_root, 38 '-I%s/lib/Target/CellSPU' % target_obj_root, 39 '-I%s/lib/Target/CppBackend' % target_obj_root, 40 '-I%s/lib/Target/Mips' % target_obj_root, 41 '-I%s/lib/Target/MSIL' % target_obj_root, 42 '-I%s/lib/Target/MSP430' % target_obj_root, 43 '-I%s/lib/Target/PIC16' % target_obj_root, 44 '-I%s/lib/Target/PowerPC' % target_obj_root, 45 '-I%s/lib/Target/Sparc' % target_obj_root, 46 '-I%s/lib/Target/SystemZ' % target_obj_root, 47 '-I%s/lib/Target/X86' % target_obj_root, 48 '-I%s/lib/Target/XCore' % target_obj_root]; 49 50 kScript = os.path.join(os.path.dirname(__file__), "check-symbols") 51 config.test_format = \ 52 lit.formats.OneCommandPerFileTest(command=[kScript, root.clang] + cxxflags, 53 dir='%s/lib' % root.llvm_src_root, 54 recursive=True, 55 pattern='^(.*\\.cpp)$') 56 57