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

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: Added gn support 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
« no previous file with comments | « build/android/android_webview_export_whitelist.lst ('k') | build/config/BUILDCONFIG.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1784 matching lines...) Expand 10 before | Expand all | Expand 10 after
1795 1795
1796 # Uses system APIs for decoding audio and video. 1796 # Uses system APIs for decoding audio and video.
1797 'use_libffmpeg%': '0', 1797 'use_libffmpeg%': '0',
1798 1798
1799 # TODO(torne): Remove this unsupported option once all the places that 1799 # TODO(torne): Remove this unsupported option once all the places that
1800 # test it have been updated. 1800 # test it have been updated.
1801 'use_system_stlport%': 0, 1801 'use_system_stlport%': 0,
1802 1802
1803 # Copy it out one scope. 1803 # Copy it out one scope.
1804 'android_webview_build%': '<(android_webview_build)', 1804 'android_webview_build%': '<(android_webview_build)',
1805
1806 # Default android linker script for shared library exports.
1807 'android_linker_script%': '<(SHARED_INTERMEDIATE_DIR)/android_exports.ls t',
1808 }], # OS=="android" 1805 }], # OS=="android"
1809 ['embedded==1', { 1806 ['embedded==1', {
1810 'use_system_fontconfig%': 0, 1807 'use_system_fontconfig%': 0,
1811 }, { 1808 }, {
1812 'use_system_fontconfig%': 1, 1809 'use_system_fontconfig%': 1,
1813 }], 1810 }],
1814 ['chromecast==1', { 1811 ['chromecast==1', {
1815 'enable_mpeg2ts_stream_parser%': 1, 1812 'enable_mpeg2ts_stream_parser%': 1,
1816 'ffmpeg_branding%': 'ChromeOS', 1813 'ffmpeg_branding%': 'ChromeOS',
1817 'ozone_platform_ozonex%': 1, 1814 'ozone_platform_ozonex%': 1,
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
2468 # pnacl uses the clang compiler so we need to suppress all the 2465 # pnacl uses the clang compiler so we need to suppress all the
2469 # same warnings as we do for clang. 2466 # same warnings as we do for clang.
2470 # TODO(sbc): Remove these if/when they are removed from the clang 2467 # TODO(sbc): Remove these if/when they are removed from the clang
2471 # build. 2468 # build.
2472 '-Wno-unused-function', 2469 '-Wno-unused-function',
2473 '-Wno-char-subscripts', 2470 '-Wno-char-subscripts',
2474 '-Wno-c++11-extensions', 2471 '-Wno-c++11-extensions',
2475 '-Wno-unnamed-type-template-args', 2472 '-Wno-unnamed-type-template-args',
2476 ], 2473 ],
2477 2474
2475 # By default, Android targets have their exported JNI symbols stripped,
2476 # so we test the manual JNI registration code paths that are required
2477 # when using the crazy linker. To allow use of native JNI exports (lazily
2478 # resolved by the JVM), targets can enable this variable, which will stop
2479 # the stripping from happening. Only targets which do not need to be
2480 # compatible with the crazy linker are permitted to set this.
2481 'use_native_jni_exports%': 0,
2482
2478 'conditions': [ 2483 'conditions': [
2479 ['OS=="win" and component=="shared_library"', { 2484 ['OS=="win" and component=="shared_library"', {
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%': '2', # 2 = /MD (nondebug DLL) 2486 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL)
2482 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL) 2487 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL)
2483 }, { 2488 }, {
2484 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx 2489 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
2485 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static) 2490 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
2486 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static) 2491 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
2487 }], 2492 }],
(...skipping 2099 matching lines...) Expand 10 before | Expand all | Expand 10 after
4587 '_STLP_USE_PTR_SPECIALIZATIONS=1', 4592 '_STLP_USE_PTR_SPECIALIZATIONS=1',
4588 'CHROME_BUILD_ID="<(chrome_build_id)"', 4593 'CHROME_BUILD_ID="<(chrome_build_id)"',
4589 ], 4594 ],
4590 'ldflags!': [ 4595 'ldflags!': [
4591 '-pthread', # Not supported by Android toolchain. 4596 '-pthread', # Not supported by Android toolchain.
4592 ], 4597 ],
4593 'ldflags': [ 4598 'ldflags': [
4594 '-Wl,--no-undefined', 4599 '-Wl,--no-undefined',
4595 ], 4600 ],
4596 'conditions': [ 4601 'conditions': [
4597 ['component=="static_library"', { 4602 ['component=="static_library" and android_webview_build==0', {
4598 'ldflags': [ 4603 'ldflags': [
4599 '-Wl,--exclude-libs=ALL', 4604 '-Wl,--exclude-libs=ALL',
4600 ], 4605 ],
4606 'target_conditions': [
4607 ['use_native_jni_exports==0', {
4608 # Use a linker version script to strip JNI exports from
4609 # binaries which have not specifically asked to use them.
4610 'ldflags': [
4611 '-Wl,--version-script=<!(cd <(DEPTH) && pwd -P)/build/andr oid/android_no_jni_exports.lst',
4612 ],
4613 }],
4614 ],
4601 }], 4615 }],
4602 ['clang==1', { 4616 ['clang==1', {
4603 'cflags': [ 4617 'cflags': [
4604 # Work around incompatibilities between bionic and clang 4618 # Work around incompatibilities between bionic and clang
4605 # headers. 4619 # headers.
4606 '-D__compiler_offsetof=__builtin_offsetof', 4620 '-D__compiler_offsetof=__builtin_offsetof',
4607 '-Dnan=__builtin_nan', 4621 '-Dnan=__builtin_nan',
4608 ], 4622 ],
4609 'conditions': [ 4623 'conditions': [
4610 ['target_arch=="arm"', { 4624 ['target_arch=="arm"', {
(...skipping 1297 matching lines...) Expand 10 before | Expand all | Expand 10 after
5908 # settings in target dicts. SYMROOT is a special case, because many other 5922 # settings in target dicts. SYMROOT is a special case, because many other
5909 # Xcode variables depend on it, including variables such as 5923 # Xcode variables depend on it, including variables such as
5910 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 5924 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
5911 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 5925 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
5912 # files to appear (when present) in the UI as actual files and not red 5926 # files to appear (when present) in the UI as actual files and not red
5913 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 5927 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
5914 # and therefore SYMROOT, needs to be set at the project level. 5928 # and therefore SYMROOT, needs to be set at the project level.
5915 'SYMROOT': '<(DEPTH)/xcodebuild', 5929 'SYMROOT': '<(DEPTH)/xcodebuild',
5916 }, 5930 },
5917 } 5931 }
OLDNEW
« no previous file with comments | « build/android/android_webview_export_whitelist.lst ('k') | build/config/BUILDCONFIG.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698