• Home
  • Raw
  • Download

Lines Matching +full:add +full:- +full:to +full:- +full:path

1 # -*- Python -*-
4 # This file contains common rules for various compiler-rt testsuites.
18 config.available_features.add('shell')
22 if (not compiler_path) or (not os.path.exists(compiler_path)):
23 lit_config.fatal("Can't find compiler on path %r" % compiler_path)
28 config.cxx_mode_flags = ["--driver-mode=g++"]
33 config.debug_info_flags = ["-gline-tables-only"]
35 config.debug_info_flags.append("-gcodeview")
37 config.cxx_mode_flags = ["-x c++"]
38 config.debug_info_flags = ["-g"]
41 # Add compiler ID to the list of available features.
42 config.available_features.add(compiler_id)
56 # Clang/Win32 may refer to %INCLUDE%. vsvarsall.bat sets it.
63 # Tweak PATH to include llvm tools dir.
65 if (not llvm_tools_dir) or (not os.path.exists(llvm_tools_dir)):
67 path = os.path.pathsep.join((llvm_tools_dir, config.environment['PATH']))
68 config.environment['PATH'] = path
71 # Make sure we only try to use it when targetting Windows.
72 if platform.system() == 'Windows' and '-win' in config.target_triple:
75 if re.match(r'^x86_64.*-linux', config.target_triple):
76 config.available_features.add("x86_64-linux")
78 # Use ugly construction to explicitly prohibit "clang", "clang++" etc.
84 # Allow tests to be executed on a simulator or remotely.
87 # Define CHECK-%os to check for OS-dependent output.
88 config.substitutions.append( ('CHECK-%os', ("CHECK-" + config.host_os)))
92 # does not crash but exits with a non-zero exit code. We ought to merge
93 # KillTheDoctor and not --crash to make the latter more useful and remove the
97 config.expect_crash = "not --crash "
103 config.available_features.add(target_arch + '-target-arch')
105 config.available_features.add('x86-target-arch')
109 config.available_features.add('compiler-rt-optimized')
113 config.available_features.add('cxxabi')
116 config.available_features.add('lld')
119 config.available_features.add('can-symbolize')
125 osx_version = subprocess.check_output(["sw_vers", "-productVersion"])
128 config.available_features.add('osx-autointerception')
129 config.available_features.add('osx-ld64-live_support')
131 # The ASAN initialization-bug.cc test should XFAIL on OS X systems
135 config.available_features.add('osx-no-ld64-live_support')
139 sancovcc_path = os.path.join(llvm_tools_dir, "sancov")
140 if os.path.exists(sancovcc_path):
141 config.available_features.add("has_sancovcc")
145 return os.path.exists(os.path.join(config.llvm_shlib_dir, 'libLTO.dylib'))
148 if not os.path.exists(os.path.join(config.llvm_shlib_dir, 'LLVMgold.so')):
151 ld_cmd = subprocess.Popen([config.gold_executable, '--help'], stdout = subprocess.PIPE)
155 if not '-plugin' in ld_out:
161 return os.path.exists(os.path.join(config.llvm_tools_dir, 'lld-link.exe'))
170 config.lto_flags = ["-fuse-ld=gold"]
174 config.lto_flags = ["-fuse-ld=lld"]
178 # Ask llvm-config about assertion mode.
181 [os.path.join(config.llvm_tools_dir, 'llvm-config'), '--assertion-mode'],
185 print("Could not find llvm-config in " + llvm_tools_dir)
189 config.available_features.add('asserts')
192 # Sanitizer tests tend to be flaky on Windows due to PR24554, so add some