diff options
| author | Colin Cross <ccross@android.com> | 2015-05-11 13:39:40 -0700 |
|---|---|---|
| committer | Colin Cross <ccross@android.com> | 2015-06-29 10:36:02 -0700 |
| commit | 7d5136f03350ca18dd8e3b9b34725973f2aa26a0 (patch) | |
| tree | a23fe8c9249d445627fcf8c89c35945ecd0b7438 /common | |
| parent | 0bc42685eedb2a520fd3e9b2d950ba24e521c0d2 (diff) | |
| download | build_soong-7d5136f03350ca18dd8e3b9b34725973f2aa26a0.tar.gz build_soong-7d5136f03350ca18dd8e3b9b34725973f2aa26a0.tar.bz2 build_soong-7d5136f03350ca18dd8e3b9b34725973f2aa26a0.zip | |
Improve property comments for docs
Improve the comments associated with properties to work better with
Blueprint's auto-documenting feature.
Make all properties structs into named types so that thet types can be
found using reflection and cross-referenced to the source code to
auto-extract docs.
Remove the leading <property>: text from properties, the documentation
will include the lowercased name of the property.
Add filter tags to the nested arch properties.
Change-Id: I4ef5db86358886fe61456c24eb2dbe6f7b876115
Diffstat (limited to 'common')
| -rw-r--r-- | common/arch.go | 84 | ||||
| -rw-r--r-- | common/module.go | 4 |
2 files changed, 59 insertions, 29 deletions
diff --git a/common/arch.go b/common/arch.go index 4ea0f268..ba1f6712 100644 --- a/common/arch.go +++ b/common/arch.go @@ -92,38 +92,68 @@ module { }, } */ + type archProperties struct { + // Properties to vary by target architecture Arch struct { - Arm interface{} - Arm64 interface{} - Mips interface{} - Mips64 interface{} - X86 interface{} - X86_64 interface{} - } + // Properties for module variants being built to run on arm (host or device) + Arm interface{} `blueprint:"filter(android:\"arch_variant\")"` + // Properties for module variants being built to run on arm64 (host or device) + Arm64 interface{} `blueprint:"filter(android:\"arch_variant\")"` + // Properties for module variants being built to run on mips (host or device) + Mips interface{} `blueprint:"filter(android:\"arch_variant\")"` + // Properties for module variants being built to run on mips64 (host or device) + Mips64 interface{} `blueprint:"filter(android:\"arch_variant\")"` + // Properties for module variants being built to run on x86 (host or device) + X86 interface{} `blueprint:"filter(android:\"arch_variant\")"` + // Properties for module variants being built to run on x86_64 (host or device) + X86_64 interface{} `blueprint:"filter(android:\"arch_variant\")"` + } + // Properties to vary by 32-bit or 64-bit Multilib struct { - Lib32 interface{} - Lib64 interface{} + // Properties for module variants being built to run on 32-bit devices + Lib32 interface{} `blueprint:"filter(android:\"arch_variant\")"` + // Properties for module variants being built to run on 64-bit devices + Lib64 interface{} `blueprint:"filter(android:\"arch_variant\")"` } + // Properties to vary by build target (host or device, os, os+archictecture) Target struct { - Host interface{} - Android interface{} - Android_arm interface{} - Android_arm64 interface{} - Android_mips interface{} - Android_mips64 interface{} - Android_x86 interface{} - Android_x86_64 interface{} - Android64 interface{} - Android32 interface{} - Linux interface{} - Linux_x86 interface{} - Linux_x86_64 interface{} - Darwin interface{} - Darwin_x86 interface{} - Darwin_x86_64 interface{} - Windows interface{} - Not_windows interface{} + // Properties for module variants being built to run on the host + Host interface{} `blueprint:"filter(android:\"arch_variant\")"` + // Properties for module variants being built to run on the device + Android interface{} `blueprint:"filter(android:\"arch_variant\")"` + // Properties for module variants being built to run on arm devices + Android_arm interface{} `blueprint:"filter(android:\"arch_variant\")"` + // Properties for module variants being built to run on arm64 devices + Android_arm64 interface{} `blueprint:"filter(android:\"arch_variant\")"` + // Properties for module variants being built to run on mips devices + Android_mips interface{} `blueprint:"filter(android:\"arch_variant\")"` + // Properties for module variants being built to run on mips64 devices + Android_mips64 interface{} `blueprint:"filter(android:\"arch_variant\")"` + // Properties for module variants being built to run on x86 devices + Android_x86 interface{} `blueprint:"filter(android:\"arch_variant\")"` + // Properties for module variants being built to run on x86_64 devices + Android_x86_64 interface{} `blueprint:"filter(android:\"arch_variant\")"` + // Properties for module variants being built to run on devices that support 64-bit + Android64 interface{} `blueprint:"filter(android:\"arch_variant\")"` + // Properties for module variants being built to run on devices that do not support 64-bit + Android32 interface{} `blueprint:"filter(android:\"arch_variant\")"` + // Properties for module variants being built to run on linux hosts + Linux interface{} `blueprint:"filter(android:\"arch_variant\")"` + // Properties for module variants being built to run on linux x86 hosts + Linux_x86 interface{} `blueprint:"filter(android:\"arch_variant\")"` + // Properties for module variants being built to run on linux x86_64 hosts + Linux_x86_64 interface{} `blueprint:"filter(android:\"arch_variant\")"` + // Properties for module variants being built to run on darwin hosts + Darwin interface{} `blueprint:"filter(android:\"arch_variant\")"` + // Properties for module variants being built to run on darwin x86 hosts + Darwin_x86 interface{} `blueprint:"filter(android:\"arch_variant\")"` + // Properties for module variants being built to run on darwin x86_64 hosts + Darwin_x86_64 interface{} `blueprint:"filter(android:\"arch_variant\")"` + // Properties for module variants being built to run on windows hosts + Windows interface{} `blueprint:"filter(android:\"arch_variant\")"` + // Properties for module variants being built to run on linux or darwin hosts + Not_windows interface{} `blueprint:"filter(android:\"arch_variant\")"` } } diff --git a/common/module.go b/common/module.go index c39b55a1..77e02952 100644 --- a/common/module.go +++ b/common/module.go @@ -85,10 +85,10 @@ type commonProperties struct { Deps []string Tags []string - // disabled: don't emit any build rules for this module + // don't emit any build rules for this module Disabled bool `android:"arch_variant"` - // multilib: control whether this module compiles for 32-bit, 64-bit, or both. Possible values + // control whether this module compiles for 32-bit, 64-bit, or both. Possible values // are "32" (compile for 32-bit only), "64" (compile for 64-bit only), "both" (compile for both // architectures), or "first" (compile for 64-bit on a 64-bit platform, and 32-bit on a 32-bit // platform |
