summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2019-07-18 12:21:39 -0700
committerandroid-build-merger <android-build-merger@google.com>2019-07-18 12:21:39 -0700
commit4ba0e4cb4ec5b2ffe43e56a4a051791f8fa4d523 (patch)
treea0e11cbab062fb105afac34044dbfd527629f69c
parent25bdbc27ef989fa5862b7e437f9c181626dbc798 (diff)
parentaedc8f752aa1a2e0241530fd7eff22357d92b753 (diff)
downloadgtest_extras-4ba0e4cb4ec5b2ffe43e56a4a051791f8fa4d523.tar.gz
Move liblog from static to shared.
am: aedc8f752a Change-Id: Ice06254dabeee5daa80bc2df5c0489386aa3f825
-rw-r--r--Android.bp26
1 files changed, 20 insertions, 6 deletions
diff --git a/Android.bp b/Android.bp
index b0f9456..ad762c2 100644
--- a/Android.bp
+++ b/Android.bp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-cc_library {
+cc_library_static {
name: "libgtest_isolated",
host_supported: true,
cflags: ["-Wall", "-Werror"],
@@ -27,17 +27,22 @@ cc_library {
"Test.cpp",
],
- // NOTE: libbase and liblog are re-exported by including them below.
- // When Soong supports transitive static dependency includes, these
- // libraries can be removed.
+ // NOTE: libbase is re-exported by including them below.
+ // When Soong supports transitive static dependency includes, this
+ // library can be removed.
whole_static_libs: [
"libbase",
"libgtest",
+ ],
+
+ // Add liblog as a shared library so that gtests can override liblog
+ // functions without getting duplicate symbols.
+ shared_libs: [
"liblog",
],
}
-cc_library {
+cc_library_static {
name: "libgtest_isolated_main",
host_supported: true,
cflags: ["-Wall", "-Werror"],
@@ -48,6 +53,12 @@ cc_library {
whole_static_libs: [
"libgtest_isolated",
],
+
+ // Add liblog as a shared library so that gtests can override liblog
+ // functions without getting duplicate symbols.
+ shared_libs: [
+ "liblog",
+ ],
}
cc_test {
@@ -59,6 +70,9 @@ cc_test {
],
cflags: ["-Wall", "-Werror"],
- shared_libs: ["libbase"],
+ shared_libs: [
+ "libbase",
+ "liblog",
+ ],
whole_static_libs: ["libgtest_isolated_main"],
}