Commit Graph

17171 Commits

Author SHA1 Message Date
Jooyung Han
36c5f9e811 Merge "Add "legacy_android10_support" to "apex""
am: ac68248051

Change-Id: If788f448a844909ec4f0fe1f2f38cd53e3d43921
2019-12-13 18:13:33 -08:00
Treehugger Robot
ac68248051 Merge "Add "legacy_android10_support" to "apex"" 2019-12-14 02:07:16 +00:00
Chih-hung Hsieh
35d562c8a4 Merge "Install rust tests under nativetest(64)"
am: a2fce65a9e

Change-Id: Ic1c6f6325b4cc32c806d3671417964463491e750
2019-12-13 17:27:46 -08:00
Chih-hung Hsieh
a2fce65a9e Merge "Install rust tests under nativetest(64)" 2019-12-14 01:14:44 +00:00
Chih-hung Hsieh
1dbc0f428a Merge "Add x86 device output for Rust"
am: 738bff96f1

Change-Id: I6ddbccfcdb7db3d590dea26b09191c66f1d74fb5
2019-12-13 14:57:58 -08:00
Chih-hung Hsieh
738bff96f1 Merge "Add x86 device output for Rust" 2019-12-13 22:54:10 +00:00
Chih-Hung Hsieh
9a4a7bab41 Install rust tests under nativetest(64)
* Now the installation directories match those for C/C++ tests:
  * The relative_install_path refers to path under nativetest(64).
  * Device test files are installed in data/nativetest(64).
  * Automatically generated configuration files and copied test binaries
    are still in the "testcases" directory.
* Change host test configuration to run test binary files
  in testcases/<mutated_module_name>/<arch_type>/<stem_name>

Bug: 140938178
Test: atest --include-subdirs under external/rust/crates
Change-Id: I4b29afb897f4ba8749e87f79857c5b1a959bb2b0
2019-12-13 14:51:32 -08:00
Paul Duffin
260f9a212f Merge "Separate sdk membership support out of cc/library.go"
am: edb4e21de5

Change-Id: I919a554cecbc62b10cf232796a04246c20a90d24
2019-12-13 14:11:53 -08:00
Treehugger Robot
edb4e21de5 Merge "Separate sdk membership support out of cc/library.go" 2019-12-13 21:40:21 +00:00
Jooyung Han
5f27860770 Merge "Install flattened/unflattend apexes for GSI"
am: e676810de5

Change-Id: I9495e6cf40d03caae1f1d5e46a3a89ab304711b9
2019-12-13 13:35:08 -08:00
Nick Desaulniers
eb20744361 Revert "Revert "soong: upgrade Android platform to clang-r370808""
This reverts commit 862eb4648a.

Re-upgrades the compiler to clang-r370808, after first dealing with
regressions in ndk_translate and execute only pages.

Bug: 139945549
Bug: 145807809
Bug: 145827049
Bug: 145825270
Test: atest \
  CtsSelinuxTargetSdk27TestCases:android.security.SELinuxTargetSdkTest#testNoExecuteOnly
Test: m ndk_translation_host_unit_tests && \
  ./out/host/linux-x86/nativetest/ndk_translation_host_unit_tests/ndk_translation_host_unit_tests
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: I714b582faffa8c92384818a7b12338d621968548
2019-12-13 13:13:06 -08:00
Treehugger Robot
e676810de5 Merge "Install flattened/unflattend apexes for GSI" 2019-12-13 21:10:56 +00:00
Paul Duffin
255f18e584 Decouple addition of new sdk member types from sdk code
Previously, adding a new SdkMemberType would require adding a new
sdkMemberListProperty instance to the sdkMemberListProperties as well
as adding a new property into the sdkProperties struct. They are
potential sources of conflict and couple the sdk code with all the
packages that add members to it. This change switched to a
registration model that allows each package to register its sdk
member types decoupling them from the sdk code.

