From 6a9bf214f90645788d2c197d5b1dd83f23812f72 Mon Sep 17 00:00:00 2001 From: Mitch Phillips Date: Thu, 5 Dec 2019 07:36:11 -0800 Subject: [PATCH] Fix cc_fuzz ignoring soong namespaces. cc_fuzz ignored soong namespaces, and built all cc_fuzz modules into the architecture package. This caused naming conflicts where two modules had the same name but were in different namespaces. Now, cc_fuzz will only build modules that are in the same namespace as the product definition - resolving the duplicate definitions error. Bug: 145240569 Test: m haiku Change-Id: I0a0acd139426301586ac5e3aba8ce5527cb7a1b5 --- cc/fuzz.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cc/fuzz.go b/cc/fuzz.go index bb89bb495..c2b0ff4bb 100644 --- a/cc/fuzz.go +++ b/cc/fuzz.go @@ -345,6 +345,11 @@ func (s *fuzzPackager) GenerateBuildActions(ctx android.SingletonContext) { return } + // Discard modules that are in an unavailable namespace. + if !ccModule.ExportedToMake() { + return + } + s.fuzzTargets[module.Name()] = true hostOrTargetString := "target"