OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |