aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Wasilczyk <twasilczyk@google.com>2024-04-19 08:08:34 -0700
committerTomasz Wasilczyk <twasilczyk@google.com>2024-05-07 19:09:48 +0000
commitf596c462fe329c39aad9217c2627f29f75d2eac2 (patch)
tree84474e8eba382d651fde7da5dbd2a51fee54e897
parent83ec68d3ff020c222142ac98f142c97442e4bbc7 (diff)
downloadaidl-f596c462fe329c39aad9217c2627f29f75d2eac2.tar.gz
Export aidl_interface details to cc.Module
Bug: 302718225 Test: Build aosp/2798713 Change-Id: Id4b59bc61d0d1a3e4a1406af8dd83249dfca63b0
-rw-r--r--build/aidl_interface_backends.go17
-rw-r--r--build/properties.go5
2 files changed, 21 insertions, 1 deletions
diff --git a/build/aidl_interface_backends.go b/build/aidl_interface_backends.go
index 25a5cf20..1176f6b2 100644
--- a/build/aidl_interface_backends.go
+++ b/build/aidl_interface_backends.go
@@ -75,6 +75,7 @@ func addCppLibrary(mctx android.DefaultableHookContext, i *aidlInterface, versio
genLog := proptools.Bool(commonProperties.Gen_log)
genTrace := i.genTrace(lang)
+ aidlFlags := i.flagsForAidlGenRule(version)
mctx.CreateModule(aidlGenFactory, &nameProperties{
Name: proptools.StringPtr(cppSourceGen),
@@ -93,7 +94,7 @@ func addCppLibrary(mctx android.DefaultableHookContext, i *aidlInterface, versio
Unstable: i.properties.Unstable,
NotFrozen: notFrozen,
RequireFrozenReason: requireFrozenReason,
- Flags: i.flagsForAidlGenRule(version),
+ Flags: aidlFlags,
UseUnfrozen: i.useUnfrozen(mctx),
},
)
@@ -162,6 +163,11 @@ func addCppLibrary(mctx android.DefaultableHookContext, i *aidlInterface, versio
productAvailable = nil
}
+ fullPathSources := make([]string, len(srcs))
+ for i, src := range srcs {
+ fullPathSources[i] = filepath.Join(mctx.ModuleDir(), aidlRoot, src)
+ }
+
mctx.CreateModule(aidlImplementationGeneratorFactory, &nameProperties{
Name: proptools.StringPtr(cppModuleGen + "-generator"),
}, &aidlImplementationGeneratorProperties{
@@ -207,6 +213,15 @@ func addCppLibrary(mctx android.DefaultableHookContext, i *aidlInterface, versio
"-clang-analyzer-optin.performance.Padding", // b/253079031
},
Include_build_directory: proptools.BoolPtr(false), // b/254682497
+ AidlInterface: struct {
+ Sources []string
+ Lang string
+ Flags []string
+ }{
+ Sources: fullPathSources,
+ Lang: lang,
+ Flags: aidlFlags,
+ },
}, &i.properties.VndkProperties,
&commonProperties.VndkProperties,
&overrideVndkProperties,
diff --git a/build/properties.go b/build/properties.go
index deafe002..433fbd71 100644
--- a/build/properties.go
+++ b/build/properties.go
@@ -72,6 +72,11 @@ type ccProperties struct {
Tidy_flags []string
Tidy_checks_as_errors []string
Include_build_directory *bool
+ AidlInterface struct {
+ Sources []string
+ Lang string
+ Flags []string
+ }
}
type javaProperties struct {