OLD | NEW |
1 # Copyright 2016 Google Inc. | 1 # Copyright 2016 Google Inc. |
2 # | 2 # |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 # It's best to keep the names and defaults of is_foo flags consistent with Chrom
e. | 6 # It's best to keep the names and defaults of is_foo flags consistent with Chrom
e. |
7 | 7 |
8 declare_args() { | 8 declare_args() { |
9 is_debug = true | 9 is_debug = true |
10 is_component_build = false | 10 is_component_build = false |
11 } | 11 } |
12 | 12 |
13 # Platform detection | 13 # Platform detection |
14 if (target_os == "") { | 14 if (target_os == "") { |
15 target_os = host_os | 15 target_os = host_os |
16 } | 16 } |
17 if (current_os == "") { | 17 if (current_os == "") { |
18 current_os = target_os | 18 current_os = target_os |
19 } | 19 } |
20 | 20 |
| 21 if (target_cpu == "") { |
| 22 target_cpu = host_cpu |
| 23 } |
| 24 if (current_cpu == "") { |
| 25 current_cpu = target_cpu |
| 26 } |
| 27 |
21 is_android = current_os == "android" | 28 is_android = current_os == "android" |
22 is_fuchsia = current_os == "fuchsia" | 29 is_fuchsia = current_os == "fuchsia" |
23 is_ios = current_os == "ios" | 30 is_ios = current_os == "ios" |
24 is_linux = current_os == "linux" | 31 is_linux = current_os == "linux" |
25 is_mac = current_os == "mac" | 32 is_mac = current_os == "mac" |
26 is_win = current_os == "win" | 33 is_win = current_os == "win" |
27 | 34 |
28 is_posix = !is_win | 35 is_posix = !is_win |
29 | 36 |
30 # A component is either a static or a shared library. | 37 # A component is either a static or a shared library. |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 set_defaults("shared_library") { | 70 set_defaults("shared_library") { |
64 configs = default_configs | 71 configs = default_configs |
65 } | 72 } |
66 | 73 |
67 set_defaults("component") { | 74 set_defaults("component") { |
68 configs = default_configs | 75 configs = default_configs |
69 } | 76 } |
70 | 77 |
71 # For now, we support GCC-like toolchains, including Clang. | 78 # For now, we support GCC-like toolchains, including Clang. |
72 set_default_toolchain("//gn:gcc_like") | 79 set_default_toolchain("//gn:gcc_like") |
OLD | NEW |