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 # ============================================================================= | 5 # ============================================================================= |
6 # BUILD FLAGS | 6 # BUILD FLAGS |
7 # ============================================================================= | 7 # ============================================================================= |
8 # | 8 # |
9 # This block lists input arguments to the build, along with their default | 9 # This block lists input arguments to the build, along with their default |
10 # values. GN requires listing them explicitly so it can validate input and have | 10 # values. GN requires listing them explicitly so it can validate input and have |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 is_asan = false | 57 is_asan = false |
58 | 58 |
59 # Compile for Leak Sanitizer to find leaks. | 59 # Compile for Leak Sanitizer to find leaks. |
60 is_lsan = false | 60 is_lsan = false |
61 | 61 |
62 # Compile for Memory Sanitizer to find uninitialized reads. | 62 # Compile for Memory Sanitizer to find uninitialized reads. |
63 is_msan = false | 63 is_msan = false |
64 | 64 |
65 # Compile for Thread Sanitizer to find threading bugs. | 65 # Compile for Thread Sanitizer to find threading bugs. |
66 is_tsan = false | 66 is_tsan = false |
| 67 |
| 68 if (os == "chromeos") { |
| 69 # Allows the target toolchain to be injected as arguments. This is needed |
| 70 # to support the CrOS build system which supports per-build-configuration |
| 71 # toolchains. |
| 72 cros_use_custom_toolchain = false |
| 73 } |
67 } | 74 } |
68 | 75 |
69 # ============================================================================= | 76 # ============================================================================= |
70 # OS DEFINITIONS | 77 # OS DEFINITIONS |
71 # ============================================================================= | 78 # ============================================================================= |
72 # | 79 # |
73 # We set these various is_FOO booleans for convenience in writing OS-based | 80 # We set these various is_FOO booleans for convenience in writing OS-based |
74 # conditions. | 81 # conditions. |
75 # | 82 # |
76 # - is_android, is_chromeos, is_ios, and is_win should be obvious. | 83 # - is_android, is_chromeos, is_ios, and is_win should be obvious. |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 } | 496 } |
490 set_default_toolchain("//build/toolchain/android:$cpu_arch") | 497 set_default_toolchain("//build/toolchain/android:$cpu_arch") |
491 } else if (is_linux) { | 498 } else if (is_linux) { |
492 if (is_clang) { | 499 if (is_clang) { |
493 host_toolchain = "//build/toolchain/linux:clang_$build_cpu_arch" | 500 host_toolchain = "//build/toolchain/linux:clang_$build_cpu_arch" |
494 set_default_toolchain("//build/toolchain/linux:clang_$cpu_arch") | 501 set_default_toolchain("//build/toolchain/linux:clang_$cpu_arch") |
495 } else { | 502 } else { |
496 host_toolchain = "//build/toolchain/linux:$build_cpu_arch" | 503 host_toolchain = "//build/toolchain/linux:$build_cpu_arch" |
497 set_default_toolchain("//build/toolchain/linux:$cpu_arch") | 504 set_default_toolchain("//build/toolchain/linux:$cpu_arch") |
498 } | 505 } |
| 506 if (is_chromeos && cros_use_custom_toolchain) { |
| 507 set_default_toolchain("//build/toolchain/cros:target") |
| 508 } |
499 } else if (is_mac) { | 509 } else if (is_mac) { |
500 host_toolchain = "//build/toolchain/mac:clang" | 510 host_toolchain = "//build/toolchain/mac:clang" |
501 set_default_toolchain(host_toolchain) | 511 set_default_toolchain(host_toolchain) |
502 } else if (is_ios) { | 512 } else if (is_ios) { |
503 host_toolchain = "//build/toolchain/mac:host_clang" | 513 host_toolchain = "//build/toolchain/mac:host_clang" |
504 set_default_toolchain("//build/toolchain/mac:clang") | 514 set_default_toolchain("//build/toolchain/mac:clang") |
505 } | 515 } |
506 | 516 |
507 # ============================================================================== | 517 # ============================================================================== |
508 # COMPONENT SETUP | 518 # COMPONENT SETUP |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 if (defined(invoker.output_extension)) { output_extension = invoker.output
_extension } | 683 if (defined(invoker.output_extension)) { output_extension = invoker.output
_extension } |
674 if (defined(invoker.output_name)) { output_name = invoker.output_name } | 684 if (defined(invoker.output_name)) { output_name = invoker.output_name } |
675 if (defined(invoker.public)) { public = invoker.public } | 685 if (defined(invoker.public)) { public = invoker.public } |
676 if (defined(invoker.public_configs)) { public_configs = invoker.public_con
figs } | 686 if (defined(invoker.public_configs)) { public_configs = invoker.public_con
figs } |
677 if (defined(invoker.public_deps)) { public_deps = invoker.public_deps } | 687 if (defined(invoker.public_deps)) { public_deps = invoker.public_deps } |
678 if (defined(invoker.sources)) { sources = invoker.sources } | 688 if (defined(invoker.sources)) { sources = invoker.sources } |
679 if (defined(invoker.visibility)) { visibility = invoker.visibility } | 689 if (defined(invoker.visibility)) { visibility = invoker.visibility } |
680 } | 690 } |
681 } | 691 } |
682 } | 692 } |
OLD | NEW |