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 24 matching lines...) Expand all Loading... |
35 | 35 |
36 # Forces a 64-bit build on Windows. Does nothing on other platforms. Normally | 36 # Forces a 64-bit build on Windows. Does nothing on other platforms. Normally |
37 # we build 32-bit on Windows regardless of the current host OS bit depth. | 37 # we build 32-bit on Windows regardless of the current host OS bit depth. |
38 # Setting this flag will override this logic and generate 64-bit toolchains. | 38 # Setting this flag will override this logic and generate 64-bit toolchains. |
39 # | 39 # |
40 # Normally this would get set automatically when you specify a target using | 40 # Normally this would get set automatically when you specify a target using |
41 # the 64-bit toolchain. You can also set this on the command line to convert | 41 # the 64-bit toolchain. You can also set this on the command line to convert |
42 # the default toolchain to 64-bit. | 42 # the default toolchain to 64-bit. |
43 force_win64 = false | 43 force_win64 = false |
44 | 44 |
45 # Set to true on the command line when invoked by GYP. Build files can key | |
46 # off of this to make any GYP-output-specific changes to the build. | |
47 is_gyp = false | |
48 | |
49 # Selects the desired build flavor. Official builds get additional | 45 # Selects the desired build flavor. Official builds get additional |
50 # processing to prepare for release. Normally you will want to develop and | 46 # processing to prepare for release. Normally you will want to develop and |
51 # test with this flag off. | 47 # test with this flag off. |
52 is_official_build = false | 48 is_official_build = false |
53 | 49 |
54 # Select the desired branding flavor. False means normal Chromium branding, | 50 # Select the desired branding flavor. False means normal Chromium branding, |
55 # true means official Google Chrome branding (requires extra Google-internal | 51 # true means official Google Chrome branding (requires extra Google-internal |
56 # resources). | 52 # resources). |
57 is_chrome_branded = false | 53 is_chrome_branded = false |
58 | 54 |
59 # Compile for Address Sanitizer to find memory bugs. | 55 # Compile for Address Sanitizer to find memory bugs. |
60 is_asan = false | 56 is_asan = false |
61 | 57 |
62 # Compile for Leak Sanitizer to find leaks. | 58 # Compile for Leak Sanitizer to find leaks. |
63 is_lsan = false | 59 is_lsan = false |
64 | 60 |
65 # Compile for Memory Sanitizer to find uninitialized reads. | 61 # Compile for Memory Sanitizer to find uninitialized reads. |
66 is_msan = false | 62 is_msan = false |
67 | 63 |
68 # Compile for Thread Sanitizer to find threading bugs. | 64 # Compile for Thread Sanitizer to find threading bugs. |
69 is_tsan = false | 65 is_tsan = false |
70 | |
71 # When running in gyp-generating mode, this is the root of the build tree. | |
72 gyp_output_dir = "out" | |
73 | |
74 # When running in gyp-generating mode, this flag indicates if the current GYP | |
75 # generator is xcode. Can only be true when building for iOS). | |
76 is_gyp_xcode_generator = false | |
77 } | 66 } |
78 | 67 |
79 # ============================================================================= | 68 # ============================================================================= |
80 # OS DEFINITIONS | 69 # OS DEFINITIONS |
81 # ============================================================================= | 70 # ============================================================================= |
82 # | 71 # |
83 # We set these various is_FOO booleans for convenience in writing OS-based | 72 # We set these various is_FOO booleans for convenience in writing OS-based |
84 # conditions. | 73 # conditions. |
85 # | 74 # |
86 # - is_android, is_chromeos, is_ios, and is_win should be obvious. | 75 # - is_android, is_chromeos, is_ios, and is_win should be obvious. |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 native_compiler_configs += [ "//build/config/mac:sdk", ] | 347 native_compiler_configs += [ "//build/config/mac:sdk", ] |
359 } else if (is_ios) { | 348 } else if (is_ios) { |
360 native_compiler_configs += [ "//build/config/ios:sdk", ] | 349 native_compiler_configs += [ "//build/config/ios:sdk", ] |
361 } else if (is_android) { | 350 } else if (is_android) { |
362 native_compiler_configs += [ "//build/config/android:sdk", ] | 351 native_compiler_configs += [ "//build/config/android:sdk", ] |
363 } | 352 } |
364 if (!is_win) { | 353 if (!is_win) { |
365 native_compiler_configs += [ "//build/config/gcc:symbol_visibility_hidden" ] | 354 native_compiler_configs += [ "//build/config/gcc:symbol_visibility_hidden" ] |
366 } | 355 } |
367 if (is_clang) { | 356 if (is_clang) { |
368 native_compiler_configs += [ "//build/config/clang:find_bad_constructs" ] | 357 native_compiler_configs += [ |
| 358 "//build/config/clang:find_bad_constructs", |
| 359 "//build/config/clang:extra_warnings", |
| 360 ] |
369 } | 361 } |
370 | 362 |
371 # Optimizations and debug checking. | 363 # Optimizations and debug checking. |
372 if (is_debug) { | 364 if (is_debug) { |
373 native_compiler_configs += [ "//build/config:debug" ] | 365 native_compiler_configs += [ "//build/config:debug" ] |
374 default_optimization_config = "//build/config/compiler:no_optimize" | 366 default_optimization_config = "//build/config/compiler:no_optimize" |
375 } else { | 367 } else { |
376 native_compiler_configs += [ "//build/config:release" ] | 368 native_compiler_configs += [ "//build/config:release" ] |
377 default_optimization_config = "//build/config/compiler:optimize" | 369 default_optimization_config = "//build/config/compiler:optimize" |
378 } | 370 } |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 } else if (is_linux) { | 470 } else if (is_linux) { |
479 host_toolchain = "//build/toolchain/linux:$build_cpu_arch" | 471 host_toolchain = "//build/toolchain/linux:$build_cpu_arch" |
480 set_default_toolchain("//build/toolchain/linux:$cpu_arch") | 472 set_default_toolchain("//build/toolchain/linux:$cpu_arch") |
481 } else if (is_mac) { | 473 } else if (is_mac) { |
482 host_toolchain = "//build/toolchain/mac:clang" | 474 host_toolchain = "//build/toolchain/mac:clang" |
483 set_default_toolchain(host_toolchain) | 475 set_default_toolchain(host_toolchain) |
484 } else if (is_ios) { | 476 } else if (is_ios) { |
485 host_toolchain = "//build/toolchain/mac:host_clang" | 477 host_toolchain = "//build/toolchain/mac:host_clang" |
486 set_default_toolchain("//build/toolchain/mac:clang") | 478 set_default_toolchain("//build/toolchain/mac:clang") |
487 } | 479 } |
OLD | NEW |