Commit Graph

11805 Commits

Author SHA1 Message Date
Colin Cross c11e0c5a39 Fix dangling rules on aosp_cf_x86_phone
aosp_cf_x86_phone uses SecondArchIsTranslated, which was leaving
a dangling rule from the oatdump rules to
out/soong/vsoc_x86/dex_bootjars/system/framework/arm/boot.art.
Consolidate the code to select targets for dexpreopting and use it
in more places to prevent references to boot images that were not
generated.

Test: m checkbuild
Change-Id: Ia4945a99ff5e575e759299106559c85f38489acc
2019-05-08 22:26:14 +00:00
Colin Cross 6c6e6cd64d Don't hide *.kotlin_module in turbine dependencies
The jars containing the merged header classes from transitive
static dependencies were stripping all of META-INF/.  Kotlin
puts metadata in META-INF that is used to map the package to
the static class that contains the package-level functions.

This also exposed that the metadata in META-INF is always
called "name.kotlin_module", so a library that contains
kotlin files with a dependency that also contains kotlin files
would shade the metadata file.  Use a unique name instead.

Fixes: 131709692
Test: m checkbuild
Change-Id: I5cd276e563206e37c4c0d90fe9f346e9396f88c0
2019-05-08 14:30:12 -07:00
Dan Willemsen 7e52fa9f33 Don't dump BUILD_BROKEN_USES_BUILD_[HOST_]SHARED_TEST_LIBRARY
These have been errors for years, and are now marked as obsolete.

Test: treehugger
Change-Id: I8055ab689ce5085df763378ad40d9b9aaa7ca85b
2019-05-08 12:38:49 -07:00
Sasha Smundak b500ce53e2 Add aaudio, amidi, camera2ndk and nativewindow NDK libraries.
Various CTS tests refer to them.
Test: treehugger
Change-Id: I455063b02ec872c430edb1c619d38323d7ffd488
2019-05-07 19:29:53 -07:00
Jaewoong Jung a5e5abc449 Implement DPI variants in android_app_import.
Bug: 128610294
Test: app_test.go
Change-Id: Ie3e558bfdb40de6b0b9df95d3b373d08a4084d7b
2019-05-07 17:55:23 -07:00
Colin Cross 222f5ee5f2 Merge "Track sources for srcjars across modules"
am: 082640d6ee

Change-Id: Ia5505e67614e1531acd9fed44491faef4596a62c
2019-05-07 10:38:18 -07:00
Treehugger Robot 082640d6ee Merge "Track sources for srcjars across modules" 2019-05-07 17:25:52 +00:00
Colin Cross 04c69f1c9d Merge "Allow module types to generate resources"
am: da2bba1d71

Change-Id: I0ad142dadec08bd50ab8fdaa1f6dada0bf24a069
2019-05-07 07:36:39 -07:00
Treehugger Robot da2bba1d71 Merge "Allow module types to generate resources" 2019-05-07 14:19:52 +00:00
Yi Kong 29ae56ede9 Merge "Exclude libgcc_stripped wherever libgcc is excluded"
am: 3277c39c6b

Change-Id: Idbe82ea4a3e5cb9a9a7c194dd0a4d8a282d56c03
2019-05-06 20:13:01 -07:00
Yi Kong 3277c39c6b Merge "Exclude libgcc_stripped wherever libgcc is excluded" 2019-05-07 02:57:24 +00:00
Patrice Arruda a3898089ba Merge "Soong: Refactor the soong_ui arguments processing to be more like bazel."
am: 565ee6ed87

Change-Id: I4dd6ef7ac341857201969a830d8caf76e28cdfd5
2019-05-06 18:32:11 -07:00
Treehugger Robot 565ee6ed87 Merge "Soong: Refactor the soong_ui arguments processing to be more like bazel." 2019-05-07 00:49:21 +00:00
Yi Kong 3d8792f7dd Exclude libgcc_stripped wherever libgcc is excluded
Test: manual testing
Bug: 130267141
Bug: 29275768
Change-Id: Icc0d50e403dc4a3592e5bf389101cdef129042df
2019-05-06 16:18:33 -07:00
Jaewoong Jung 6538ed7e72 Merge "uncompressedDex option for android_app_import."
am: ddda3ce23a

Change-Id: I61d3cefceae2d53839477c65a15e69f4e863b952
2019-05-06 14:37:09 -07:00
Jaewoong Jung ddda3ce23a Merge "uncompressedDex option for android_app_import." 2019-05-06 21:24:53 +00:00
Colin Cross 0c4ce21615 Track sources for srcjars across modules
Robolectric coverage needs a srcjar that sometimes needs to
include sources of dependencies.  Track the arguments and
dependencies necessary to jar the sources.

Test: TestIncludeSrcs
Change-Id: I9979d2b8350923a2237e743c232e6e548f54ba3b
2019-05-06 14:22:26 -07:00
Colin Cross 988708ce75 Allow module types to generate resources
Robolectric will need to generate extra resources to be added to
the jar.

Test: TestResources
Change-Id: I028f91ea8fc5d1e59e4e805876d70f57d8899f11
2019-05-06 14:22:26 -07:00
Patrice Arruda a5c2542f68 Soong: Refactor the soong_ui arguments processing to be more like bazel.
Currently, the command line argments is being processed in multiple
places. In the main soong_ui arguments, there are several if statements
that checks if a specific argument was specified in order to execute
the requested operation. This does not scale well when adding or
removing a command in the near future. In order to support the build
commands (m, mma, etc...) from the envsetup.sh in soong_ui, a refactor
was required in order to add a command rather quickly and to have the
flexibiity to unit test the command. The soong_ui arguments format is
as follows:

soong_ui <command> [<arg 1> <arg 2> ... <arg n>]

The <command> is a specific operation to be executed. The arguments
after the command are processed by the command itself.

Below is the list of changes made in this commit:

 * Created a new command infrastructure that allows adding
   or deprecating a command easily.

 * Fixed a bug when running ./soong_ui.bash directly would cause
   a panic due to index being out of range for args list.

Bug: b/130049705
Test: Below is the list of testing done on this commit:
    * Ran lunch and verified that the output is the same as the the output
      without the modifications. lunch indirectly runs soong_ui passing
      in the --dumpvar-mode (to read makefile variables such as
      TARGET_PRODUCT) and --dumpvars-mode (to build the build cache).
    * Ran ./soong_ui.bash directly (with unsupported flags and no flags)
      and the proper message appeared that soong native UI is not yet
      available.
    * Ran m, mm, mmm, mma, mmma commands.
    * Ran the make installclean command:
         make -j80 TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=eng dist DIST_DIR=/tmp/helloworld installclean
    * Ran ./out/soong_ui -j80 --make-mode PRODUCT-aosp_arm64-eng dist checkbuild tests

Change-Id: Iee4de7ec0fa4661206fda8ae1fe6fa4487d9bb22
Merged-In: Iee4de7ec0fa4661206fda8ae1fe6fa4487d9bb22
2019-05-06 14:05:52 -07:00
Patrice Arruda 2a38d89734 Merge "Soong: Add synopsis to ndk_prebuilt_* modules."
am: e0dbdd87f0

Change-Id: I757be447a4868755799c0cb40d21ed52989f9e7a
2019-05-06 11:37:08 -07:00
Treehugger Robot e0dbdd87f0 Merge "Soong: Add synopsis to ndk_prebuilt_* modules." 2019-05-06 18:12:12 +00:00
dimitry 96ba9ea6f9 Mark libgcc_stripped native_bridge_supported
am: 0e55ba6dbc

Change-Id: I5f8c9616f1c4a935f4f06c1b642dbc8177917c88
2019-05-06 10:47:41 -07:00
dimitry 0e55ba6dbc Mark libgcc_stripped native_bridge_supported
Test: make
Change-Id: I04e86a4deb3e743a63fc6df199ee0c1a7deb9e48
2019-05-06 10:58:10 +02:00
Colin Cross 7e793aa12b Merge "Support install-clean and data-clean"
am: 6ff39230e8

Change-Id: I1657ca7f833923b5c85a19546ed149a89a588e6e
2019-05-03 17:07:15 -07:00
Treehugger Robot 6ff39230e8 Merge "Support install-clean and data-clean" 2019-05-03 23:38:40 +00:00
dimitry 9da19e15ee Merge "Add native_bridge target to Android.bp"
am: ec89e4c65c

Change-Id: I90803e4cac6fccdaaabc9d1ba3fb01491bb9bd65
2019-05-03 16:08:33 -07:00
Jaewoong Jung acf18d7c63 uncompressedDex option for android_app_import.
This also partially consolidates shouldUncompressDex implementations.

Bug: 128610294
Test: TreeHugger
Change-Id: I7cea5a3890ddd473f63c0738a35af067455b5c4d
2019-05-03 15:58:41 -07:00
Treehugger Robot ec89e4c65c Merge "Add native_bridge target to Android.bp" 2019-05-03 22:23:00 +00:00
Colin Cross 806fd94bed Support install-clean and data-clean
Allow install-clean as an alias for installclean and data-clean as
an alias for dataclean.

Test: m install-clean
Change-Id: I9c97d60572a524ad68caecd26d52bfb987468075
2019-05-03 13:38:57 -07:00
Elliott Hughes aeb80db696 Merge "Allow the host expr."
am: b0e7320fbc

