From 5b007eaa91cfbb004f52780e8f4626166f1f8f25 Mon Sep 17 00:00:00 2001 From: Tomasz Wasilczyk Date: Thu, 25 Apr 2024 11:19:37 -0700 Subject: [PATCH] BaseCompilerProperties: add AidlInterface struct for aidl_interface info This is necessary for cc_cmake_snapshot to snapshot and generate build rules for actual source files (AIDL files) and not generated cpp sources. Otherwise, this information is inaccessible for cc module after aidl_interface pass. Bug: 302718225 Test: Build aosp/2798713 Change-Id: I991e73f74d7551d21f337a7161cce55ba51fec71 --- cc/compiler.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cc/compiler.go b/cc/compiler.go index 9a961cfb9..a1b329e2c 100644 --- a/cc/compiler.go +++ b/cc/compiler.go @@ -141,6 +141,19 @@ type BaseCompilerProperties struct { Flags []string } + // Populated by aidl_interface CPP backend to let other modules (e.g. cc_cmake_snapshot) + // access actual source files and not generated cpp intermediary sources. + AidlInterface struct { + // list of aidl_interface sources + Sources []string `blueprint:"mutated"` + + // AIDL backend language (e.g. "cpp", "ndk") + Lang string `blueprint:"mutated"` + + // list of flags passed to AIDL generator + Flags []string `blueprint:"mutated"` + } `blueprint:"mutated"` + Renderscript struct { // list of directories that will be added to the llvm-rs-cc include paths Include_dirs []string