From 6a730045b5bfcfdc3e0709f4283ade8a541dc618 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Thu, 5 Dec 2024 13:53:43 -0800 Subject: Add and use staticLibrary() Add staticLibrary() that returns true for a static variant of a library, and replace all instances of foo.static() && !foo.staticBinary() with foo.staticLibrary. Test: builds Change-Id: I0bf0c18669c24f23ebc9cc33d525b86d81e22d40 --- cc/coverage.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cc/coverage.go') diff --git a/cc/coverage.go b/cc/coverage.go index a7618dd96..dbb424f59 100644 --- a/cc/coverage.go +++ b/cc/coverage.go @@ -145,7 +145,7 @@ func (cov *coverage) flags(ctx ModuleContext, flags Flags, deps PathDeps) (Flags // Even if we don't have coverage enabled, if any of our object files were compiled // with coverage, then we need to add --coverage to our ldflags. if !cov.linkCoverage { - if ctx.static() && !ctx.staticBinary() { + if ctx.staticLibrary() { // For static libraries, the only thing that changes our object files // are included whole static libraries, so check to see if any of // those have coverage enabled. -- cgit v1.2.3-59-g8ed1b