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

Side by Side Diff: build/common.gypi

Issue 843103003: android: Hide JNI exports by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use a blacklist instead of a whitelist Created 5 years, 10 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) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 # IMPORTANT: 5 # IMPORTANT:
6 # Please don't directly include this file if you are building via gyp_chromium, 6 # Please don't directly include this file if you are building via gyp_chromium,
7 # since gyp_chromium is automatically forcing its inclusion. 7 # since gyp_chromium is automatically forcing its inclusion.
8 { 8 {
9 # Variables expected to be overriden on the GYP command line (-D) or by 9 # Variables expected to be overriden on the GYP command line (-D) or by
10 # ~/.gyp/include.gypi. 10 # ~/.gyp/include.gypi.
(...skipping 1778 matching lines...) Expand 10 before | Expand all | Expand 10 after
1789 1789
1790 # Uses system APIs for decoding audio and video. 1790 # Uses system APIs for decoding audio and video.
1791 'use_libffmpeg%': '0', 1791 'use_libffmpeg%': '0',
1792 1792
1793 # TODO(torne): Remove this unsupported option once all the places that 1793 # TODO(torne): Remove this unsupported option once all the places that
1794 # test it have been updated. 1794 # test it have been updated.
1795 'use_system_stlport%': 0, 1795 'use_system_stlport%': 0,
1796 1796
1797 # Copy it out one scope. 1797 # Copy it out one scope.
1798 'android_webview_build%': '<(android_webview_build)', 1798 'android_webview_build%': '<(android_webview_build)',
1799
1800 # Default android linker script for shared library exports.
1801 'android_linker_script%': '<(SHARED_INTERMEDIATE_DIR)/android_exports.ls t',
1802 }], # OS=="android" 1799 }], # OS=="android"
1803 ['embedded==1', { 1800 ['embedded==1', {
1804 'use_system_fontconfig%': 0, 1801 'use_system_fontconfig%': 0,
1805 }, { 1802 }, {
1806 'use_system_fontconfig%': 1, 1803 'use_system_fontconfig%': 1,
1807 }], 1804 }],
1808 ['chromecast==1', { 1805 ['chromecast==1', {
1809 'enable_mpeg2ts_stream_parser%': 1, 1806 'enable_mpeg2ts_stream_parser%': 1,
1810 'ffmpeg_branding%': 'ChromeOS', 1807 'ffmpeg_branding%': 'ChromeOS',
1811 'ozone_platform_ozonex%': 1, 1808 'ozone_platform_ozonex%': 1,
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
2464 # pnacl uses the clang compiler so we need to suppress all the 2461 # pnacl uses the clang compiler so we need to suppress all the
2465 # same warnings as we do for clang. 2462 # same warnings as we do for clang.
2466 # TODO(sbc): Remove these if/when they are removed from the clang 2463 # TODO(sbc): Remove these if/when they are removed from the clang
2467 # build. 2464 # build.
2468 '-Wno-unused-function', 2465 '-Wno-unused-function',
2469 '-Wno-char-subscripts', 2466 '-Wno-char-subscripts',
2470 '-Wno-c++11-extensions', 2467 '-Wno-c++11-extensions',
2471 '-Wno-unnamed-type-template-args', 2468 '-Wno-unnamed-type-template-args',
2472 ], 2469 ],
2473 2470
2471 # By default, Android targets have their exported JNI symbols stripped,
2472 # so we test the manual JNI registration code paths that are required
2473 # when using the crazy linker. To allow use of native JNI exports (lazily
rmcilroy 2015/02/03 13:43:56 nit - maybe mention that binaries which set "use_c
2474 # resolved by the JVM), targets can enable this variable, which will stop
2475 # the stripping from happening. Only targets which do not need to be
2476 # compatible with the crazy linker are permitted to set this.
2477 'use_native_jni_exports%': 0,
2478
2474 'conditions': [ 2479 'conditions': [
2475 ['OS=="win" and component=="shared_library"', { 2480 ['OS=="win" and component=="shared_library"', {
2476 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx 2481 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
2477 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL) 2482 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL)
2478 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL) 2483 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL)
2479 }, { 2484 }, {
2480 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx 2485 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
2481 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static) 2486 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
2482 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static) 2487 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
2483 }], 2488 }],
(...skipping 2098 matching lines...) Expand 10 before | Expand all | Expand 10 after
4582 '_STLP_USE_PTR_SPECIALIZATIONS=1', 4587 '_STLP_USE_PTR_SPECIALIZATIONS=1',
4583 'CHROME_BUILD_ID="<(chrome_build_id)"', 4588 'CHROME_BUILD_ID="<(chrome_build_id)"',
4584 ], 4589 ],
4585 'ldflags!': [ 4590 'ldflags!': [
4586 '-pthread', # Not supported by Android toolchain. 4591 '-pthread', # Not supported by Android toolchain.
4587 ], 4592 ],
4588 'ldflags': [ 4593 'ldflags': [
4589 '-Wl,--no-undefined', 4594 '-Wl,--no-undefined',
4590 ], 4595 ],
4591 'conditions': [ 4596 'conditions': [
4592 ['component=="static_library"', { 4597 ['component=="static_library" and android_webview_build==0', {
4593 'ldflags': [ 4598 'ldflags': [
4594 '-Wl,--exclude-libs=ALL', 4599 '-Wl,--exclude-libs=ALL',
4595 ], 4600 ],
4601 'target_conditions': [
4602 ['use_native_jni_exports==0', {
4603 # Use a linker version script to strip JNI exports from
4604 # binaries which have not specifically asked to use them.
4605 'ldflags': [
4606 '-Wl,--version-script=<!(cd <(DEPTH) && pwd -P)/build/andr oid/android_no_jni_exports.lst',
4607 ],
4608 }],
4609 ],
4596 }], 4610 }],
4597 ['clang==1', { 4611 ['clang==1', {
4598 'cflags': [ 4612 'cflags': [
4599 # Work around incompatibilities between bionic and clang 4613 # Work around incompatibilities between bionic and clang
4600 # headers. 4614 # headers.
4601 '-D__compiler_offsetof=__builtin_offsetof', 4615 '-D__compiler_offsetof=__builtin_offsetof',
4602 '-Dnan=__builtin_nan', 4616 '-Dnan=__builtin_nan',
4603 ], 4617 ],
4604 'conditions': [ 4618 'conditions': [
4605 ['target_arch=="arm"', { 4619 ['target_arch=="arm"', {
(...skipping 1255 matching lines...) Expand 10 before | Expand all | Expand 10 after
5861 # settings in target dicts. SYMROOT is a special case, because many other 5875 # settings in target dicts. SYMROOT is a special case, because many other
5862 # Xcode variables depend on it, including variables such as 5876 # Xcode variables depend on it, including variables such as
5863 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 5877 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
5864 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 5878 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
5865 # files to appear (when present) in the UI as actual files and not red 5879 # files to appear (when present) in the UI as actual files and not red
5866 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 5880 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
5867 # and therefore SYMROOT, needs to be set at the project level. 5881 # and therefore SYMROOT, needs to be set at the project level.
5868 'SYMROOT': '<(DEPTH)/xcodebuild', 5882 'SYMROOT': '<(DEPTH)/xcodebuild',
5869 }, 5883 },
5870 } 5884 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698