Adds an SdkPropertyName() method to SdkMemberType that specifies the
name of the property to use in the sdk/sdk_snapshot. Also provides
an SdkMemberTypeBase struct to be used by providers of SdkMemberType
implementations.

SdkMemberType instances are registered using the
RegisterSdkMemberType() func which sorts the registered instances
by their SdkPropertyName() to ensure the behavior is consistent and
not affected by order of registration.

When creating a new sdk module a dynamicSdkMemberTypes instance is
created that contains the following:

* A properties struct is created dynamically that contains a field for
  each registered SdkMemberType, corresponding to that type's
  SdkPropertyName().

* A list of sdkMemberListProperty instances is also created, one for
  each registered SdkMemberType.

The dynamicSdkMemberTypes instance is cached using a key that uniquely
identifies the set of registered types just in case new types are
registered after one has been created, e.g. by tests.

Bug: 142918168
Test: m checkbuild
Change-Id: I4bf2bf56a2a49025aa41454048bc1e8ccc6baca2
2019-12-13 20:07:33 +00:00
Paul Duffin
8f2425e6b4 Improve handling of generated include dirs
am: 57b9e1da75

Change-Id: I1ae18368680d6d73d1c9094354769d5923777b15
2019-12-13 04:01:27 -08:00
Paul Duffin
d54bbb878c Generalize common property extraction
am: a7cd8c8344

Change-Id: I6ccbf28f66343f7bce836bb0cbdfdbfcaecf4ce8
2019-12-13 04:01:23 -08:00
Paul Duffin
2f6bc09fee Separate sdk membership support out of cc/library.go
Bug: 142918168
Test: m checkbuild
Change-Id: I4a7f2af8e0b41feca2b5a431b42ad03bbfe94b0c
2019-12-13 10:43:10 +00:00
Paul Duffin
57b9e1da75 Improve handling of generated include dirs
The exported include dirs includes both source and generated
directories (e.g. containing aidl generated headers). The latter are
always arch specific so if they are present they make all the include
directories arch specific.

This change separates the source and generated include dirs so that
the source include dirs (which are probably not arch specific) can be
optimized separately from the arch specific generated include dirs.

The FilterPathList() func was refactored to extract the more general
FilterPathListPredicate() func.

A number of tests needed to be updated to reflect the more optimal
snapshot creation.

Bug: 142918168
Test: m checkbuild
Change-Id: Id1a23d35a45b250ae2168834f9c2a65c86a5fd77
2019-12-13 09:59:48 +00:00
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
Jooyung Han
a8c5109aee Merge "Expose some factories for aidl_test.go"
am: cf96a82fbd

Change-Id: Ie8da39211dc8ac651ffee50183a5d8e1e4e5d987
2019-12-12 22:05:36 -08:00
Treehugger Robot
cf96a82fbd Merge "Expose some factories for aidl_test.go" 2019-12-13 05:51:38 +00:00
Jiyong Park
d46f671d1a Merge "add apex_pubkey and apex_manifest.pb to the bundle module"
am: 90872f1c9c

Change-Id: Ie968ace7eea5b34dc8487b0d590df53291a0a4eb
2019-12-12 19:18:46 -08:00
Chih-Hung Hsieh
1f202e9bbb Add x86 device output for Rust
* Copy current configuration from
  rust/config/x86_64_device.go and
  cc/config/x86_device.go.

Bug: 145608833
Test: build rust modules for aosp_x86-userdebug
Change-Id: Ie4951dd4703596f8e503d813a6c4ac03c1f20980
2019-12-12 19:18:06 -08:00
Treehugger Robot
90872f1c9c Merge "add apex_pubkey and apex_manifest.pb to the bundle module" 2019-12-13 03:16:31 +00:00
Elliott Hughes
d329254328 Switch the mac back to toybox xargs.
Test: make sdk
Change-Id: I29a6b0404e248553ecfdfdeb263aa9cd0d2fdb3e
2019-12-12 16:52:06 -08:00
Jooyung Han
214bf37311 Add "legacy_android10_support" to "apex"
APEXes with "legacy_android10_support" will have apex_manifest.json for
compatibility as well as apex_manifest.pb.

