platform_build_soong/sdk
Paul Duffin a7cd8c8344 Generalize common property extraction
Previously, code that attempted to optimize the generated .bp rules
treated the properties structure as a single entity. So, a single arch
specific value would cause all properties to be treated as arch
specific. Also, that code was specific to one structure type.

This generalizes the optimization to work with any properties structure
which will be helpful for other multi-variant module types. It also
treats each property separately.

The hasArchSpecificFlags field has been removed from nativeLibInfo and
a commonProperties field has been added instead into which the common
values will be found. File path creation that conditionally prefixed a
path with archType has been replaced with general code that relies on
archType being "" for common properties and filepath.Join(..) ignoring
empty string components.

The common and arch variant properties are always processed. The first
within the context of the .bp module's property set and the latter
within an arch specific property set. There are always some properties
that are arch specific, e.g. outputFile, so there is no need to worry
about an empty arch property set being created.

The archSpecificNativeLibInfo type was renamed nativeLibInfoProperties
as it may not be arch specific.

The printExportedDirCopyCommandsForNativeLibs variable was renamed to
addExportedDirCopyCommandsForNativeLibs as it no longer does any
printing.

Bug: 142918168
Test: m checkbuild
Change-Id: Iad45913299c37fd76fe03ed0ca68bdc68ed76431
2019-12-13 09:59:48 +00:00
..
bp.go Add model to represent generated snapshot .bp file 2019-12-02 12:59:38 +00:00
cc_sdk_test.go Generalize common property extraction 2019-12-13 09:59:48 +00:00
java_sdk_test.go Ensure prebuilt modules have same visibility as source modules 2019-12-09 13:32:28 +00:00
sdk.go Added support for using static libraries in sdk snapshot 2019-12-12 11:37:39 +00:00
sdk_test.go Ensure prebuilt modules have same visibility as source modules 2019-12-09 13:32:28 +00:00
testing.go Added support for using static libraries in sdk snapshot 2019-12-12 11:37:39 +00:00
update.go Discard duplicate operations to copy files to snapshot 2019-12-12 11:37:39 +00:00