Change-Id: Iacdc734085ecff25235ea94d09018070f3d1da3a
2019-05-03 11:29:51 -07:00
Elliott Hughes b0e7320fbc Merge "Allow the host expr." 2019-05-03 17:24:00 +00:00
dimitry 1f33e40972 Add native_bridge target to Android.bp
This allows us to build guest libraries for the native bridge for
arm/arm64 architectures.

Bug: http://b/77159578
Test: make
Change-Id: I35520ca456105ddadd456c78a4eb1e6de39147c5
2019-05-03 15:33:28 +02:00
Yi Kong 6e14640082 Merge "Strip libgcc to only keep fallback symbols"
am: 940ef9bc89

Change-Id: I98df02ead7f6cca4e76ec92d4f880de4e03f5b5c
2019-05-03 01:17:03 -07:00
Yi Kong 940ef9bc89 Merge "Strip libgcc to only keep fallback symbols" 2019-05-03 07:52:18 +00:00
Sasha Smundak 4c79df0e28 Merge "Fix use_embedded_native_libs handling for android_test"
am: 0e7dbebe7e

Change-Id: Id3da0d134a3598d891ee242e65443f4c1c10e25b
2019-05-02 15:36:03 -07:00
Treehugger Robot 0e7dbebe7e Merge "Fix use_embedded_native_libs handling for android_test" 2019-05-02 22:10:29 +00:00
Elliott Hughes 3e0a335c89 Merge "xz: force use of the prebuilt."
am: 945c72660d

Change-Id: Ia707ca3df0fe46e6e0305f56aa9a349c6afa0594
2019-05-02 14:46:40 -07:00
Elliott Hughes 945c72660d Merge "xz: force use of the prebuilt." 2019-05-02 21:20:52 +00:00
Colin Cross 74e9718189 Merge "Support robolectric_test"
am: 5346d07108

Change-Id: I3cfaed80b45ef76d0be1769e35ea379896fcbcbd
2019-05-02 09:49:58 -07:00
Colin Cross 5346d07108 Merge "Support robolectric_test" 2019-05-02 16:37:33 +00:00
Jaewoong Jung 5fa44dfb04 Merge "Add android_app_import."
am: e7d52c779f

Change-Id: I28dba5eeceda144703b416d541c66b13970f823f
2019-05-02 07:11:35 -07:00
Jaewoong Jung e7d52c779f Merge "Add android_app_import." 2019-05-02 14:00:22 +00:00
Colin Cross d2c3fb93b6 Merge "Reverse merge order of resources and implementation"
am: b5ad835dfe

Change-Id: I61bfcc5bf2f8325aa393893ec44378db8c88a831
2019-05-01 20:42:51 -07:00
Treehugger Robot b5ad835dfe Merge "Reverse merge order of resources and implementation" 2019-05-02 03:04:24 +00:00
Colin Cross 0ef0816727 Support robolectric_test
robolectric_test will compile a suite of tests that run in
robolectric.  For now it also generates a Run* rule, later
that will be removed in favor of atest.

Bug: 123248659
Test: m RunSettingsLibRoboTests
Change-Id: I12407d0b0d639e31c1969077ba787e8985e6a506
2019-05-01 16:41:44 -07:00
Mathieu Chartier 8a8f4d5199 Merge "Enable app image startup cache for preopted apps"
am: 60a839dd42

Change-Id: I4082b861d48d028532625bf9280e9730ab6cb793
2019-05-01 13:49:33 -07:00
Mathieu Chartier 60a839dd42 Merge "Enable app image startup cache for preopted apps" 2019-05-01 20:29:20 +00:00
Sasha Smundak 6ad772597d Fix use_embedded_native_libs handling for android_test
`use_embedded_native_libs: true` should cause
`--extract-native-libs=false` be added to the manifest_fixer invocation,
and it was not happening.
There are also minor naming improvements.

Bug: 117618214
Test: treehugger and 'atest CtsDynamicLinkerTestCases' after
cts/tests/tests/dynamic_linker has been converted to Android.bp.

Change-Id: I93ec2aed3f3b185d320e56b1b4eebb71339b81ee
2019-05-01 13:16:22 -07:00
Elliott Hughes 3a653f419b Allow the host expr.
(Kernel builds require GNU unary + extension.)

Bug: https://issuetracker.google.com/131747477
Test: treehugger
Change-Id: I404db44d2ad0503d571d6f554a20445ab36aa7de
2019-05-01 12:52:25 -07:00
Paul Duffin 1e0ae9f523 Remove unnecessary core library neverallow rules
am: ff5a177879

Change-Id: Iad4785586714383726fa89d659f4e2f8df0d9830
2019-05-01 12:46:01 -07:00