From bbf2d25cb73dde6c7be400a6e0ddb9027ed2389e Mon Sep 17 00:00:00 2001 From: Jayant Chowdhary Date: Mon, 7 Aug 2017 14:09:45 -0700 Subject: Allow vndk library dependecies to dump abi again. As a part of the fix for bug 38304436, the condition for dumping abi for a source file was reduced to : if the source file belongs to a library belonging the vndk or the llndk, dump the abi. This needs to be changed back to: if the source file comes through a dependency of a vndk library (static, whole static or source), whether or not the dependency may be vndk-enabled, dump the abi. Test: mm -j64 in external/libcxx. Without the change, libc++ does not produce any abi dump, since it depends on whole static libraries not marked vndk enabled. After the change, libc++ has an abi dump combining abi exposed by whole static, static and source dependencies. Bug: 38304436 Merged-In: I07563da68a03b11236b0d7a7ce5ca35cc36bd1df Change-Id: Ida3dceeca11342756191f316bee74ea08bcdd984 (cherry picked from commit 2a96640335aa5d3d9a977032c7aa3cb487829b9a) --- cc/library.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cc/library.go b/cc/library.go index 3d463bdb..4e3e2b39 100644 --- a/cc/library.go +++ b/cc/library.go @@ -351,7 +351,7 @@ func (library *libraryDecorator) compile(ctx ModuleContext, flags Flags, deps Pa } return Objects{} } - if ctx.createVndkSourceAbiDump() { + if ctx.createVndkSourceAbiDump() || library.sabi.Properties.CreateSAbiDumps { exportIncludeDirs := android.PathsForModuleSrc(ctx, library.flagExporter.Properties.Export_include_dirs) var SourceAbiFlags []string for _, dir := range exportIncludeDirs.Strings() { -- cgit v1.2.3 From ef34632af34ef8bc9b65b2588360e5ad206a3d0b Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Thu, 10 Aug 2017 00:48:06 +0900 Subject: a shared lib header is not exported to vendors if it is in exclude_shared_libs Since a lib in exclude_shared_libs are not used for the vendor variant, it should also be removed from the export_shared_lib_headers. Bug: 62471389 Test: BOARD_VNDK_VERSION=current m -j libxml2.vendor successful (libxml2 has libicuuc in both exported_shared_lib_headers and exclude_shared_libs for the vendor variant) Change-Id: Ic9ddbd7be3c76df563e428ba2409a03bd2e1e113 --- cc/linker.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cc/linker.go b/cc/linker.go index 1a842ae2..5250d2d6 100644 --- a/cc/linker.go +++ b/cc/linker.go @@ -131,15 +131,16 @@ func (linker *baseLinker) linkerDeps(ctx BaseModuleContext, deps Deps) Deps { deps.StaticLibs = append(deps.StaticLibs, linker.Properties.Static_libs...) deps.SharedLibs = append(deps.SharedLibs, linker.Properties.Shared_libs...) - if ctx.vndk() { - deps.SharedLibs = removeListFromList(deps.SharedLibs, linker.Properties.Target.Vendor.Exclude_shared_libs) - } - deps.ReexportHeaderLibHeaders = append(deps.ReexportHeaderLibHeaders, linker.Properties.Export_header_lib_headers...) deps.ReexportStaticLibHeaders = append(deps.ReexportStaticLibHeaders, linker.Properties.Export_static_lib_headers...) deps.ReexportSharedLibHeaders = append(deps.ReexportSharedLibHeaders, linker.Properties.Export_shared_lib_headers...) deps.ReexportGeneratedHeaders = append(deps.ReexportGeneratedHeaders, linker.Properties.Export_generated_headers...) + if ctx.vndk() { + deps.SharedLibs = removeListFromList(deps.SharedLibs, linker.Properties.Target.Vendor.Exclude_shared_libs) + deps.ReexportSharedLibHeaders = removeListFromList(deps.ReexportSharedLibHeaders, linker.Properties.Target.Vendor.Exclude_shared_libs) + } + if ctx.ModuleName() != "libcompiler_rt-extras" { deps.LateStaticLibs = append(deps.LateStaticLibs, "libcompiler_rt-extras") } -- cgit v1.2.3