From 4ac44809af32cf6142026d0d9ea435d98124d6cd Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Wed, 15 Feb 2017 14:06:12 -0800 Subject: [PATCH] Export header libraries to make as static libraries Header libraries were building an empty .a file but setting LOCAL_MODULE_CLASS := SHARED_LIBRARIES. Make the static and shared checks in libraryDecorator.AndroidMk explicit. Bug: 35228396 Test: builds, examine out/soong/Android-${TARGET_PRODUCT}.mk Change-Id: I5653ae92bb41d440d8c3ff4b6d509be188feb961 --- cc/androidmk.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cc/androidmk.go b/cc/androidmk.go index 198c61062..ac1a55da7 100644 --- a/cc/androidmk.go +++ b/cc/androidmk.go @@ -81,14 +81,14 @@ func (c *Module) AndroidMk() (ret android.AndroidMkData, err error) { } func (library *libraryDecorator) AndroidMk(ctx AndroidMkContext, ret *android.AndroidMkData) { - if !library.static() { + if library.shared() { ctx.subAndroidMk(ret, &library.stripper) ctx.subAndroidMk(ret, &library.relocationPacker) } - if library.static() { + if library.static() || library.header() { ret.Class = "STATIC_LIBRARIES" - } else { + } else if library.shared() { ret.Class = "SHARED_LIBRARIES" } @@ -118,7 +118,7 @@ func (library *libraryDecorator) AndroidMk(ctx AndroidMkContext, ret *android.An return nil }) - if !library.static() { + if library.shared() { ctx.subAndroidMk(ret, library.baseInstaller) } }