aboutsummaryrefslogtreecommitdiff
path: root/build/properties.go
diff options
context:
space:
mode:
authorJeongik Cha <jeongik@google.com>2021-01-20 18:37:20 +0900
committerJeongik Cha <jeongik@google.com>2021-01-26 09:21:00 +0900
commit52e9802210577daed4574a6e051ea6e06c84d44f (patch)
tree749d14c010f86170ac49b3f5a57d228ea0cc26b8 /build/properties.go
parentaf816a049b70413708b82d38b8b5541e96bea42a (diff)
downloadaidl-52e9802210577daed4574a6e051ea6e06c84d44f.tar.gz
Always specify version to use aidl_interface except it is unstable
As-is, the rule for versions of generated modules from aidl_interface is implicit and messy. For example, the version that <aidl_interface>-cpp stands for can be different depending on the context(it can be the latest stable version n or unstable version). And the version <aidl_interface>-unstable-* or <aidl_interface>-* refers to can be changed in accordance with freezing the interface. And also, for native modules, version name and generated library file name is sometimes mismatched. So, I make it more explicit. There are only two rules 1. If an interface is unstable, the generated module name is <aidl_interface>-<backend> 2. If not, the generated module name is always <aidl_interface>-V<version>-<backend> (the version for ToT version is the latest version + 1) And the library name(so, jar, and so on) is the same as the generated module name. In terms of implemenation, the logic around version is getting simpler. And Java, C++, NDK module creation logic is moved to PreArchMutator because the other aidl_interface's version infomation is unknown in the LoadHook phase, so we cannot find proper imported library name which includes the version Note that AIDL still generates <aidl_interface>-<backend> and <aidl_interface>-unstable-<backend> to prevent unexpected breakage in downstream branch and apply the change gradually, but it will be done before release. Bug: 150578172 Bug: 178138244 Test: m nothing Change-Id: I7d5ed804843360a4e5e94ce9bb391cee5904402f Merged-In: I7d5ed804843360a4e5e94ce9bb391cee5904402f (cherry picked from commit cbda12e517c0c39b82992b5584c5f130c87477a3)
Diffstat (limited to 'build/properties.go')
-rw-r--r--build/properties.go14
1 files changed, 11 insertions, 3 deletions
diff --git a/build/properties.go b/build/properties.go
index 7979d231..e77fc877 100644
--- a/build/properties.go
+++ b/build/properties.go
@@ -18,11 +18,19 @@ type nameProperties struct {
Name *string
}
+type hostProperties struct {
+ Cflags []string
+}
type perTargetProperties struct {
Enabled *bool
}
-type targetProperties struct {
+type ccTargetProperties struct {
+ Host hostProperties
+ Darwin perTargetProperties
+}
+
+type rustTargetProperties struct {
Darwin perTargetProperties
}
@@ -48,7 +56,7 @@ type ccProperties struct {
Apex_available []string
Min_sdk_version *string
UseApexNameMacro bool
- Target targetProperties
+ Target ccTargetProperties
Tidy *bool
Tidy_flags []string
Tidy_checks_as_errors []string
@@ -76,7 +84,7 @@ type rustProperties struct {
Srcs []string
Rustlibs []string
Stem *string
- Target targetProperties
+ Target rustTargetProperties
}
type phonyProperties struct {