Chromium Code Reviews| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 73 is_lsan = false | 73 is_lsan = false |
| 74 | 74 |
| 75 # Compile for Memory Sanitizer to find uninitialized reads. | 75 # Compile for Memory Sanitizer to find uninitialized reads. |
| 76 is_msan = false | 76 is_msan = false |
| 77 | 77 |
| 78 # Compile for Thread Sanitizer to find threading bugs. | 78 # Compile for Thread Sanitizer to find threading bugs. |
| 79 is_tsan = false | 79 is_tsan = false |
| 80 | 80 |
| 81 # When running in gyp-generating mode, this is the root of the build tree. | 81 # When running in gyp-generating mode, this is the root of the build tree. |
| 82 gyp_output_dir = "out" | 82 gyp_output_dir = "out" |
| 83 | |
| 84 # When running in gyp-generating mode, this flag indicates if the current GYP | |
| 85 # generator is xcode.On Mac, you can assume if this is false that the | |
|
Nico
2014/01/29 18:34:19
Nit: missing space after '.', and I'd probably jus
| |
| 86 # generator is Ninja. | |
| 87 is_gyp_xcode_generator = false | |
| 83 } | 88 } |
| 84 | 89 |
| 85 # ============================================================================= | 90 # ============================================================================= |
| 86 # OS DEFINITIONS | 91 # OS DEFINITIONS |
| 87 # ============================================================================= | 92 # ============================================================================= |
| 88 # | 93 # |
| 89 # We set these various is_FOO booleans for convenience in writing OS-based | 94 # We set these various is_FOO booleans for convenience in writing OS-based |
| 90 # conditions. | 95 # conditions. |
| 91 # | 96 # |
| 92 # - is_android, is_chromeos, is_ios, and is_win should be obvious. | 97 # - is_android, is_chromeos, is_ios, and is_win should be obvious. |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 154 is_win = false | 159 is_win = false |
| 155 } else if (os == "ios") { | 160 } else if (os == "ios") { |
| 156 is_android = false | 161 is_android = false |
| 157 is_chromeos = false | 162 is_chromeos = false |
| 158 is_ios = true | 163 is_ios = true |
| 159 is_linux = false | 164 is_linux = false |
| 160 is_mac = false | 165 is_mac = false |
| 161 is_nacl = false | 166 is_nacl = false |
| 162 is_posix = true | 167 is_posix = true |
| 163 is_win = false | 168 is_win = false |
| 164 if (!is_clang) { | 169 if (!is_gyp_xcode_generator) { |
| 165 # Always use clang on iOS when using ninja | 170 # Always use clang on iOS when using ninja |
| 166 # (which is always true when using GN). | |
| 167 is_clang = true | 171 is_clang = true |
| 168 } | 172 } |
| 169 } else if (os == "linux") { | 173 } else if (os == "linux") { |
| 170 is_android = false | 174 is_android = false |
| 171 is_chromeos = false | 175 is_chromeos = false |
| 172 is_ios = false | 176 is_ios = false |
| 173 is_linux = true | 177 is_linux = true |
| 174 is_mac = false | 178 is_mac = false |
| 175 is_nacl = false | 179 is_nacl = false |
| 176 is_posix = true | 180 is_posix = true |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 325 native_compiler_configs = [ | 329 native_compiler_configs = [ |
| 326 "//build/config:my_msvs", # TODO(brettw) eraseme | 330 "//build/config:my_msvs", # TODO(brettw) eraseme |
| 327 | 331 |
| 328 "//build/config/compiler:compiler", | 332 "//build/config/compiler:compiler", |
| 329 "//build/config/compiler:chromium_code", | 333 "//build/config/compiler:chromium_code", |
| 330 "//build/config/compiler:default_warnings", | 334 "//build/config/compiler:default_warnings", |
| 331 "//build/config/compiler:no_rtti", | 335 "//build/config/compiler:no_rtti", |
| 332 "//build/config/compiler:runtime_library", | 336 "//build/config/compiler:runtime_library", |
| 333 ] | 337 ] |
| 334 if (is_win) { | 338 if (is_win) { |
| 335 native_compiler_configs += [ | 339 native_compiler_configs += [ "//build/config/win:sdk", ] |
| 336 "//build/config/win:sdk", | 340 } else if (is_mac) { |
| 337 ] | 341 native_compiler_configs += [ "//build/config/mac:sdk", ] |
| 338 } else if (is_clang) { | 342 } else if (is_ios) { |
| 343 native_compiler_configs += [ "//build/config/ios:sdk", ] | |
| 344 } | |
| 345 if (is_clang) { | |
| 339 native_compiler_configs += [ "//build/config/clang:find_bad_constructs" ] | 346 native_compiler_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 340 } | 347 } |
| 341 | 348 |
| 342 # Optimizations and debug checking. | 349 # Optimizations and debug checking. |
| 343 if (is_debug) { | 350 if (is_debug) { |
| 344 native_compiler_configs += [ "//build/config:debug" ] | 351 native_compiler_configs += [ "//build/config:debug" ] |
| 345 default_optimization_config = "//build/config/compiler:no_optimize" | 352 default_optimization_config = "//build/config/compiler:no_optimize" |
| 346 } else { | 353 } else { |
| 347 native_compiler_configs += [ "//build/config:release" ] | 354 native_compiler_configs += [ "//build/config:release" ] |
| 348 default_optimization_config = "//build/config/compiler:optimize" | 355 default_optimization_config = "//build/config/compiler:optimize" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 440 } else if (is_android) { | 447 } else if (is_android) { |
| 441 host_toolchain = "//build/toolchain/linux:$build_cpu_arch" | 448 host_toolchain = "//build/toolchain/linux:$build_cpu_arch" |
| 442 set_default_toolchain("//build/toolchain/android:$cpu_arch") | 449 set_default_toolchain("//build/toolchain/android:$cpu_arch") |
| 443 } else if (is_linux) { | 450 } else if (is_linux) { |
| 444 host_toolchain = "//build/toolchain/linux:$build_cpu_arch" | 451 host_toolchain = "//build/toolchain/linux:$build_cpu_arch" |
| 445 set_default_toolchain("//build/toolchain/linux:$cpu_arch") | 452 set_default_toolchain("//build/toolchain/linux:$cpu_arch") |
| 446 } else if (is_mac || is_ios) { | 453 } else if (is_mac || is_ios) { |
| 447 host_toolchain = "//build/toolchain/mac:clang" | 454 host_toolchain = "//build/toolchain/mac:clang" |
| 448 set_default_toolchain(host_toolchain) | 455 set_default_toolchain(host_toolchain) |
| 449 } | 456 } |
| OLD | NEW |