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 |
11 # a central place to manage the build flags. | 11 # a central place to manage the build flags. |
12 # | 12 # |
13 # If a value is specified on the command line, it will overwrite the defaults | 13 # If a value is specified on the command line, it will overwrite the defaults |
14 # given here, otherwise the default will be injected into the root scope. | 14 # given here, otherwise the default will be injected into the root scope. |
15 # | 15 # |
16 # KEEP IN ALPHABETICAL ORDER and write a good description for everything. | 16 # KEEP IN ALPHABETICAL ORDER and write a good description for everything. |
17 # Use "is_*" names for intrinsic platform descriptions and build modes, and | 17 # Use "is_*" names for intrinsic platform descriptions and build modes, and |
18 # "use_*" names for optional features libraries, and configurations. | 18 # "use_*" names for optional features libraries, and configurations. |
| 19 |
| 20 # TODO(dpranke): The os and cpu_arch variables exist for backwards |
| 21 # compatibility and should be deleted once all of the build files and |
| 22 # bots have been updated to use current_cpu/target_cpu and |
| 23 # current_os/target_os instead. |
| 24 |
| 25 if (target_os == "") { |
| 26 if (defined(os)) { |
| 27 # If os is defined, it was set in an args file and needs to be |
| 28 # used for backwards-compatibility. |
| 29 target_os = os |
| 30 } else { |
| 31 target_os = host_os |
| 32 } |
| 33 } |
| 34 |
| 35 if (target_cpu == "") { |
| 36 if (defined(cpu_arch)) { |
| 37 # If cpu_arch is defined, it was set in an args file and needs to be |
| 38 # used for backwards-compatibility. |
| 39 target_cpu = cpu_arch |
| 40 } else { |
| 41 target_cpu = host_cpu |
| 42 } |
| 43 } |
| 44 |
| 45 if (current_cpu == "") { |
| 46 current_cpu = target_cpu |
| 47 } |
| 48 if (current_os == "") { |
| 49 current_os = target_os |
| 50 } |
| 51 |
19 declare_args() { | 52 declare_args() { |
| 53 # TODO(dpranke): These values are here for backwards compatibility and |
| 54 # should be deleted when all of the builders and configs have been updated. |
| 55 cpu_arch = target_cpu |
| 56 os = target_os |
| 57 build_cpu_arch = host_cpu |
| 58 build_os = host_os |
| 59 |
20 # How many symbols to include in the build. This affects the performance of | 60 # How many symbols to include in the build. This affects the performance of |
21 # the build since the symbols are large and dealing with them is slow. | 61 # the build since the symbols are large and dealing with them is slow. |
22 # 2 means regular build with symbols. | 62 # 2 means regular build with symbols. |
23 # 1 means minimal symbols, usually enough for backtraces only. | 63 # 1 means minimal symbols, usually enough for backtraces only. |
24 # 0 means no symbols. | 64 # 0 means no symbols. |
25 # -1 means auto-set (off in release, regular in debug). | 65 # -1 means auto-set (off in release, regular in debug). |
26 symbol_level = -1 | 66 symbol_level = -1 |
27 | 67 |
28 # Component build. | 68 # Component build. |
29 is_component_build = false | 69 is_component_build = false |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 # cross-compiles (compiling the same target for multiple toolchains in the | 116 # cross-compiles (compiling the same target for multiple toolchains in the |
77 # same build) to work. | 117 # same build) to work. |
78 target_arch = "arm" | 118 target_arch = "arm" |
79 | 119 |
80 # TODO(brettw) remove this flag (and therefore enable linking all targets) on | 120 # TODO(brettw) remove this flag (and therefore enable linking all targets) on |
81 # Windows when we have sufficient bot capacity. In the meantime, you can | 121 # Windows when we have sufficient bot capacity. In the meantime, you can |
82 # enable linking for local compiles. | 122 # enable linking for local compiles. |
83 link_chrome_on_windows = true | 123 link_chrome_on_windows = true |
84 } | 124 } |
85 | 125 |
| 126 # TODO(dpranke): Remove these asserts when os and cpu_arch are removed. |
| 127 assert(current_cpu == cpu_arch) |
| 128 assert(current_os == os) |
| 129 |
86 # ============================================================================= | 130 # ============================================================================= |
87 # OS DEFINITIONS | 131 # OS DEFINITIONS |
88 # ============================================================================= | 132 # ============================================================================= |
89 # | 133 # |
90 # We set these various is_FOO booleans for convenience in writing OS-based | 134 # We set these various is_FOO booleans for convenience in writing OS-based |
91 # conditions. | 135 # conditions. |
92 # | 136 # |
93 # - is_android, is_chromeos, is_ios, and is_win should be obvious. | 137 # - is_android, is_chromeos, is_ios, and is_win should be obvious. |
94 # - is_mac is set only for desktop Mac. It is not set on iOS. | 138 # - is_mac is set only for desktop Mac. It is not set on iOS. |
95 # - is_posix is true for mac and any Unix-like system (basically everything | 139 # - is_posix is true for mac and any Unix-like system (basically everything |
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
720 } | 764 } |
721 if (defined(invoker.testonly)) { | 765 if (defined(invoker.testonly)) { |
722 testonly = invoker.testonly | 766 testonly = invoker.testonly |
723 } | 767 } |
724 if (defined(invoker.visibility)) { | 768 if (defined(invoker.visibility)) { |
725 visibility = invoker.visibility | 769 visibility = invoker.visibility |
726 } | 770 } |
727 } | 771 } |
728 } | 772 } |
729 } | 773 } |
OLD | NEW |