Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Side by Side Diff: build/config/BUILDCONFIG.gn

Issue 2031903002: Update GN files w/ changes needed to make sanitizers work. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rework to add comments, drop the symbolized config Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 # PLATFORM SELECTION 6 # PLATFORM SELECTION
7 # ============================================================================= 7 # =============================================================================
8 # 8 #
9 # There are two main things to set: "os" and "cpu". The "toolchain" is the name 9 # There are two main things to set: "os" and "cpu". The "toolchain" is the name
10 # of the GN thing that encodes combinations of these things. 10 # of the GN thing that encodes combinations of these things.
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 _windows_linker_configs = [ 504 _windows_linker_configs = [
505 "//build/config/win:default_incremental_linking", 505 "//build/config/win:default_incremental_linking",
506 506
507 # Default to console-mode apps. Most of our targets are tests and such 507 # Default to console-mode apps. Most of our targets are tests and such
508 # that shouldn't use the windows subsystem. 508 # that shouldn't use the windows subsystem.
509 "//build/config/win:console", 509 "//build/config/win:console",
510 ] 510 ]
511 } 511 }
512 512
513 # Executable defaults. 513 # Executable defaults.
514 _executable_configs = _native_compiler_configs + [ 514 _executable_configs =
515 "//build/config:default_libs", 515 _native_compiler_configs + [
516 "//build/config:executable_config", 516 "//build/config:default_libs",
517 ] 517 "//build/config:executable_config",
518
519 # If we're using the prebuilt instrumented libraries with the
520 # sanitizers, we need to add ldflags to every binary to make sure
521 # they are picked up. We can't check for using_sanitizer in BUILDCONFIG,
522 # so we add the config unconditionally and have it be empty when not
523 # using the libraries.
524 "//third_party/instrumented_libraries:prebuilt_instrumented_libraries_ldfl ags",
525 ]
518 if (is_win) { 526 if (is_win) {
519 _executable_configs += _windows_linker_configs 527 _executable_configs += _windows_linker_configs
520 } 528 }
529
521 set_defaults("executable") { 530 set_defaults("executable") {
522 configs = _executable_configs 531 configs = _executable_configs
523 } 532 }
524 533
525 # Static library defaults. 534 # Static library defaults.
526 set_defaults("static_library") { 535 set_defaults("static_library") {
527 configs = _native_compiler_configs 536 configs = _native_compiler_configs
528 } 537 }
529 538
530 # Shared library and loadable module defaults (also for components in component 539 # Shared library and loadable module defaults (also for components in component
531 # mode). 540 # mode).
532 _shared_library_configs = _native_compiler_configs + [ 541 _shared_library_configs =
533 "//build/config:default_libs", 542 _native_compiler_configs + [
534 "//build/config:shared_library_config", 543 "//build/config:default_libs",
535 ] 544 "//build/config:shared_library_config",
545 "//third_party/instrumented_libraries:prebuilt_link_helper",
546 ]
536 if (is_win) { 547 if (is_win) {
537 _shared_library_configs += _windows_linker_configs 548 _shared_library_configs += _windows_linker_configs
538 } else if (is_android) { 549 } else if (is_android) {
539 # Strip native JNI exports from shared libraries by default. Binaries that 550 # Strip native JNI exports from shared libraries by default. Binaries that
540 # want this can remove this config. 551 # want this can remove this config.
541 _shared_library_configs += 552 _shared_library_configs +=
542 [ "//build/config/android:hide_native_jni_exports" ] 553 [ "//build/config/android:hide_native_jni_exports" ]
543 } 554 }
544 set_defaults("shared_library") { 555 set_defaults("shared_library") {
545 configs = _shared_library_configs 556 configs = _shared_library_configs
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 forward_variables_from(invoker, "*", [ "visibility" ]) 631 forward_variables_from(invoker, "*", [ "visibility" ])
621 632
622 # All shared libraries must have the sanitizer deps to properly link in 633 # All shared libraries must have the sanitizer deps to properly link in
623 # asan mode (this target will be empty in other cases). 634 # asan mode (this target will be empty in other cases).
624 if (!defined(deps)) { 635 if (!defined(deps)) {
625 deps = [] 636 deps = []
626 } 637 }
627 deps += [ "//build/config/sanitizers:deps" ] 638 deps += [ "//build/config/sanitizers:deps" ]
628 } 639 }
629 } 640 }
OLDNEW
« build/common.gypi ('K') | « build/common.gypi ('k') | build/config/sanitizers/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698