blob: fab52b1c7bd679fa1dc0ab36e00c318de114f15b [file] [log] [blame]
# -*- Python -*-
import lit.util
import lit.formats
import os
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' --use-analyzer=%s "
% (
lit.util.which(
"scan-build",
os.path.join(config.clang_src_dir, "tools", "scan-build", "bin"),
),
clang_path,
),
)
)