From 1f959769f344182a6741ddcebc7c592d6e521e7e Mon Sep 17 00:00:00 2001 From: Inseob Kim Date: Wed, 27 Mar 2019 17:20:37 +0900 Subject: [PATCH] Remove libbase dependency of sysprop_library libbase dependency is not really needed, but it has been causing build failure while linking with static variant of sysprop_library. This cuts the dependency and only depend on libbase_headers and liblog. Bug: 129301987 Test: 1) flash and boot walleye Test: 2) try to build various properties with sysprop_library. Test: 3) sysprop_test Change-Id: I027e01c754b782818f52103184301267d4cdd576 --- cc/compiler.go | 3 ++- cc/testing.go | 10 ---------- sysprop/sysprop_test.go | 20 ++++++++++++++++++++ 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/cc/compiler.go b/cc/compiler.go index 0ab1f0188..fe46a3c30 100644 --- a/cc/compiler.go +++ b/cc/compiler.go @@ -226,7 +226,8 @@ func (compiler *baseCompiler) compilerDeps(ctx DepsContext, deps Deps) Deps { } if compiler.hasSrcExt(".sysprop") { - deps.SharedLibs = append(deps.SharedLibs, "libbase") + deps.HeaderLibs = append(deps.HeaderLibs, "libbase_headers") + deps.SharedLibs = append(deps.SharedLibs, "liblog") } if Bool(compiler.Properties.Openmp) { diff --git a/cc/testing.go b/cc/testing.go index b3b2756aa..2f41de1aa 100644 --- a/cc/testing.go +++ b/cc/testing.go @@ -69,16 +69,6 @@ func GatherRequiredDepsForTest(os android.OsType) string { src: "", } - cc_library { - name: "libbase", - no_libgcc: true, - nocrt: true, - vendor_available: true, - vndk: { - enabled: true, - support_system_process: true, - } - } cc_library { name: "libc", no_libgcc: true, diff --git a/sysprop/sysprop_test.go b/sysprop/sysprop_test.go index 79b0f4e82..a7aff59ec 100644 --- a/sysprop/sysprop_test.go +++ b/sysprop/sysprop_test.go @@ -73,6 +73,7 @@ func testContext(config android.Config, bp string, }) ctx.RegisterModuleType("cc_library", android.ModuleFactoryAdaptor(cc.LibraryFactory)) + ctx.RegisterModuleType("cc_library_headers", android.ModuleFactoryAdaptor(cc.LibraryHeaderFactory)) ctx.RegisterModuleType("cc_library_static", android.ModuleFactoryAdaptor(cc.LibraryFactory)) ctx.RegisterModuleType("cc_object", android.ModuleFactoryAdaptor(cc.ObjectFactory)) ctx.RegisterModuleType("llndk_library", android.ModuleFactoryAdaptor(cc.LlndkLibraryFactory)) @@ -271,6 +272,25 @@ func TestSyspropLibrary(t *testing.T) { soc_specific: true, static_libs: ["sysprop-platform", "sysprop-vendor"], } + + cc_library_headers { + name: "libbase_headers", + vendor_available: true, + recovery_available: true, + } + + cc_library { + name: "liblog", + no_libgcc: true, + nocrt: true, + system_shared_libs: [], + recovery_available: true, + } + + llndk_library { + name: "liblog", + symbol_file: "", + } `) for _, variant := range []string{