From ba407c8afaab20aa1c4688eb050e6524c3f668b2 Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Thu, 1 Apr 2021 22:17:50 +0000 Subject: [PATCH] Export header check allows WholeStaticLibs cc/linker.go code assumes that export_static_lib_headers can apply regardless of whether a library is a regular or 'whole' static lib. However, this check prevents that code from working. Bug: 183654927 Test: use export_static_lib_headers like this Change-Id: I680f90514e41224a7077630167ab4e481909d89c --- cc/cc.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cc/cc.go b/cc/cc.go index f074597bd..bef89fa8e 100644 --- a/cc/cc.go +++ b/cc/cc.go @@ -1892,8 +1892,8 @@ func (c *Module) deps(ctx DepsContext) Deps { } for _, lib := range deps.ReexportStaticLibHeaders { - if !inList(lib, deps.StaticLibs) { - ctx.PropertyErrorf("export_static_lib_headers", "Static library not in static_libs: '%s'", lib) + if !inList(lib, deps.StaticLibs) && !inList(lib, deps.WholeStaticLibs) { + ctx.PropertyErrorf("export_static_lib_headers", "Static library not in static_libs or whole_static_libs: '%s'", lib) } }