diff options
author | torne@chromium.org <torne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-26 21:26:01 +0000 |
---|---|---|
committer | torne@chromium.org <torne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-26 21:26:01 +0000 |
commit | 6c6361d31df0f6397092bba0659230bcad7ef88c (patch) | |
tree | 51aaefa1b8ecf8e28a9e46a9dbfce2c816d16d2a | |
parent | 45ce685e8bf53bfab441ed67b58b2cde07e8d3bf (diff) | |
download | chromium_src-6c6361d31df0f6397092bba0659230bcad7ef88c.zip chromium_src-6c6361d31df0f6397092bba0659230bcad7ef88c.tar.gz chromium_src-6c6361d31df0f6397092bba0659230bcad7ef88c.tar.bz2 |
Android WebView: use the system ashmem.
We are already pulling in the system ashmem via other system libraries,
so compiling a second copy into chrome causes linker issues. Use the
system version in Chromium as well when building WebView as part of the
Android build.
BUG=157326
Review URL: https://chromiumcodereview.appspot.com/12674026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190771 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | android_webview/android_webview.gyp | 1 | ||||
-rw-r--r-- | android_webview/tools/known_issues.py | 1 | ||||
-rw-r--r-- | third_party/ashmem/OWNERS | 1 | ||||
-rw-r--r-- | third_party/ashmem/ashmem.gyp | 26 | ||||
-rwxr-xr-x | tools/generate_shim_headers/generate_shim_headers.py | 6 |
5 files changed, 29 insertions, 6 deletions
diff --git a/android_webview/android_webview.gyp b/android_webview/android_webview.gyp index 41f9898..0ce4bd7 100644 --- a/android_webview/android_webview.gyp +++ b/android_webview/android_webview.gyp @@ -29,6 +29,7 @@ # The "android" gyp backend doesn't quite handle static libraries' # dependencies correctly; force this to be linked as a workaround. 'cpufeatures.a', + '-lcutils', ], }], ], diff --git a/android_webview/tools/known_issues.py b/android_webview/tools/known_issues.py index 377950a..32bc1da 100644 --- a/android_webview/tools/known_issues.py +++ b/android_webview/tools/known_issues.py @@ -50,6 +50,7 @@ KNOWN_INCOMPATIBLE = { # Code we don't want to build/include by accident from the main chromium # src/ directory. + 'third_party/ashmem/*.[ch]', 'third_party/expat/files/lib', 'third_party/libjpeg/*.[ch]', ], diff --git a/third_party/ashmem/OWNERS b/third_party/ashmem/OWNERS new file mode 100644 index 0000000..938d2b5 --- /dev/null +++ b/third_party/ashmem/OWNERS @@ -0,0 +1 @@ +digit@chromium.org diff --git a/third_party/ashmem/ashmem.gyp b/third_party/ashmem/ashmem.gyp index 36e231f..82e893a 100644 --- a/third_party/ashmem/ashmem.gyp +++ b/third_party/ashmem/ashmem.gyp @@ -6,10 +6,28 @@ 'targets': [ { 'target_name': 'ashmem', - 'type': 'static_library', - 'sources': [ - 'ashmem.h', - 'ashmem-dev.c' + 'conditions': [ + ['android_webview_build==1', { + # WebView must use the Android system version of ashmem to avoid + # linking problems. + 'type': 'none', + 'variables': { + 'headers_root_path': '.', + 'header_filenames': [ 'ashmem.h' ], + 'shim_generator_additional_args': [ + '--prefix', 'cutils/', + ], + }, + 'includes': [ + '../../build/shim_headers.gypi', + ], + }, { + 'type': 'static_library', + 'sources': [ + 'ashmem.h', + 'ashmem-dev.c' + ], + }], ], }, ], diff --git a/tools/generate_shim_headers/generate_shim_headers.py b/tools/generate_shim_headers/generate_shim_headers.py index 891b75c..81c531b 100755 --- a/tools/generate_shim_headers/generate_shim_headers.py +++ b/tools/generate_shim_headers/generate_shim_headers.py @@ -29,6 +29,7 @@ def GeneratorMain(argv): parser.add_option('--headers-root', action='append') parser.add_option('--define', action='append') parser.add_option('--output-directory') + parser.add_option('--prefix', default='') parser.add_option('--use-include-next', action='store_true') parser.add_option('--outputs', action='store_true') parser.add_option('--generate', action='store_true') @@ -80,10 +81,11 @@ def GeneratorMain(argv): for header in include_before.split(':'): f.write('#include %s\n' % header) + include_target = options.prefix + header_filename if options.use_include_next: - f.write('#include_next <%s>\n' % header_filename) + f.write('#include_next <%s>\n' % include_target) else: - f.write('#include <%s>\n' % header_filename) + f.write('#include <%s>\n' % include_target) if include_after: for header in include_after.split(':'): |