Index: build/toolchain/win/BUILD.gn |
diff --git a/build/toolchain/win/BUILD.gn b/build/toolchain/win/BUILD.gn |
index dd1017fb3d9f4f08d0b2f6fa34e1d307b228956f..296f829cbb3080a60e7c059c9947c85201550c6c 100644 |
--- a/build/toolchain/win/BUILD.gn |
+++ b/build/toolchain/win/BUILD.gn |
@@ -6,6 +6,7 @@ import("//build/config/clang/clang.gni") |
import("//build/config/compiler/compiler.gni") |
import("//build/config/sanitizers/sanitizers.gni") |
import("//build/config/win/visual_studio_version.gni") |
+import("//build/toolchain/clang_static_analyzer.gni") |
import("//build/toolchain/goma.gni") |
import("//build/toolchain/toolchain.gni") |
@@ -95,6 +96,14 @@ template("msvc_toolchain") { |
cl = invoker.cl |
} |
+ if (toolchain_uses_clang && use_clang_static_analyzer) { |
+ analyzer_prefix = |
+ "$python_path " + |
+ rebase_path("//build/toolchain/clang_static_analyzer_wrapper.py", |
+ root_build_dir) + " --mode=cl" |
+ cl = "${analyzer_prefix} ${cl}" |
+ } |
+ |
if (use_lld) { |
if (host_os == "win") { |
lld_link = "lld-link.exe" |