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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 if (is_debug) { | 353 if (is_debug) { |
354 _native_compiler_configs += [ "//build/config:debug" ] | 354 _native_compiler_configs += [ "//build/config:debug" ] |
355 _default_optimization_config = "//build/config/compiler:no_optimize" | 355 _default_optimization_config = "//build/config/compiler:no_optimize" |
356 } else { | 356 } else { |
357 _native_compiler_configs += [ "//build/config:release" ] | 357 _native_compiler_configs += [ "//build/config:release" ] |
358 _default_optimization_config = "//build/config/compiler:optimize" | 358 _default_optimization_config = "//build/config/compiler:optimize" |
359 } | 359 } |
360 _native_compiler_configs += [ _default_optimization_config ] | 360 _native_compiler_configs += [ _default_optimization_config ] |
361 | 361 |
362 # Symbol setup. | 362 # Symbol setup. |
363 if (is_clang && (is_linux || is_android)) { | 363 if (symbol_level == 2) { |
364 # Clang creates chubby debug information, which makes linking very slow. | |
365 # For now, don't create debug information with clang. | |
366 # See http://crbug.com/70000 | |
367 # TODO(brettw) This just copies GYP. Why not do this on Mac as well? | |
368 _default_symbols_config = "//build/config/compiler:no_symbols" | |
369 } else if (symbol_level == 2) { | |
370 _default_symbols_config = "//build/config/compiler:symbols" | 364 _default_symbols_config = "//build/config/compiler:symbols" |
371 } else if (symbol_level == 1) { | 365 } else if (symbol_level == 1) { |
372 _default_symbols_config = "//build/config/compiler:minimal_symbols" | 366 _default_symbols_config = "//build/config/compiler:minimal_symbols" |
373 } else if (symbol_level == 0) { | 367 } else if (symbol_level == 0) { |
374 _default_symbols_config = "//build/config/compiler:no_symbols" | 368 _default_symbols_config = "//build/config/compiler:no_symbols" |
375 } else { | 369 } else { |
376 assert(false, "Bad value for symbol_level.") | 370 assert(false, "Bad value for symbol_level.") |
377 } | 371 } |
378 _native_compiler_configs += [ _default_symbols_config ] | 372 _native_compiler_configs += [ _default_symbols_config ] |
379 | 373 |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 host_toolchain = "//build/toolchain/linux:$build_cpu_arch" | 463 host_toolchain = "//build/toolchain/linux:$build_cpu_arch" |
470 set_default_toolchain("//build/toolchain/linux:$cpu_arch") | 464 set_default_toolchain("//build/toolchain/linux:$cpu_arch") |
471 } | 465 } |
472 } else if (is_mac) { | 466 } else if (is_mac) { |
473 host_toolchain = "//build/toolchain/mac:clang" | 467 host_toolchain = "//build/toolchain/mac:clang" |
474 set_default_toolchain(host_toolchain) | 468 set_default_toolchain(host_toolchain) |
475 } else if (is_ios) { | 469 } else if (is_ios) { |
476 host_toolchain = "//build/toolchain/mac:host_clang" | 470 host_toolchain = "//build/toolchain/mac:host_clang" |
477 set_default_toolchain("//build/toolchain/mac:clang") | 471 set_default_toolchain("//build/toolchain/mac:clang") |
478 } | 472 } |
OLD | NEW |