Commit Graph

11787 Commits

Author SHA1 Message Date
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
Jaewoong Jung ccbb393651 Add android_app_import.
This is an initial version that handles the most basic cases.

Bug: 128610294
Test: app_test.go + prebuilt webview.apk
Change-Id: Ic525559aad5612987e50aa75b326b77b23acb716
2019-05-01 10:06:47 -07:00
Paul Duffin ff5a177879 Remove unnecessary core library neverallow rules
The rules that restricted access to core library targets are no longer
required as they have been replaced with visibility rules. The
visibility rules are safer because they check all dependencies whereas
the neverallow rules that have been removed only checked dependencies
in the libs property and so missed dependencies in static_libs and
java_libs properties.

(cherry picked from 8e8c01c382)

Bug: 112158820
Test: m core-tests
Change-Id: I3b50b705b7cd6fcdc55d26cd71b9149b3abd2b88
Merged-In: Ibfef74db0769992266ebadf445836d2a183df3f7
2019-05-01 09:39:32 +01:00
Elliott Hughes 6b3a0ddf0b xz: force use of the prebuilt.
Also comment why we can't yet do the same for bzip2.

Test: treehugger
Change-Id: I34d5bc0076f5790fcb01c185ef6d08824a4f6142
2019-04-30 22:20:43 -07:00
Mathieu Chartier 3f7ddbba98 Enable app image startup cache for preopted apps
To get performance benefits here for apps that aren't installed
through the play store.

Bug: 130217075
Bug: 131310042
Test: make

(cherry picked from commit 8910722e71)

Merged-In: I46dc3e4a588be52f359577ca1f0fd2dcd440c4bf
Change-Id: Ia98c4e5447b63f6362a4bd5c617a518784f0ef53
2019-04-30 17:01:13 -07:00
Elliott Hughes 475806f08b Merge "Revert "bzip2/xz: use the prebuilts.""
am: 77b3fec7c1

Change-Id: I9b618ea68fc17c56b8424947665c2048c609c4b0
2019-04-30 15:55:25 -07:00
Elliott Hughes 77b3fec7c1 Merge "Revert "bzip2/xz: use the prebuilts."" 2019-04-30 22:39:52 +00:00
Colin Cross 828a488720 Merge "Remove services.art from known_nondeterminism.whitelist"
am: 42603c4ab5

Change-Id: I0a9f690cdd3a9bb14a4efceec156cbdca8802bde
2019-04-30 15:19:18 -07:00
Colin Cross 42603c4ab5 Merge "Remove services.art from known_nondeterminism.whitelist" 2019-04-30 21:56:15 +00:00
Elliott Hughes 3d87302a6d Revert "bzip2/xz: use the prebuilts."
This reverts commit e114b3f0a9.

Build broke as follows:

out/soong/host/linux-x86/bin/sbox --sandbox-path out/soong/.temp --output-root out/soong/.intermediates/system/update_engine/ue_unittest_disk_imgs/gen -c 'tar -jxf system/update_engine/sample_images/sample_images.tar.bz2 -C __SBOX_OUT_DIR__/gen disk_ext2_1k.img disk_ext2_4k.img disk_ext2_4k_empty.img disk_ext2_unittest.img' __SBOX_OUT_DIR__/gen/disk_ext2_1k.img __SBOX_OUT_DIR__/gen/disk_ext2_4k.img __SBOX_OUT_DIR__/gen/disk_ext2_4k_empty.img __SBOX_OUT_DIR__/gen/disk_ext2_unittest.img 
"bzip2" is not allowed to be used. See https://android.googlesource.com/platform/build/+/master/Changes.md#PATH_Tools for more information. 
tar: Child returned status 1 
tar: Error is not recoverable: exiting now 
sbox command (tar -jxf system/update_engine/sample_images/sample_images.tar.bz2 -C out/soong/.temp/sbox849645882/gen disk_ext2_1k.img disk_ext2_4k.img disk_ext2_4k_empty.img disk_ext2_unittest.img) failed with err "exit status 2" 

Change-Id: I3fe7100886ea3b748f5a6b5fc6d2811391bb72a8
2019-04-30 21:55:23 +00:00
Nicolas Geoffray f731037778 Merge "Add ART folks to owner of dexpreopt related file."
am: 327a7e7420

Change-Id: I3a7eda67410752f3d10e8a08b59f0fdfb9fbd2e7
2019-04-30 13:57:46 -07:00
Nicolas Geoffray 327a7e7420 Merge "Add ART folks to owner of dexpreopt related file." 2019-04-30 20:36:16 +00:00
Elliott Hughes 1061cb4b53 Merge "bzip2/xz: use the prebuilts."
am: dc2699cfde

Change-Id: I9b5f36fc9efb7e7493ad6c0c28bc4602a16e93e3
2019-04-30 13:07:25 -07:00
Elliott Hughes dc2699cfde Merge "bzip2/xz: use the prebuilts." 2019-04-30 19:48:27 +00:00
Yi Kong acee27cd72 Strip libgcc to only keep fallback symbols
We use libgcc as fallback for symbols not present in libclang_rt
builtins, however we didn't know what exact symbols were being used,
some may not be intended to fallback.

Create libgcc_stripped, which only contains unwind symbols from libgcc.

Bug: 29275768
Test: bionic-unit-tests
Change-Id: I5b349fa6138e51663bf3b67109b880b4356da8e8
2019-04-30 10:07:00 -07:00
Nicolas Geoffray 5b6061d6aa Add ART folks to owner of dexpreopt related file.
Test: N/A
Change-Id: If8c7b1801e4a08e38ab75b459d9d8eff22804f06
2019-04-30 15:33:49 +01:00
Nicolas Geoffray fed3ab3053 Pass other boot classpath locations to the apex image.
am: feef2ef4d7

Change-Id: I669b4e6ba2aef3cafd6392f4904dd940f54ee4a6
2019-04-30 06:46:19 -07:00
Nicolas Geoffray feef2ef4d7 Pass other boot classpath locations to the apex image.
In order to evaluate the impact of framework classes being in an image.

Test: m
Bug: 119800099
Exempt-From-Owner-Approval: this is only for an experimental config, which we would like to see
the performance before build snap.
Change-Id: Ib0d3acf8d2718ee443b3bffe8122a54f92257691
2019-04-30 13:33:10 +00:00
Jiyong Park deba159e56 Merge "Prebuilt APEXes are recoreded in apexkeys.txt"
am: 1341942d86

Change-Id: If24dc20f3238bc1d7a84f2b2485871173b9e5e66
2019-04-29 20:27:41 -07:00