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. Can only be true when building for iOS). |
| 86 is_gyp_xcode_generator = false |
83 } | 87 } |
84 | 88 |
85 # ============================================================================= | 89 # ============================================================================= |
86 # OS DEFINITIONS | 90 # OS DEFINITIONS |
87 # ============================================================================= | 91 # ============================================================================= |
88 # | 92 # |
89 # We set these various is_FOO booleans for convenience in writing OS-based | 93 # We set these various is_FOO booleans for convenience in writing OS-based |
90 # conditions. | 94 # conditions. |
91 # | 95 # |
92 # - is_android, is_chromeos, is_ios, and is_win should be obvious. | 96 # - 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 | 158 is_win = false |
155 } else if (os == "ios") { | 159 } else if (os == "ios") { |
156 is_android = false | 160 is_android = false |
157 is_chromeos = false | 161 is_chromeos = false |
158 is_ios = true | 162 is_ios = true |
159 is_linux = false | 163 is_linux = false |
160 is_mac = false | 164 is_mac = false |
161 is_nacl = false | 165 is_nacl = false |
162 is_posix = true | 166 is_posix = true |
163 is_win = false | 167 is_win = false |
164 if (!is_clang) { | 168 if (!is_gyp_xcode_generator) { |
165 # Always use clang on iOS when using ninja | 169 # Always use clang on iOS when using ninja |
166 # (which is always true when using GN). | |
167 is_clang = true | 170 is_clang = true |
168 } | 171 } |
169 } else if (os == "linux") { | 172 } else if (os == "linux") { |
170 is_android = false | 173 is_android = false |
171 is_chromeos = false | 174 is_chromeos = false |
172 is_ios = false | 175 is_ios = false |
173 is_linux = true | 176 is_linux = true |
174 is_mac = false | 177 is_mac = false |
175 is_nacl = false | 178 is_nacl = false |
176 is_posix = true | 179 is_posix = true |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 native_compiler_configs = [ | 328 native_compiler_configs = [ |
326 "//build/config:my_msvs", # TODO(brettw) eraseme | 329 "//build/config:my_msvs", # TODO(brettw) eraseme |
327 | 330 |
328 "//build/config/compiler:compiler", | 331 "//build/config/compiler:compiler", |
329 "//build/config/compiler:chromium_code", | 332 "//build/config/compiler:chromium_code", |
330 "//build/config/compiler:default_warnings", | 333 "//build/config/compiler:default_warnings", |
331 "//build/config/compiler:no_rtti", | 334 "//build/config/compiler:no_rtti", |
332 "//build/config/compiler:runtime_library", | 335 "//build/config/compiler:runtime_library", |
333 ] | 336 ] |
334 if (is_win) { | 337 if (is_win) { |
335 native_compiler_configs += [ | 338 native_compiler_configs += [ "//build/config/win:sdk", ] |
336 "//build/config/win:sdk", | 339 } else if (is_mac) { |
337 ] | 340 native_compiler_configs += [ "//build/config/mac:sdk", ] |
338 } else if (is_clang) { | 341 } else if (is_ios) { |
| 342 native_compiler_configs += [ "//build/config/ios:sdk", ] |
| 343 } |
| 344 if (is_clang) { |
339 native_compiler_configs += [ "//build/config/clang:find_bad_constructs" ] | 345 native_compiler_configs += [ "//build/config/clang:find_bad_constructs" ] |
340 } | 346 } |
341 | 347 |
342 # Optimizations and debug checking. | 348 # Optimizations and debug checking. |
343 if (is_debug) { | 349 if (is_debug) { |
344 native_compiler_configs += [ "//build/config:debug" ] | 350 native_compiler_configs += [ "//build/config:debug" ] |
345 default_optimization_config = "//build/config/compiler:no_optimize" | 351 default_optimization_config = "//build/config/compiler:no_optimize" |
346 } else { | 352 } else { |
347 native_compiler_configs += [ "//build/config:release" ] | 353 native_compiler_configs += [ "//build/config:release" ] |
348 default_optimization_config = "//build/config/compiler:optimize" | 354 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) { | 446 } else if (is_android) { |
441 host_toolchain = "//build/toolchain/linux:$build_cpu_arch" | 447 host_toolchain = "//build/toolchain/linux:$build_cpu_arch" |
442 set_default_toolchain("//build/toolchain/android:$cpu_arch") | 448 set_default_toolchain("//build/toolchain/android:$cpu_arch") |
443 } else if (is_linux) { | 449 } else if (is_linux) { |
444 host_toolchain = "//build/toolchain/linux:$build_cpu_arch" | 450 host_toolchain = "//build/toolchain/linux:$build_cpu_arch" |
445 set_default_toolchain("//build/toolchain/linux:$cpu_arch") | 451 set_default_toolchain("//build/toolchain/linux:$cpu_arch") |
446 } else if (is_mac || is_ios) { | 452 } else if (is_mac || is_ios) { |
447 host_toolchain = "//build/toolchain/mac:clang" | 453 host_toolchain = "//build/toolchain/mac:clang" |
448 set_default_toolchain(host_toolchain) | 454 set_default_toolchain(host_toolchain) |
449 } | 455 } |
OLD | NEW |