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 import("//build/config/allocator.gni") | 5 import("//build/config/allocator.gni") |
6 import("//build/config/chrome_build.gni") | 6 import("//build/config/chrome_build.gni") |
7 import("//build/config/chromecast_build.gni") | 7 import("//build/config/chromecast_build.gni") |
8 import("//build/config/crypto.gni") | 8 import("//build/config/crypto.gni") |
9 import("//build/config/dcheck_always_on.gni") | 9 import("//build/config/dcheck_always_on.gni") |
10 import("//build/config/features.gni") | 10 import("//build/config/features.gni") |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 } | 401 } |
402 | 402 |
403 # If we're using the prebuilt instrumented libraries with the sanitizers, we | 403 # If we're using the prebuilt instrumented libraries with the sanitizers, we |
404 # need to add ldflags to every binary to make sure they are picked up. | 404 # need to add ldflags to every binary to make sure they are picked up. |
405 if (prebuilt_instrumented_libraries_available) { | 405 if (prebuilt_instrumented_libraries_available) { |
406 configs += [ "//third_party/instrumented_libraries:prebuilt_ldflags" ] | 406 configs += [ "//third_party/instrumented_libraries:prebuilt_ldflags" ] |
407 } | 407 } |
408 if (use_locally_built_instrumented_libraries) { | 408 if (use_locally_built_instrumented_libraries) { |
409 configs += [ "//third_party/instrumented_libraries:locally_built_ldflags" ] | 409 configs += [ "//third_party/instrumented_libraries:locally_built_ldflags" ] |
410 } | 410 } |
| 411 configs += [ "//build/config/sanitizers:link_executable" ] |
411 } | 412 } |
412 | 413 |
413 # Shared library configs ------------------------------------------------------- | 414 # Shared library configs ------------------------------------------------------- |
414 | 415 |
415 # This config defines the configs applied to all shared libraries. | 416 # This config defines the configs applied to all shared libraries. |
416 config("shared_library_config") { | 417 config("shared_library_config") { |
417 configs = [] | 418 configs = [] |
418 | 419 |
419 if (is_win) { | 420 if (is_win) { |
420 configs += _windows_linker_configs | 421 configs += _windows_linker_configs |
421 } else if (is_mac) { | 422 } else if (is_mac) { |
422 configs += [ "//build/config/mac:mac_dynamic_flags" ] | 423 configs += [ "//build/config/mac:mac_dynamic_flags" ] |
423 } else if (is_ios) { | 424 } else if (is_ios) { |
424 configs += [ "//build/config/ios:ios_dynamic_flags" ] | 425 configs += [ "//build/config/ios:ios_dynamic_flags" ] |
425 } else if (is_chromecast) { | 426 } else if (is_chromecast) { |
426 configs += [ "//build/config/chromecast:shared_library_config" ] | 427 configs += [ "//build/config/chromecast:shared_library_config" ] |
427 } | 428 } |
428 | 429 |
429 # If we're using the prebuilt instrumented libraries with the sanitizers, we | 430 # If we're using the prebuilt instrumented libraries with the sanitizers, we |
430 # need to add ldflags to every binary to make sure they are picked up. | 431 # need to add ldflags to every binary to make sure they are picked up. |
431 if (prebuilt_instrumented_libraries_available) { | 432 if (prebuilt_instrumented_libraries_available) { |
432 configs += [ "//third_party/instrumented_libraries:prebuilt_ldflags" ] | 433 configs += [ "//third_party/instrumented_libraries:prebuilt_ldflags" ] |
433 } | 434 } |
434 if (use_locally_built_instrumented_libraries) { | 435 if (use_locally_built_instrumented_libraries) { |
435 configs += [ "//third_party/instrumented_libraries:locally_built_ldflags" ] | 436 configs += [ "//third_party/instrumented_libraries:locally_built_ldflags" ] |
436 } | 437 } |
| 438 configs += [ "//build/config/sanitizers:link_shared_library" ] |
437 } | 439 } |
438 | 440 |
439 # Add this config to your target to enable precompiled headers. | 441 # Add this config to your target to enable precompiled headers. |
440 # | 442 # |
441 # Precompiled headers are done on a per-target basis. If you have just a couple | 443 # Precompiled headers are done on a per-target basis. If you have just a couple |
442 # of files, the time it takes to precompile (~2 seconds) can actually be longer | 444 # of files, the time it takes to precompile (~2 seconds) can actually be longer |
443 # than the time saved. On a Z620, a 100 file target compiles about 2 seconds | 445 # than the time saved. On a Z620, a 100 file target compiles about 2 seconds |
444 # faster with precompiled headers, with greater savings for larger targets. | 446 # faster with precompiled headers, with greater savings for larger targets. |
445 # | 447 # |
446 # Recommend precompiled headers for targets with more than 50 .cc files. | 448 # Recommend precompiled headers for targets with more than 50 .cc files. |
(...skipping 22 matching lines...) Expand all Loading... |
469 # file doesn't exist, no error will be generated (probably MS tested this | 471 # file doesn't exist, no error will be generated (probably MS tested this |
470 # case but forgot the other one?). To reproduce this error, do a build, | 472 # case but forgot the other one?). To reproduce this error, do a build, |
471 # then delete the precompile.c.obj file, then build again. | 473 # then delete the precompile.c.obj file, then build again. |
472 cflags_c = [ "/wd4206" ] | 474 cflags_c = [ "/wd4206" ] |
473 } else if (is_mac) { | 475 } else if (is_mac) { |
474 precompiled_header = "build/precompile.h" | 476 precompiled_header = "build/precompile.h" |
475 precompiled_source = "//build/precompile.h" | 477 precompiled_source = "//build/precompile.h" |
476 } | 478 } |
477 } | 479 } |
478 } | 480 } |
OLD | NEW |