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

Side by Side Diff: build/toolchain/gcc_toolchain.gni

Issue 2664063004: Add GN assert to prevent GOMA from being used with static analyzer. (Closed)
Patch Set: Mac changes Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | build/toolchain/mac/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/android/config.gni") 5 import("//build/config/android/config.gni")
6 import("//build/config/clang/clang.gni") 6 import("//build/config/clang/clang.gni")
7 import("//build/config/nacl/config.gni") 7 import("//build/config/nacl/config.gni")
8 import("//build/config/sanitizers/sanitizers.gni") 8 import("//build/config/sanitizers/sanitizers.gni")
9 import("//build/config/v8_target_cpu.gni") 9 import("//build/config/v8_target_cpu.gni")
10 import("//build/toolchain/cc_wrapper.gni") 10 import("//build/toolchain/cc_wrapper.gni")
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 toolprefix = "" 482 toolprefix = ""
483 } 483 }
484 484
485 gcc_toolchain(target_name) { 485 gcc_toolchain(target_name) {
486 prefix = rebase_path("$clang_base_path/bin", root_build_dir) 486 prefix = rebase_path("$clang_base_path/bin", root_build_dir)
487 cc = "$prefix/clang" 487 cc = "$prefix/clang"
488 cxx = "$prefix/clang++" 488 cxx = "$prefix/clang++"
489 ld = cxx 489 ld = cxx
490 490
491 if (use_clang_static_analyzer) { 491 if (use_clang_static_analyzer) {
492 # Static analysis isn't supported under GOMA. See crbug.com/687245
493 # for progress on this issue.
494 assert(!use_goma, "'use_clang_static_analyzer' cannot be used with GOMA.")
495
492 # Call "ccc-analyzer" or "c++-analyzer" instead of directly calling Clang. 496 # Call "ccc-analyzer" or "c++-analyzer" instead of directly calling Clang.
493 # |wrapper_tool| sets the environment variables which are read by the 497 # |wrapper_tool| sets the environment variables which are read by the
494 # analyzer tools. 498 # analyzer tools.
495 analyzer_wrapper = 499 analyzer_wrapper =
496 rebase_path("//build/toolchain/clang_static_analyzer_wrapper.py", 500 rebase_path("//build/toolchain/clang_static_analyzer_wrapper.py",
497 root_build_dir) 501 root_build_dir)
498 cc = analyzer_wrapper + " --clang-cc-path=${cc} --analyzer=" + 502 cc = analyzer_wrapper + " --clang-cc-path=${cc} --analyzer=" +
499 rebase_path("//third_party/scan-build/src/libexec/ccc-analyzer", 503 rebase_path("//third_party/scan-build/src/libexec/ccc-analyzer",
500 root_build_dir) 504 root_build_dir)
501 cxx = analyzer_wrapper + " --clang-cxx-path=${cxx} --analyzer=" + 505 cxx = analyzer_wrapper + " --clang-cxx-path=${cxx} --analyzer=" +
502 rebase_path("//third_party/scan-build/src/libexec/c++-analyzer", 506 rebase_path("//third_party/scan-build/src/libexec/c++-analyzer",
503 root_build_dir) 507 root_build_dir)
504 } 508 }
505 509
506 readelf = "${toolprefix}readelf" 510 readelf = "${toolprefix}readelf"
507 ar = "${toolprefix}ar" 511 ar = "${toolprefix}ar"
508 nm = "${toolprefix}nm" 512 nm = "${toolprefix}nm"
509 513
510 forward_variables_from(invoker, [ "strip" ]) 514 forward_variables_from(invoker, [ "strip" ])
511 515
512 toolchain_args = { 516 toolchain_args = {
513 if (defined(invoker.toolchain_args)) { 517 if (defined(invoker.toolchain_args)) {
514 forward_variables_from(invoker.toolchain_args, "*") 518 forward_variables_from(invoker.toolchain_args, "*")
515 } 519 }
516 is_clang = true 520 is_clang = true
517 } 521 }
518 } 522 }
519 } 523 }
OLDNEW
« no previous file with comments | « no previous file | build/toolchain/mac/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698