Fix ODR issue with dex2oat and libcrypto
dex2oat links against both static and shared libcrypto, which causes
ODR issues in the new FIPS self test code. Remove the unnecessary
static linkage.
Bug: 137267623
Test: treehugger
Change-Id: I484ef9fb8d6599828310c31f7d54571c93f55d56
diff --git a/dex2oat/Android.bp b/dex2oat/Android.bp
index d3ba191..cb59bc2 100644
--- a/dex2oat/Android.bp
+++ b/dex2oat/Android.bp
@@ -80,22 +80,18 @@
generated_sources: ["art_dex2oat_operator_srcs"],
shared_libs: [
"libbase",
+
+ // For SHA-1 checksumming of build ID
+ "libcrypto",
],
export_include_dirs: ["."],
-
- // For SHA-1 checksumming of build ID
- static: {
- whole_static_libs: ["libcrypto"],
- },
- shared: {
- shared_libs: ["libcrypto"],
- },
}
cc_defaults {
name: "libart-dex2oat_static_base_defaults",
static_libs: [
"libbase",
+ "libcrypto",
"libz",
],
}
@@ -245,6 +241,7 @@
"libart-compiler",
"libart-dexlayout",
"libart",
+ "libcrypto",
"libdexfile",
"libartbase",
"libartpalette",
@@ -291,6 +288,7 @@
"libartd-compiler",
"libartd-dexlayout",
"libartd",
+ "libcrypto",
"libdexfiled",
"libartbased",
"libartpalette",
@@ -465,6 +463,7 @@
"libartd-dexlayout",
"libartpalette",
"libbase",
+ "libcrypto",
"libprofiled",
"libsigchain",
"libziparchive",