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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 # Selects the desired build flavor. Official builds get additional | 59 # Selects the desired build flavor. Official builds get additional |
60 # processing to prepare for release. Normally you will want to develop and | 60 # processing to prepare for release. Normally you will want to develop and |
61 # test with this flag off. | 61 # test with this flag off. |
62 is_official_build = false | 62 is_official_build = false |
63 | 63 |
64 # Select the desired branding flavor. False means normal Chromium branding, | 64 # Select the desired branding flavor. False means normal Chromium branding, |
65 # true means official Google Chrome branding (requires extra Google-internal | 65 # true means official Google Chrome branding (requires extra Google-internal |
66 # resources). | 66 # resources). |
67 is_chrome_branded = false | 67 is_chrome_branded = false |
| 68 |
| 69 # Compile for Address Sanitizer to find memory bugs. |
| 70 is_asan = false |
| 71 |
| 72 # Compile for Leak Sanitizer to find leaks. |
| 73 is_lsan = false |
| 74 |
| 75 # Compile for Memory Sanitizer to find uninitialized reads. |
| 76 is_msan = false |
| 77 |
| 78 # Compile for Thread Sanitizer to find threading bugs. |
| 79 is_tsan = false |
68 } | 80 } |
69 | 81 |
70 # ============================================================================= | 82 # ============================================================================= |
71 # OS DEFINITIONS | 83 # OS DEFINITIONS |
72 # ============================================================================= | 84 # ============================================================================= |
73 # | 85 # |
74 # We set these various is_FOO booleans for convenience in writing OS-based | 86 # We set these various is_FOO booleans for convenience in writing OS-based |
75 # conditions. | 87 # conditions. |
76 # | 88 # |
77 # - is_android, is_chromeos, is_ios, and is_win should be obvious. | 89 # - is_android, is_chromeos, is_ios, and is_win should be obvious. |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 # ============================================================================= | 285 # ============================================================================= |
274 # BUILD OPTIONS | 286 # BUILD OPTIONS |
275 # ============================================================================= | 287 # ============================================================================= |
276 | 288 |
277 if (is_component_build) { | 289 if (is_component_build) { |
278 component_mode = "shared_library" | 290 component_mode = "shared_library" |
279 } else { | 291 } else { |
280 component_mode = "static_library" | 292 component_mode = "static_library" |
281 } | 293 } |
282 | 294 |
| 295 # These Sanitizers all imply using the Clang compiler. On Windows they either |
| 296 # don't work or work differently. |
| 297 if (!is_clang && (is_asan || is_lsan || is_tsan || is_msan)) { |
| 298 is_clang = true |
| 299 } |
| 300 |
283 toolkit_uses_gtk = is_linux | 301 toolkit_uses_gtk = is_linux |
284 | 302 |
285 # ============================================================================= | 303 # ============================================================================= |
286 # TARGET DEFAULTS | 304 # TARGET DEFAULTS |
287 # ============================================================================= | 305 # ============================================================================= |
288 # | 306 # |
289 # Set up the default configuration for every build target of the given type. | 307 # Set up the default configuration for every build target of the given type. |
290 # The values configured here will be automatically set on the scope of the | 308 # The values configured here will be automatically set on the scope of the |
291 # corresponding target. Target definitions can add or remove to the settings | 309 # corresponding target. Target definitions can add or remove to the settings |
292 # here as needed. | 310 # here as needed. |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 host_toolchain = "//build/toolchain/linux:64" | 433 host_toolchain = "//build/toolchain/linux:64" |
416 } | 434 } |
417 | 435 |
418 if (build_cpu_arch == "arm") { | 436 if (build_cpu_arch == "arm") { |
419 set_default_toolchain("//build/toolchain/linux:arm") | 437 set_default_toolchain("//build/toolchain/linux:arm") |
420 } else if (build_cpu_arch == "x86") { | 438 } else if (build_cpu_arch == "x86") { |
421 set_default_toolchain("//build/toolchain/linux:32") | 439 set_default_toolchain("//build/toolchain/linux:32") |
422 } else if (build_cpu_arch == "x64") { | 440 } else if (build_cpu_arch == "x64") { |
423 set_default_toolchain("//build/toolchain/linux:64") | 441 set_default_toolchain("//build/toolchain/linux:64") |
424 } | 442 } |
425 } else if (is_mac) { | 443 } else if (is_mac || is_ios) { |
426 host_toolchain = "//build/toolchain/mac:clang" | 444 host_toolchain = "//build/toolchain/mac:clang" |
427 set_default_toolchain(host_toolchain) | 445 set_default_toolchain(host_toolchain) |
428 } | 446 } |
OLD | NEW |