Commit 79dfb8b4 authored by bulach@chromium.org's avatar bulach@chromium.org

Android: enable chromium linker on the shells.

Chromium linker has been enabled for the full chrome,
and should also be exercised by content / chrome shells.

BUG=382485

Review URL: https://codereview.chromium.org/329223002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277892 0039d316-1c4b-4281-b951-d872f2087c98
parent 61664cb5
...@@ -474,15 +474,24 @@ public class Linker { ...@@ -474,15 +474,24 @@ public class Linker {
public static void useSharedRelros(Bundle bundle) { public static void useSharedRelros(Bundle bundle) {
// Ensure the bundle uses the application's class loader, not the framework // Ensure the bundle uses the application's class loader, not the framework
// one which doesn't know anything about LibInfo. // one which doesn't know anything about LibInfo.
if (bundle != null) // Also, hold a fresh copy of it so the caller can't recycle it.
Bundle clonedBundle = null;
if (bundle != null) {
bundle.setClassLoader(LibInfo.class.getClassLoader()); bundle.setClassLoader(LibInfo.class.getClassLoader());
clonedBundle = new Bundle(LibInfo.class.getClassLoader());
if (DEBUG) Log.i(TAG, "useSharedRelros() called with " + bundle); Parcel p = Parcel.obtain();
bundle.writeToParcel(p, 0);
clonedBundle.readFromParcel(p);
p.recycle();
}
if (DEBUG) {
Log.i(TAG, "useSharedRelros() called with " + bundle +
",cloned " + clonedBundle);
}
synchronized (Linker.class) { synchronized (Linker.class) {
// Note that in certain cases, this can be called before // Note that in certain cases, this can be called before
// initServiceProcess() in service processes. // initServiceProcess() in service processes.
sSharedRelros = bundle; sSharedRelros = clonedBundle;
// Tell any listener blocked in finishLibraryLoad() about it. // Tell any listener blocked in finishLibraryLoad() about it.
Linker.class.notifyAll(); Linker.class.notifyAll();
} }
......
...@@ -72,6 +72,13 @@ ...@@ -72,6 +72,13 @@
'additional_input_paths': [ 'additional_input_paths': [
'<@(chrome_android_pak_output_resources)', '<@(chrome_android_pak_output_resources)',
], ],
'conditions': [
['component != "shared_library" and target_arch != "arm64" and target_arch != "x64"', {
# Only enable the chromium linker on regular builds, since the
# component build crashes on Android 4.4. See b/11379966
'use_chromium_linker': '1',
}],
],
}, },
'includes': [ '../build/java_apk.gypi', ], 'includes': [ '../build/java_apk.gypi', ],
}, },
......
...@@ -1029,6 +1029,11 @@ ...@@ -1029,6 +1029,11 @@
'<(PRODUCT_DIR)/icudtl.dat', '<(PRODUCT_DIR)/icudtl.dat',
], ],
}], }],
['component != "shared_library" and target_arch != "arm64" and target_arch != "x64"', {
# Only enable the chromium linker on regular builds, since the
# component build crashes on Android 4.4. See b/11379966
'use_chromium_linker': '1',
}],
], ],
}, },
'conditions': [ 'conditions': [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment