Link dependencies dynamically
An attempt to add feature flags to the widevine service (b/311951236) caused a memory regression (b/324438957). Using the static library for feature flags results in SIGSEGV due to possible clobbering of static libraries (b/311951236 comment18). An alternate option is to make libcutils and libc++ shared Bug: 325483378 Test: WVTS Change-Id: Id37f80bf8990554fcdd16c1a6401e877231390cb
This commit is contained in:
@@ -108,6 +108,7 @@ cc_defaults {
|
||||
shared_libs: [
|
||||
"libbinder_ndk",
|
||||
"libcrypto",
|
||||
"libcutils",
|
||||
"liblog",
|
||||
],
|
||||
|
||||
@@ -119,7 +120,6 @@ cc_defaults {
|
||||
"libcdm_protos",
|
||||
"libcdm_utils",
|
||||
"libcdm",
|
||||
"libcutils",
|
||||
"libjsmn",
|
||||
"libjsoncpp",
|
||||
"libprotobuf-cpp-lite",
|
||||
@@ -144,7 +144,7 @@ cc_binary {
|
||||
"common_widevine_service-multilib-defaults-aidl",
|
||||
],
|
||||
|
||||
stl: "c++_static",
|
||||
stl: "c++_shared",
|
||||
|
||||
srcs: ["src/service.cpp"],
|
||||
|
||||
@@ -171,7 +171,7 @@ cc_binary {
|
||||
"common_widevine_service-multilib-defaults-aidl",
|
||||
],
|
||||
|
||||
stl: "c++_static",
|
||||
stl: "c++_shared",
|
||||
|
||||
srcs: ["src/serviceLazy.cpp"],
|
||||
|
||||
@@ -284,7 +284,6 @@ cc_library {
|
||||
"libcdm_protos",
|
||||
"libcdm_utils",
|
||||
"libcdm",
|
||||
"libcutils",
|
||||
"libjsmn",
|
||||
"libjsoncpp",
|
||||
"libprotobuf-cpp-lite",
|
||||
@@ -300,6 +299,7 @@ cc_library {
|
||||
shared_libs: [
|
||||
"libbinder_ndk",
|
||||
"libcrypto",
|
||||
"libcutils",
|
||||
"libdl",
|
||||
"liblog",
|
||||
"wv_media_drm_flags_c_lib",
|
||||
@@ -336,12 +336,12 @@ cc_fuzz {
|
||||
"fuzzer_disable_leaks",
|
||||
],
|
||||
shared_libs: [
|
||||
"libcutils",
|
||||
"wv_media_drm_flags_c_lib",
|
||||
],
|
||||
static_libs: [
|
||||
"libbase",
|
||||
"libbinder_random_parcel",
|
||||
"libcutils",
|
||||
"libutils",
|
||||
],
|
||||
target: {
|
||||
|
||||
Reference in New Issue
Block a user