Bug: 143951586
Test: m (soong tests)
Change-Id: I019252aee5a9423f4b180ba1026e6e99c9961437
2019-12-13 08:47:16 +09:00
Paul Duffin
5a1b8920f2 Added support for using static libraries in sdk snapshot
am: 9ab556fd8e

Change-Id: I69c49bcd5560845e68de730493b326bee5bc65c8
2019-12-12 06:17:37 -08:00
Paul Duffin
07d3de0b12 Discard duplicate operations to copy files to snapshot
am: c62a5107f8

Change-Id: I2a6ce2b29d4a52177f35019efa4cceaba8b511ce
2019-12-12 06:15:23 -08:00
Paul Duffin
eb66f93eea Dedup prebuilt cc library creation
am: ac6e608da7

Change-Id: If445333cebcbebb8cb3588f05e33590afbd3280a
2019-12-12 06:15:20 -08:00
Paul Duffin
0dc5d2145c Sort sdkProperties by package and then name
am: fa02872b26

Change-Id: Ib37b507474f8b3a0a32dcf1df9eb3388d65e585f
2019-12-12 06:13:20 -08:00
Paul Duffin
9ab556fd8e Added support for using static libraries in sdk snapshot
Parameterized the cc.librarySdkMemberType to allow it to support
both static and shared libraries. Created two instances, one for shared
and one for static libraries. A follow up change will add support for
libraries that can be both.

Added *librarySdkMemberType to nativeMemberInfo as information from
there is needed when generating the snapshot.

Made organizeVariants() func a method of *librarySdkMemberType so that
it can initialize the new field. Moved it to be with all the other
methods of that type.

Added host and device tests for the new module type.

Bug: 142918168
Test: m nothing
Change-Id: I00b1e8424b9d81f7d15edc4883971d10668ec2cc
2019-12-12 11:37:39 +00:00
Paul Duffin
c62a5107f8 Discard duplicate operations to copy files to snapshot
Header include directories are copied into the snapshot separately for
each cc library that exports them. However, the same include
directories can be exported by multiple libraries which caused ninja
error because two separate rules (albeit identical) were defined to
create the same files.

This avoids the duplicate ninja rules by detecting and discarding
duplicate copies, i.e. where the source and destination are the same.
It will also report an error if two or more different source files are
copied to the same destination.

Bug: 142918168
Test: m nothing
      added test and verified it produced two identical copy rules
      fixed code and verified duplicate copy rules had been eliminated

Change-Id: I39e37405035bee5093f96e03248e9e29ed30962c
2019-12-12 11:37:39 +00:00
Paul Duffin
ac6e608da7 Dedup prebuilt cc library creation
Bug: 142918168
Test: m checkbuild
Change-Id: I82cf3b098f024a6ab0884642b21b2238864942a2
2019-12-12 11:37:39 +00:00
Paul Duffin
fa02872b26 Sort sdkProperties by package and then name
Bug: 143678475
Test: m nothing
Change-Id: Ib610b799e7d86b413f4321239535a1caf4775ed9
2019-12-12 11:31:59 +00:00
Jiyong Park
500e305fe2 Merge "AndroidMk for the hostdex library has separate AndroidMkEntries"
am: aafc04ea5c

Change-Id: I3a19ffd2754a73e2b7cf20c1bceaf3d6e7c24a09
2019-12-11 19:32:48 -08:00
Jiyong Park
aefa4ba9d0 Merge "AndroidMkEntries() returns multiple AndroidMkEntries structs"
am: 8ce3c2c8df

Change-Id: I1ef99b366e5d3c01b30a7ce41192033682d17842
2019-12-11 19:32:23 -08:00
Treehugger Robot
aafc04ea5c Merge "AndroidMk for the hostdex library has separate AndroidMkEntries" 2019-12-12 03:24:03 +00:00
Treehugger Robot
8ce3c2c8df Merge "AndroidMkEntries() returns multiple AndroidMkEntries structs" 2019-12-12 03:23:06 +00:00
Tri Vo
e6f58d4a61 Merge "cc_fuzz: add "data" field"
am: 3606b00176

