Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3023)

Unified Diff: build/toolchain/win/BUILD.gn

Issue 2667853004: Remove dependency on scan-build wrapper script for Clang analysis builds. (Closed)
Patch Set: WIP clang on windows Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/toolchain/nacl_toolchain.gni ('k') | docs/clang_static_analyzer.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/toolchain/win/BUILD.gn
diff --git a/build/toolchain/win/BUILD.gn b/build/toolchain/win/BUILD.gn
index dd1017fb3d9f4f08d0b2f6fa34e1d307b228956f..7cc307ab629d4225f0bacd8b37066240ed0db183 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")
@@ -27,6 +28,13 @@ if (use_goma) {
goma_prefix = ""
}
+# Path to the Clang static analysis wrapper script.
+if (is_clang && use_clang_static_analyzer) {
+ analyzer_prefix = "$python_path " + rebase_path(
+ "//build/toolchain/clang_static_analyzer_wrapper.py",
+ root_build_dir) + " --clang-prefix=\"-Xclang\" "
+}
+
# Copy the VS runtime DLL for the default toolchain to the root build directory
# so things will run.
if (current_toolchain == default_toolchain) {
@@ -380,7 +388,7 @@ template("win_x64_toolchains") {
msvc_toolchain("clang_" + target_name) {
environment = "environment.x64"
prefix = rebase_path("$clang_base_path/bin", root_build_dir)
- cl = "${goma_prefix}$prefix/${clang_cl}"
+ cl = "${analyzer_prefix}${goma_prefix}$prefix/${clang_cl}"
sys_include_flags = "${x64_toolchain_data.include_flags_imsvc}"
toolchain_args = {
« no previous file with comments | « build/toolchain/nacl_toolchain.gni ('k') | docs/clang_static_analyzer.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698