0

Crazylinker: remove the code to load component build library

BUG=657093

Review-Url: https://codereview.chromium.org/2462333002
Cr-Commit-Position: refs/heads/master@{#429664}
This commit is contained in:
michaelbai
2016-11-03 12:13:02 -07:00
committed by Commit bot
parent 0921d355ba
commit 4595065335
2 changed files with 5 additions and 12 deletions
base/android
java
src
org
chromium
base
library_loader
linker

@ -503,32 +503,24 @@ public abstract class Linker {
}
/**
* Determine whether a library is the linker library. Also deal with the
* component build that adds a .cr suffix to the name.
* Determine whether a library is the linker library.
*
* @param library the name of the library.
* @return true is the library is the Linker's own JNI library.
*/
public boolean isChromiumLinkerLibrary(String library) {
return library.equals(LINKER_JNI_LIBRARY) || library.equals(LINKER_JNI_LIBRARY + ".cr");
return library.equals(LINKER_JNI_LIBRARY);
}
/**
* Load the Linker JNI library. Throws UnsatisfiedLinkError on error.
* In a component build, the suffix ".cr" is added to each library name, so
* if the initial load fails we retry with a suffix.
*/
protected static void loadLinkerJniLibrary() {
String libName = "lib" + LINKER_JNI_LIBRARY + ".so";
if (DEBUG) {
Log.i(TAG, "Loading " + libName);
}
try {
System.loadLibrary(LINKER_JNI_LIBRARY);
} catch (UnsatisfiedLinkError e) {
Log.w(TAG, "Couldn't load " + libName + ", trying " + libName + ".cr");
System.loadLibrary(LINKER_JNI_LIBRARY + ".cr");
}
System.loadLibrary(LINKER_JNI_LIBRARY);
}
/**

@ -6,7 +6,8 @@ import("//build/config/android/config.gni")
import("//build/config/compiler/compiler.gni")
import("//build/config/sanitizers/sanitizers.gni")
# Chromium linker crashes on component builds on Android 4.4. See b/11379966
# Chromium linker doesn't reliably support loading multiple libraries;
# disable for component builds, see crbug.com/657093.
# Chromium linker causes instrumentation to return incorrect results.
chromium_linker_supported =
!is_component_build && !enable_profiling && !use_order_profiling && !is_asan