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 # WHAT IS THIS FILE? | 6 # WHAT IS THIS FILE? |
7 # ============================================================================= | 7 # ============================================================================= |
8 # | 8 # |
9 # This is the master GN build configuration. This file is loaded after the | 9 # This is the master GN build configuration. This file is loaded after the |
10 # build args (args.gn) for the build directory and after the toplevel ".gn" | 10 # build args (args.gn) for the build directory and after the toplevel ".gn" |
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 | 561 |
562 # Shared library and loadable module defaults (also for components in component | 562 # Shared library and loadable module defaults (also for components in component |
563 # mode). | 563 # mode). |
564 default_shared_library_configs = default_compiler_configs + [ | 564 default_shared_library_configs = default_compiler_configs + [ |
565 "//build/config:default_libs", | 565 "//build/config:default_libs", |
566 "//build/config:shared_library_config", | 566 "//build/config:shared_library_config", |
567 ] + _linker_configs | 567 ] + _linker_configs |
568 if (is_android) { | 568 if (is_android) { |
569 # Strip native JNI exports from shared libraries by default. Binaries that | 569 # Strip native JNI exports from shared libraries by default. Binaries that |
570 # want this can remove this config. | 570 # want this can remove this config. |
571 default_shared_library_configs += [ | 571 default_shared_library_configs += |
572 "//build/config/android:hide_native_jni_exports", | 572 [ "//build/config/android:hide_all_but_jni_onload" ] |
573 "//build/config/android:hide_all_but_jni_onload", | |
574 ] | |
575 } | 573 } |
576 set_defaults("shared_library") { | 574 set_defaults("shared_library") { |
577 configs = default_shared_library_configs | 575 configs = default_shared_library_configs |
578 } | 576 } |
579 set_defaults("loadable_module") { | 577 set_defaults("loadable_module") { |
580 configs = default_shared_library_configs | 578 configs = default_shared_library_configs |
| 579 |
| 580 # loadable_modules are generally used by other libs, not just via JNI. |
| 581 if (is_android) { |
| 582 configs -= [ "//build/config/android:hide_all_but_jni_onload" ] |
| 583 } |
581 } | 584 } |
582 | 585 |
583 # ============================================================================== | 586 # ============================================================================== |
584 # COMPONENT SETUP | 587 # COMPONENT SETUP |
585 # ============================================================================== | 588 # ============================================================================== |
586 | 589 |
587 # Defines a component, which equates to a shared_library when | 590 # Defines a component, which equates to a shared_library when |
588 # is_component_build == true and a static_library otherwise. | 591 # is_component_build == true and a static_library otherwise. |
589 # | 592 # |
590 # Use static libraries for the static build rather than source sets because | 593 # Use static libraries for the static build rather than source sets because |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 } | 645 } |
643 deps += [ "//build/config/sanitizers:deps" ] | 646 deps += [ "//build/config/sanitizers:deps" ] |
644 } | 647 } |
645 } | 648 } |
646 | 649 |
647 # Component defaults | 650 # Component defaults |
648 set_defaults("component") { | 651 set_defaults("component") { |
649 if (is_component_build) { | 652 if (is_component_build) { |
650 configs = default_shared_library_configs | 653 configs = default_shared_library_configs |
651 if (is_android) { | 654 if (is_android) { |
652 configs -= [ | 655 configs -= [ "//build/config/android:hide_all_but_jni_onload" ] |
653 "//build/config/android:hide_native_jni_exports", | |
654 "//build/config/android:hide_all_but_jni_onload", | |
655 ] | |
656 } | 656 } |
657 } else { | 657 } else { |
658 configs = default_compiler_configs | 658 configs = default_compiler_configs |
659 } | 659 } |
660 } | 660 } |
OLD | NEW |