| # -*- Python -*- |
| |
| import lit.formats |
| import os |
| import platform |
| |
| use_lit_shell = os.environ.get("LIT_USE_INTERNAL_SHELL") |
| config.test_format = lit.formats.ShTest(use_lit_shell == "0") |
| |
| clang_path = config.clang if config.have_llvm_driver else os.path.realpath(config.clang) |
| |
| config.substitutions.append( |
| ( |
| "%scan-build", |
| "'%s' '%s' --use-analyzer=%s " |
| % ( |
| config.perl_executable, |
| os.path.join( |
| config.clang_src_dir, "tools", "scan-build", "bin", "scan-build" |
| ), |
| clang_path, |
| ), |
| ) |
| ) |
| |
| if not config.perl_executable or platform.system() == "Windows": |
| config.unsupported = True |