Change-Id: I905ed98abd732bd4fc0953ff7f647f429bc0239e
2019-12-11 15:07:28 -08:00
Tri Vo
3606b00176 Merge "cc_fuzz: add "data" field" 2019-12-11 23:04:57 +00:00
Ulyana Trafimovich
8f9385a37b Revert "Use boot image extension for framework libraries."
am: 3fae7662ee

Change-Id: Id99020b6535cf3cbcb7974243eb6171250ded41c
2019-12-11 10:40:48 -08:00
Ulyana Trafimovich
3fae7662ee Revert "Use boot image extension for framework libraries."
This reverts commit 4d2eeed0da.

Reason for revert: breaks avd/avd_boot_health_check test
  on cf_x86_phone-userdebug_coverage on branch rvc-release
  (the device fails to boot).

Test: m
Test: aosp_walleye-userdebug boots

Bug: 145749668

Exempt-From-Owner-Approval: revert

Change-Id: Ie1d93a200222e26461c1bcd384fdb69b7351e259
2019-12-11 18:29:19 +00:00
Jiyong Park
55bd98b2d9 AndroidMk for the hostdex library has separate AndroidMkEntries
Previously, the -hostdex library was emitted using the ExtraFooters.
Now, it has its own AndroidMkEntries, which can be returned together
with the AndroidMkEntries for the main library.

Bug: 128708192
Test: m
Change-Id: Ic9eb0d3839572ed340ccbc5fc6c4b54241e1cb24
2019-12-11 17:27:07 +09:00
Jiyong Park
0b0e1b9804 AndroidMkEntries() returns multiple AndroidMkEntries structs
AndroidMkEntries now returns multiple AndroidMkEntires so that a module
can emit multiple Make modules if needed.

Bug: 128708192
Test: m

Change-Id: I56b6f76d22943b80329951c5acb80a1b932441ad
2019-12-11 17:25:27 +09:00
Paul Duffin
2819b77de4 Exclude META-INF/ from repackaged source jar in snapshot
am: ce482dce02

Change-Id: I12abc806d5c96dfa8d6bdd65d44f1d19b6cf9bfd
2019-12-11 00:18:32 -08:00
Paul Duffin
ce482dce02 Exclude META-INF/ from repackaged source jar in snapshot
Prevents the META-INF/MANIFEST.MF file from the source jar from being
copied to the snapshot zip file.

Bug: 143678475
Test: m conscrypt-module-sdk
      manually check contents of generated zip

Change-Id: I6eca1435dfc25b562e49de46b049fa81cf8daf90
2019-12-11 08:13:07 +00:00
Nikita Ioffe
22aece9689 Merge "Add property to apex soong modules to generate an APEX without hashtree"
am: 32fc94d097

Change-Id: I4f92271ad8837f5bc041626550482523b323d3b4
2019-12-10 18:01:55 -08:00
Treehugger Robot
32fc94d097 Merge "Add property to apex soong modules to generate an APEX without hashtree" 2019-12-11 01:51:48 +00:00
Elliott Hughes
d6d7dbb192 Switch to our hermetic bc.
am: e2d33d52e1

Change-Id: I4a0730d2c29dfd4c03171163bad8ad69ddd8c454
2019-12-10 14:01:23 -08:00
Elliott Hughes
e2d33d52e1 Switch to our hermetic bc.
Test: treehugger
Change-Id: I12142a7f54190edd21e719bbd8f5df831ada6161
2019-12-10 10:12:18 -08:00
Logan Chien
0fa84ea03c Merge "Run ABI checks for shared libs exported by APEX"
am: e87dae6083

Change-Id: Ifcc584cf6e3f8c72268c149e1f9599be81b515fd
2019-12-10 09:42:20 -08:00