| 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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 "//build/config/compiler:chromium_code", | 321 "//build/config/compiler:chromium_code", |
| 322 "//build/config/compiler:default_warnings", | 322 "//build/config/compiler:default_warnings", |
| 323 "//build/config/compiler:no_rtti", | 323 "//build/config/compiler:no_rtti", |
| 324 "//build/config/compiler:runtime_library", | 324 "//build/config/compiler:runtime_library", |
| 325 ] | 325 ] |
| 326 if (is_win) { | 326 if (is_win) { |
| 327 native_compiler_configs += [ | 327 native_compiler_configs += [ |
| 328 "//build/config/win:sdk", | 328 "//build/config/win:sdk", |
| 329 ] | 329 ] |
| 330 } else if (is_clang) { | 330 } else if (is_clang) { |
| 331 native_compiler_configs += "//build/config/clang:find_bad_constructs" | 331 native_compiler_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 332 } | 332 } |
| 333 | 333 |
| 334 # Optimizations and debug checking. | 334 # Optimizations and debug checking. |
| 335 if (is_debug) { | 335 if (is_debug) { |
| 336 native_compiler_configs += "//build/config:debug" | 336 native_compiler_configs += [ "//build/config:debug" ] |
| 337 default_optimization_config = "//build/config/compiler:no_optimize" | 337 default_optimization_config = "//build/config/compiler:no_optimize" |
| 338 } else { | 338 } else { |
| 339 native_compiler_configs += "//build/config:release" | 339 native_compiler_configs += [ "//build/config:release" ] |
| 340 default_optimization_config = "//build/config/compiler:optimize" | 340 default_optimization_config = "//build/config/compiler:optimize" |
| 341 } | 341 } |
| 342 native_compiler_configs += default_optimization_config | 342 native_compiler_configs += [ default_optimization_config ] |
| 343 | 343 |
| 344 # Symbol setup. | 344 # Symbol setup. |
| 345 if (is_clang && (is_linux || is_android)) { | 345 if (is_clang && (is_linux || is_android)) { |
| 346 # Clang creates chubby debug information, which makes linking very slow. | 346 # Clang creates chubby debug information, which makes linking very slow. |
| 347 # For now, don't create debug information with clang. | 347 # For now, don't create debug information with clang. |
| 348 # See http://crbug.com/70000 | 348 # See http://crbug.com/70000 |
| 349 # TODO(brettw) This just copies GYP. Why not do this on Mac as well? | 349 # TODO(brettw) This just copies GYP. Why not do this on Mac as well? |
| 350 default_symbols_config = "//build/config/compiler:no_symbols" | 350 default_symbols_config = "//build/config/compiler:no_symbols" |
| 351 } else if (symbol_level == 2) { | 351 } else if (symbol_level == 2) { |
| 352 default_symbols_config = "//build/config/compiler:symbols" | 352 default_symbols_config = "//build/config/compiler:symbols" |
| 353 } else if (symbol_level == 1) { | 353 } else if (symbol_level == 1) { |
| 354 default_symbols_config = "//build/config/compiler:minimal_symbols" | 354 default_symbols_config = "//build/config/compiler:minimal_symbols" |
| 355 } else if (symbol_level == 0) { | 355 } else if (symbol_level == 0) { |
| 356 default_symbols_config = "//build/config/compiler:no_symbols" | 356 default_symbols_config = "//build/config/compiler:no_symbols" |
| 357 } else { | 357 } else { |
| 358 assert(false, "Bad value for symbol_level.") | 358 assert(false, "Bad value for symbol_level.") |
| 359 } | 359 } |
| 360 native_compiler_configs += default_symbols_config | 360 native_compiler_configs += [ default_symbols_config ] |
| 361 | 361 |
| 362 # Windows linker setup for EXEs and DLLs. | 362 # Windows linker setup for EXEs and DLLs. |
| 363 if (is_win) { | 363 if (is_win) { |
| 364 if (is_debug) { | 364 if (is_debug) { |
| 365 default_incremental_linking_config = | 365 default_incremental_linking_config = |
| 366 "//build/config/win:incremental_linking" | 366 "//build/config/win:incremental_linking" |
| 367 } else { | 367 } else { |
| 368 default_incremental_linking_config = | 368 default_incremental_linking_config = |
| 369 "//build/config/win:no_incremental_linking" | 369 "//build/config/win:no_incremental_linking" |
| 370 } | 370 } |
| 371 windows_linker_configs = [ | 371 windows_linker_configs = [ |
| 372 default_incremental_linking_config, | 372 default_incremental_linking_config, |
| 373 "//build/config/win:sdk_link", | 373 "//build/config/win:sdk_link", |
| 374 "//build/config/win:common_linker_setup", | 374 "//build/config/win:common_linker_setup", |
| 375 # Default to console-mode apps. Most of our targets are tests and such | 375 # Default to console-mode apps. Most of our targets are tests and such |
| 376 # that shouldn't use the windows subsystem. | 376 # that shouldn't use the windows subsystem. |
| 377 "//build/config/win:console", | 377 "//build/config/win:console", |
| 378 ] | 378 ] |
| 379 } | 379 } |
| 380 | 380 |
| 381 set_defaults("executable") { | 381 set_defaults("executable") { |
| 382 configs = native_compiler_configs | 382 configs = native_compiler_configs |
| 383 if (is_win) { | 383 if (is_win) { |
| 384 configs += windows_linker_configs | 384 configs += windows_linker_configs |
| 385 } else if (is_mac) { | 385 } else if (is_mac) { |
| 386 configs += "//build/config/mac:mac_dynamic_flags" | 386 configs += [ "//build/config/mac:mac_dynamic_flags" ] |
| 387 } else if (is_linux) { | 387 } else if (is_linux) { |
| 388 configs += "//build/config/linux:executable_ldconfig" | 388 configs += [ "//build/config/linux:executable_ldconfig" ] |
| 389 } | 389 } |
| 390 } | 390 } |
| 391 | 391 |
| 392 set_defaults("static_library") { | 392 set_defaults("static_library") { |
| 393 configs = native_compiler_configs | 393 configs = native_compiler_configs |
| 394 } | 394 } |
| 395 | 395 |
| 396 set_defaults("shared_library") { | 396 set_defaults("shared_library") { |
| 397 configs = native_compiler_configs | 397 configs = native_compiler_configs |
| 398 if (is_win) { | 398 if (is_win) { |
| 399 configs += windows_linker_configs | 399 configs += windows_linker_configs |
| 400 } else if (is_mac) { | 400 } else if (is_mac) { |
| 401 configs += "//build/config/mac:mac_dynamic_flags" | 401 configs += [ "//build/config/mac:mac_dynamic_flags" ] |
| 402 } | 402 } |
| 403 } | 403 } |
| 404 | 404 |
| 405 set_defaults("source_set") { | 405 set_defaults("source_set") { |
| 406 configs = native_compiler_configs | 406 configs = native_compiler_configs |
| 407 } | 407 } |
| 408 | 408 |
| 409 # ============================================================================== | 409 # ============================================================================== |
| 410 # TOOLCHAIN SETUP | 410 # TOOLCHAIN SETUP |
| 411 # ============================================================================== | 411 # ============================================================================== |
| (...skipping 20 matching lines...) Expand all Loading... |
| 432 } else if (is_android) { | 432 } else if (is_android) { |
| 433 host_toolchain = "//build/toolchain/linux:$build_cpu_arch" | 433 host_toolchain = "//build/toolchain/linux:$build_cpu_arch" |
| 434 set_default_toolchain("//build/toolchain/android:$cpu_arch") | 434 set_default_toolchain("//build/toolchain/android:$cpu_arch") |
| 435 } else if (is_linux) { | 435 } else if (is_linux) { |
| 436 host_toolchain = "//build/toolchain/linux:$build_cpu_arch" | 436 host_toolchain = "//build/toolchain/linux:$build_cpu_arch" |
| 437 set_default_toolchain("//build/toolchain/linux:$cpu_arch") | 437 set_default_toolchain("//build/toolchain/linux:$cpu_arch") |
| 438 } else if (is_mac || is_ios) { | 438 } else if (is_mac || is_ios) { |
| 439 host_toolchain = "//build/toolchain/mac:clang" | 439 host_toolchain = "//build/toolchain/mac:clang" |
| 440 set_default_toolchain(host_toolchain) | 440 set_default_toolchain(host_toolchain) |
| 441 } | 441 } |
| OLD | NEW |