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 23 matching lines...) Expand all Loading... | |
34 # to configure warnings. | 34 # to configure warnings. |
35 is_clang = (os == "mac" || os == "ios" || os == "linux" || os == "chromeos") | 35 is_clang = (os == "mac" || os == "ios" || os == "linux" || os == "chromeos") |
36 | 36 |
37 # Forces a 64-bit build on Windows. Does nothing on other platforms. Normally | 37 # Forces a 64-bit build on Windows. Does nothing on other platforms. Normally |
38 # we build 32-bit on Windows regardless of the current host OS bit depth. | 38 # we build 32-bit on Windows regardless of the current host OS bit depth. |
39 # Setting this flag will override this logic and generate 64-bit toolchains. | 39 # Setting this flag will override this logic and generate 64-bit toolchains. |
40 # | 40 # |
41 # Normally this would get set automatically when you specify a target using | 41 # Normally this would get set automatically when you specify a target using |
42 # the 64-bit toolchain. You can also set this on the command line to convert | 42 # the 64-bit toolchain. You can also set this on the command line to convert |
43 # the default toolchain to 64-bit. | 43 # the default toolchain to 64-bit. |
44 # TODO(dpranke): Rework this. | |
44 force_win64 = false | 45 force_win64 = false |
45 | 46 |
46 # Selects the desired build flavor. Official builds get additional | 47 # Selects the desired build flavor. Official builds get additional |
47 # processing to prepare for release. Normally you will want to develop and | 48 # processing to prepare for release. Normally you will want to develop and |
48 # test with this flag off. | 49 # test with this flag off. |
49 is_official_build = false | 50 is_official_build = false |
50 | 51 |
51 # Select the desired branding flavor. False means normal Chromium branding, | 52 # Select the desired branding flavor. False means normal Chromium branding, |
52 # true means official Google Chrome branding (requires extra Google-internal | 53 # true means official Google Chrome branding (requires extra Google-internal |
53 # resources). | 54 # resources). |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
168 is_win = false | 169 is_win = false |
169 } | 170 } |
170 | 171 |
171 is_desktop_linux = is_linux && !is_chromeos | 172 is_desktop_linux = is_linux && !is_chromeos |
172 | 173 |
173 # ============================================================================= | 174 # ============================================================================= |
174 # CPU ARCHITECTURE | 175 # CPU ARCHITECTURE |
175 # ============================================================================= | 176 # ============================================================================= |
176 | 177 |
177 if (is_win) { | 178 if (is_win) { |
179 # TODO(dpranke): Delete this? x64 should mean x64 and force_win64 should | |
scottmg
2014/11/13 03:49:59
I agree, we should get rid of force_win64, or at l
Dirk Pranke
2014/11/13 05:49:36
Yeah, I'm waiting for Brett's feedback, because I'
brettw
2014/11/14 20:45:45
Let's just delete all force_win64 stuff (including
Dirk Pranke
2014/11/14 23:03:22
Done.
| |
180 # not be needed. | |
178 # Always use 32-bit on Windows, even when compiling on a 64-bit host OS, | 181 # Always use 32-bit on Windows, even when compiling on a 64-bit host OS, |
179 # unless the override flag is specified. | 182 # unless the override flag is specified. |
180 if (force_win64) { | 183 if (force_win64) { |
181 cpu_arch = "x64" | 184 cpu_arch = "x64" |
182 } else { | 185 } else { |
183 cpu_arch = "x86" | 186 cpu_arch = "x86" |
184 } | 187 } |
185 } | 188 } |
186 | 189 |
187 if (is_android) { | 190 if (is_android) { |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
490 # ============================================================================== | 493 # ============================================================================== |
491 # | 494 # |
492 # Here we set the default toolchain, as well as the variable host_toolchain | 495 # Here we set the default toolchain, as well as the variable host_toolchain |
493 # which will identify the toolchain corresponding to the local system when | 496 # which will identify the toolchain corresponding to the local system when |
494 # doing cross-compiles. When not cross-compiling, this will be the same as the | 497 # doing cross-compiles. When not cross-compiling, this will be the same as the |
495 # default toolchain. | 498 # default toolchain. |
496 | 499 |
497 if (is_win) { | 500 if (is_win) { |
498 # TODO(brettw) name the toolchains the same as cpu_arch as with Linux below | 501 # TODO(brettw) name the toolchains the same as cpu_arch as with Linux below |
499 # to eliminate these conditionals. | 502 # to eliminate these conditionals. |
500 if (build_cpu_arch == "x64") { | 503 # TODO(dpranke): Fix this. |
brettw
2014/11/14 20:45:45
I'd say we should delete my comment and your todo
Dirk Pranke
2014/11/14 23:03:21
Done.
| |
504 if (cpu_arch == "x64") { | |
scottmg
2014/11/13 03:49:59
what's build_cpu_arch supposed to mean? the target
Dirk Pranke
2014/11/13 05:49:36
cpu_arch is the architecture you're trying to buil
| |
501 host_toolchain = "//build/toolchain/win:64" | 505 host_toolchain = "//build/toolchain/win:64" |
502 } else if (build_cpu_arch == "x86") { | 506 } else if (cpu_arch == "x86") { |
503 host_toolchain = "//build/toolchain/win:32" | 507 host_toolchain = "//build/toolchain/win:32" |
504 } | 508 } |
505 | 509 |
506 if (cpu_arch == "x64") { | 510 if (cpu_arch == "x64") { |
507 set_default_toolchain("//build/toolchain/win:64") | 511 set_default_toolchain("//build/toolchain/win:64") |
508 } else if (cpu_arch == "x86") { | 512 } else if (cpu_arch == "x86") { |
509 set_default_toolchain("//build/toolchain/win:32") | 513 set_default_toolchain("//build/toolchain/win:32") |
510 } | 514 } |
511 } else if (is_android) { | 515 } else if (is_android) { |
512 # Use clang for the x86/64 Linux host builds. | 516 # Use clang for the x86/64 Linux host builds. |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
716 if (defined(invoker.output_extension)) { output_extension = invoker.output _extension } | 720 if (defined(invoker.output_extension)) { output_extension = invoker.output _extension } |
717 if (defined(invoker.output_name)) { output_name = invoker.output_name } | 721 if (defined(invoker.output_name)) { output_name = invoker.output_name } |
718 if (defined(invoker.public)) { public = invoker.public } | 722 if (defined(invoker.public)) { public = invoker.public } |
719 if (defined(invoker.public_configs)) { public_configs = invoker.public_con figs } | 723 if (defined(invoker.public_configs)) { public_configs = invoker.public_con figs } |
720 if (defined(invoker.public_deps)) { public_deps = invoker.public_deps } | 724 if (defined(invoker.public_deps)) { public_deps = invoker.public_deps } |
721 if (defined(invoker.sources)) { sources = invoker.sources } | 725 if (defined(invoker.sources)) { sources = invoker.sources } |
722 if (defined(invoker.visibility)) { visibility = invoker.visibility } | 726 if (defined(invoker.visibility)) { visibility = invoker.visibility } |
723 } | 727 } |
724 } | 728 } |
725 } | 729 } |
OLD | NEW |