aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Soong: Add build_error proto raw file to $(OUT_DIR).Patrice Arruda2019-09-046-8/+297
| | | | | | | | | | | | | | Soong_ui produces a build_error raw file to $(OUT_DIR) where the file contains a list of build action errors. Each build action error represents an error raised by a command. The build_error file is populated if there was a build error. Bug: b/132969697 Test: Ran m for successful build. Introduced a broken build change, ran m and verified using printproto that build_error was generated successfully. Change-Id: I690ca1778b4e56f144a3173ba1d16d8494c32c15
* Soong: Add BUILD_MODULES build action in soong_ui.Patrice Arruda2019-09-043-1/+51
| | | | | | | | | | | | | | | | There was one case that did not work: 1) Create dir in root source tree 2) Run "m libc" The build would fail as it was using the mma logic. A separate one named BUILD_MODULES was added to allow building specific modules in any directories using the "m" command. Bug: b/130049705 Test: unit test cases, ran "m libc" in a tmp directory inside of the source tree. Change-Id: I8d23e685a673a311001ee8edd89bd73b662392dd
* Soong: Use ctx.Writer in flag usage for dumpVar and dumpVars in soong_ui.Patrice Arruda2019-09-041-15/+15
| | | | | | | | | | ctx.Writer is recommended stream to use for standard io. Fixes: b/135487952 Test: Lunch and executed ./out/soong_ui --dumpvar-mode and --dumpvars-mode to check the usage is output to the console. Change-Id: I38351ebdb05f49f92d6b4bfb0423092299d1c5ea
* soong_ui: Add --build-mode flag in soong_uiPatrice Arruda2019-09-041-4/+94
| | | | | | | | | | | | | | | The --build-mode flag is a new flag in soong_ui that accepts a build action (m, mm, mmm, mma, mmma), the directory where the build action is occuring and an optional list of build arguments and invokes the build option. This is to deprecate the build actions behavior in envsetup.sh and start using the one defined in soong_ui. Bug: b/130049705 Test: Ran lunch and ran all the build action commands in soong_ui. Ran a bunch of invalid commands such as no Android.mk file in a specific directory, invalid target name, etc... Change-Id: I88e9e59f47f8c5cdc872fb83a0f3f0a0919885b6
* soong_ui: Add build actions commands in soong_ui.Patrice Arruda2019-09-043-6/+1109
| | | | | | | | | | | Add the following build actions {BUILD_MODULES_IN_A_DIRECTORY, BUILD_MODULES_IN_DIRECTORIES} in soong_ui config so the bash code version of build commands (m, mm, mma, mmm, mmma) in build/make/envsetup.sh can be deprecated. This is to allow up to date bug fixes on the build commands. Bug: b/130049705 Test: Unit test cases Change-Id: I772db1d4e9c1da5273374d1994eb5e8f17cd52f2
* Soong: Fix the package name in metrics.proto filePatrice Arruda2019-09-046-168/+183
| | | | | | | | | | | | | | The metrics.proto needs to be imported to Google3 in order to unmarshal the build metrics data from bigstore. Cleaned up the enum names to use the Camel naming convention and renamed the build_metrics to soong_metrics to be more specific to soong and to allow quering soong_metrics files from bigstore. Bug: b/135280521 Test: lunch andf m -j. Checked if soong_metrics was generated correctly by using printproto command. Change-Id: I998c8d05db592e94a653d6ca32250b80df3c9b21
* Bring back env flag to skip checkapiLuca Stefani2019-09-041-14/+16
| | | | | | * This was removed while moving to soong Change-Id: Ibb41838b891a8a7ede48e687e8da16f87ad0a57b
* Default to the status table outputDan Willemsen2019-09-041-4/+15
| | | | | | | | | | | | | | For smart terminals, default to using the status table, using 1/4 of the terminal height (with a min of 1 and a max of 10). This behavior can still be overriden to a specific height with SOONG_UI_TABLE_HEIGHT, and turned off by setting SOONG_UI_TABLE_HEIGHT to 0. Test: m <adjust terminal height, see it shrink when it gets too short> Test: SOONG_UI_TABLE_HEIGHT=20 m Test: SOONG_UI_TABLE_HEIGHT=0 m Change-Id: I224348a29a6e07f168c92cf5514a94bd27e32618
* Perform TERM check for file writers onlyMikhail Naganov2019-09-041-3/+3
| | | | | | | | Tests use fakeSmartTerminal, this case must not be affected by the TERM setting. Test: TERM=dumb make Change-Id: Ib926a1c6ba2d8c4117d412fe351d872ccfc1c799
* Improve dumb terminal detectionMikhail Naganov2019-09-041-0/+3
| | | | | | | | | When figuring out terminal type, check whether TERM=dumb is set. Test: m nothing Test: TERM=dumb m nothing Test: m nothing | tee log Change-Id: Ie13ca99eb84b798644d618ad1c8c1fb8ec8bb049
* Color long running durations when using action table outputColin Cross2019-09-041-9/+24
| | | | | | | | | When printing the action table, color the duration of commands that have been running for 30 seconds yellow, and commands that have been running for 60 seconds red. Test: manual Change-Id: I61cb21b0dae10811d345cb9f62cd07915cfc69ee
* Support an action table that shows longest running actionsColin Cross2019-09-043-11/+227
| | | | | | | | | | | | If SOONG_UI_TABLE_HEIGHT is set, enable a new smart terminal display that prints the normal scrolling build history in the top region of the screen and an action table of the longest currently running actions in the bottom region of the screen. This provides better visibility into which are the longest running actions and when the build parallelism is very low. Test: manual Change-Id: I677d7b6b008699febd259110d7f9e0f98d80c535
* Use SIGWINCH to update terminal sizeColin Cross2019-09-042-11/+61
| | | | | | | | | | | Instead of reading the terminal size on every status update, register for SIGWINCH to read and store the size when it changes. This reapplies I555ad21a31a2c924ab0ca681e0c8f00df42a370a with a fix for a race condition in TestSmartStatusOutputWidthChange. Test: status_test.go Change-Id: If342cb4cc8e4ed57af9e3bb417758348c9c41247
* Revert "Use SIGWINCH to update terminal size"Colin Cross2019-09-042-54/+11
| | | | | | | | This reverts commit 49036be4076851c4ef2003339ffd1bf022dfc844. Reason for revert: TestSmartStatusOutputWidthChange is flaky Change-Id: Ie5231dbbab2887ce4c4697f3fe6e52cfd6f4dd17
* Use SIGWINCH to update terminal sizeColin Cross2019-09-042-11/+54
| | | | | | | | Instead of reading the terminal size on every status update, register for SIGWINCH to read and store the size when it changes. Test: status_test.go Change-Id: I555ad21a31a2c924ab0ca681e0c8f00df42a370a
* Make status line boldColin Cross2019-09-042-13/+15
| | | | | | | | Bolding the status line provides differentiation between output of each command. Test: status_test.go Change-Id: I9d46761e69c5af0a0aa86c7921e121cfd2a3fc82
* Move all output through StatusOutputColin Cross2019-09-048-9/+53
| | | | | | | | Write log output through StatusOutput so that the status implementation can synchronize it with its own output. Test: status_test.go Change-Id: I917bdeeea4759a12b6b4aa6d6d86ee18a2771723
* Remove terminal.WriterColin Cross2019-09-0412-183/+90
| | | | | | | | | terminal.Writer is now just a wrapper around stdio.Stdout() without any useful functionality. Replace it with stdio.Stdout() as an io.Writer. Test: ui/terminal/status_test.go Change-Id: I5bc5476afdca950b505642f0135a3af9d37fbe24
* Move smart and dumb terminals into separate implementationsColin Cross2019-09-047-230/+352
| | | | | | | | | | | Support for smart and dumb terminals are implemented in writer.go, which makes dumb terminals much more complicated than necessary. Move smart and dumb terminals into two separate implementations of StatusOutput, with common code moved into a shared formatter class. Test: not yet Change-Id: I59bbdae479f138b46cd0f03092720a3303e8f0fe
* Add tests for status outputColin Cross2019-09-043-0/+307
| | | | | Test: status_test.go Change-Id: If3febd8fdacb0e70716d0520a41c982bd6474720
* Soong: Refactor the soong_ui arguments processing to be more like bazel.Patrice Arruda2019-09-041-45/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Tune invocations and print full diagnostics on crash for d8 and r8.Sasha Smundak2019-09-041-1/+1
| | | | | | Bug: 132766811 Test: treehugger Change-Id: Id6943008e65b9dc3479e8758445e8d679529a8cb
* Merge cherrypicks of [8673593, 8673409, 8673796, 8673797, 8673798, 8673855, ↵android-vts-10.0_r6android-vts-10.0_r5android-vts-10.0_r4android-vts-10.0_r3android-vts-10.0_r2android-vts-10.0_r1android-security-10.0.0_r48android-cts-10.0_r6android-cts-10.0_r5android-cts-10.0_r4android-cts-10.0_r3android-cts-10.0_r2android-cts-10.0_r1android-10.0.0_r6android-10.0.0_r5android-10.0.0_r47android-10.0.0_r46android-10.0.0_r4android-10.0.0_r3android-10.0.0_r2android-10.0.0_r17android-10.0.0_r11android-10.0.0_r10android-10.0.0_r1android-build-team Robot2019-07-174-14/+20
|\ | | | | | | | | | | 8673151, 8673594, 8673499, 8673799, 8673895, 8673896] into qt-release Change-Id: I4173c76b7399b84f27ab3c513f11b82a78320e77
| * fix: APEX prebuilts are disabled in platform buildJiyong Park2019-07-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This change fixes a bug that APEX prebuilts are auto-disabled in platform builds (i.e. non-unbundled builds). Bug: 137282010 Test: m com.android.conscrypt check that the apex is from prebuilt directory Change-Id: I935ef3896e80864bdcc1ca5f6fc12b63c9588c0d (cherry picked from commit 895e224d8fad6877918ef05545d7423a30d72c2b)
| * Fix the unbundled mainline module buildJiyong Park2019-07-173-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change fixes two problems: 1) the prebuilt apexes are force disabled for the unbundled builds because we need to build the modules from the source then 2) the dependencies from an sdk_library module to *.stubs.{public|system|tests} are not added for the unbundled build because the stubs modules are disabled. Bug: 137282010 Test: unbundled mainline builds are successful Test: build com.android.media and inspect the jar file to see if hiddenapi flags are there $ cd out/dist/mainline_modules_arm $ unzip com.android.media.apex apex_payload.img $ mkdir -p mnt $ sudo mount -o ro,loop apex_payload.img mnt $ dexdump2 mnt/javalib/updatable-media.jar | grep hiddenapi shows results Merged-In: I2c00af07aac4a15770d3acab011a36e2e4803bfc Change-Id: I2c00af07aac4a15770d3acab011a36e2e4803bfc (cherry picked from commit 53554e25593d6498a229d1dc89208aade4137008)
| * Revert "Don't build hiddenapi flags or encode dex for unbundled builds"Jiyong Park2019-07-172-6/+4
|/ | | | | | | | | | | | This reverts commit 7b8a567f44b3fdb30eac8211e8ed8e27fb162797. Bug: 137282010 Test: With the CL above this one, the unbundled mainline module build does not fail. Merged-In: I2f49fa7dbe1da92cb282a9bc14acd5830888ed17 Change-Id: I2f49fa7dbe1da92cb282a9bc14acd5830888ed17 (cherry picked from commit 716828ab4ec2a673e6022171bb2b52584ee8e916)
* Merge cherrypicks of [8558068, 8558825, 8558826, 8558827, 8557109, 8558018, ↵android-build-team Robot2019-07-121-4/+10
|\ | | | | | | | | | | 8558886, 8558887, 8558888, 8558889, 8558071, 8558072, 8556231] into qt-release Change-Id: I8627c84d2d0872d28a821f838cd12e6fb0e22288
| * Don't use APEX prebuilts when asan is onJiyong Park2019-07-121-4/+10
|/ | | | | | | | | | Some prebuilt APEXes are enabled with scudo, which causes crash on devices with asan. Bug: 137216042 Test: build walleye_hwasan and check if apexes are not from prebuilts Change-Id: Ic436ad06e724af952d99fb8e66358a595450eb84 (cherry picked from commit 3b98a509f19cb25e9734bb62ba0b592663ed8e4e)
* Snap for 5716396 from 0a573d798ffa8941b8028e76d0f6a6951863a6e4 to qt-releaseandroid-build-team Robot2019-07-102-1/+18
|\ | | | | | | Change-Id: I4db89b8240b41dcdd540d1ee807430cd6469f56a
| * Don't use prebuilt_apex when TARGET_FLATTEN_APEX is set to trueJiyong Park2019-07-072-1/+18
| | | | | | | | | | | | | | | | | | | | | | When the device does not support non-flattened APEX (i.e. TARGET_FLATTEN_APEX is set to true), then ignore the prebuilt_apex modules even when `prefer: true`. Bug: 136251130 Bug: 136662772 Test: build marlin, and check if /system/apex has flattened APEXes Change-Id: I9f3dfefc3bd357d6750fbb1e418937d095720b04
* | Snap for 5691606 from 43377eeb3890dcdbc8d5a391c54c5b6062f9d807 to qt-releaseandroid-build-team Robot2019-06-2710-58/+388
|\| | | | | | | Change-Id: Icf01ab02ec8c30c98a8d5ba519e0295cfc0dafc5
| * Uncompress dex in unbundled privileged appsColin Cross2019-06-253-5/+92
| | | | | | | | | | | | | | | | | | | | | | | | Mainline builds privileged apps unbundled and then uses them as prebuilts, so they need to respect the privileged flag when deciding whether or not to uncompress the dex. Bug: 135772877 Test: TestUncompressDex Change-Id: I91da7116b779ae35c0617ef77dbcb9788902370c Merged-In: I91da7116b779ae35c0617ef77dbcb9788902370c (cherry picked from commit 53a87f523b75f86008c3e0971489a06a6450a670)
| * Embed NOTICE output as an APEX asset.Jaewoong Jung2019-06-252-14/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | Instead of outputting an aggregated NOTICE file as an intermediate build resource to allow Make to include it in the final system-wide NOTICE, process and embed it as an asset in the final APEX. This allows us to update the NOTICE contents automatically when an APEX is updated. Fixes: 135218846 Test: Built mainline modules, apex_test.go Change-Id: Ic851b330fe93be1f602907d44ecc7886c3b0171b Merged-In: Ic851b330fe93be1f602907d44ecc7886c3b0171b (cherry picked from commit 14f5ff62c952350a9e2b07d9d07429b9535655de)
| * Optionally embed NOTICE files in apks.Jaewoong Jung2019-06-259-42/+278
| | | | | | | | | | | | | | | | | | | | | | | | | | If embed_notices or ALWAYS_EMBED_NOTICES is set, collect NOTICE files from all dependencies of the android_app, merge them with the app's own one (if exists), transform it to HTML, gzip it, and put it as an asset in the final APK output. Bug: 135460391 Test: app_test.go + Built Mainline modules Change-Id: I52d92e2fd19b3f5f396100424665c5cc344190d8 Merged-In: I52d92e2fd19b3f5f396100424665c5cc344190d8 (cherry picked from commit 5b425e2e20c55216c1ed13fcf047b0df33886736)
* | Snap for 5681426 from 3ad00bf196544f686eaf8b9caf8ef44d3e991744 to qt-releaseandroid-build-team Robot2019-06-221-3/+1
|\| | | | | | | Change-Id: Iac634d18c29c875d9ab74a1b4ff8cb0e10acc8bc
| * OverridableModuleBase shouldn't embed ModuleBase.Jaewoong Jung2019-06-191-3/+1
| | | | | | | | | | | | | | | | | | | | | | Individual module structs normally embed ModuleBase themselves. This caused duplicate embedding, and so made common properties like notice inaccessible. Bug: 135460391 Test: app_test.go, TreeHugger Change-Id: I5683b194e3de909d480c083a931cc7e871de1d74 Merged-In: I5683b194e3de909d480c083a931cc7e871de1d74
* | Snap for 5663820 from 6df90831b7825bcb3dc233dbc5b1e47e4316d990 to qt-releaseandroid-build-team Robot2019-06-152-16/+1
|\| | | | | | | Change-Id: I4dbcf271935f0d33b068e45ab2f4bbc93ec20fa6
| * Merge "neverallow: vintf to libhidltransport impl lib" into qt-devSteven Moreland2019-06-142-16/+1
| |\
| | * neverallow: vintf to libhidltransport impl libSteven Moreland2019-06-142-16/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Also delete useless testcase. Bug: 134961554 Test: build Change-Id: Ie76492f806757b86d94d29a736773f72ce2ab104
* | | Merge "Snap for 5652499 from 0dbeb666bc176e8ed15c42b49085b920bc698ca3 to ↵android-build-team Robot2019-06-120-0/+0
|\ \ \ | | | | | | | | | | | | qt-release" into qt-release
| * | | Snap for 5652499 from 0dbeb666bc176e8ed15c42b49085b920bc698ca3 to qt-releaseandroid-build-team Robot2019-06-121-1/+1
| |\| | | | | | | | | | | | | | Change-Id: Ibe332c123197fc8ce2f8db02bcbd63a33a3ed733
* | | | Snap for 5652499 from 0dbeb666bc176e8ed15c42b49085b920bc698ca3 to qt-releaseandroid-build-team Robot2019-06-121-1/+1
|\ \ \ \ | |/ / / |/| / / | |/ / Change-Id: I7a97c46985eab7b5fce99e42dd36801ea0f342a0
| * / Allow arch-specific `symlink_preferred_arch` properties.Roland Levillain2019-06-071-1/+1
| |/ | | | | | | | | | | | | | | | | (cherry picked from commit d9bf9be00785d10be8b961843b53b004d0c600d4) Test: m Bug: 133864678 Change-Id: Ia6e62156adda2b3a51220552bbe4dab738753674 Merged-In: Ia6e62156adda2b3a51220552bbe4dab738753674
* | Snap for 5637134 from ea68aad696009447d2db7be5bcbba60ac6d8f7a0 to qt-releaseandroid-build-team Robot2019-06-061-1/+7
|\| | | | | | | Change-Id: I425b783f960b91c21b4d18ded01a9fa262e20673
| * Fix data race and ordering consistency in apex modulesColin Cross2019-06-051-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | apexDepsMutator can be called on multiple apex modules in parallel, and then two goroutines could call BuildForApex on the same module in parallel, leading to a data race appending to apexVariations. This also results in random ordering of the entries in apexVariations. Hold a mutex around appending to apexVariations, and sort it before passing it to ctx.CreateVariations. Fixes: 134425751 Test: m nothing Change-Id: If5a3b53a778daacb3e26ac05cde872cf8eb980b3 Merged-In: If5a3b53a778daacb3e26ac05cde872cf8eb980b3 (cherry picked from commit cefa94bd27f696b975cc7c3dc97ba7ecc91ef0cc)
* | Snap for 5631427 from 9bd624c76d9152fbf8bc9cd5c4632e6376481f36 to qt-releaseandroid-build-team Robot2019-06-046-12/+182
|\| | | | | | | Change-Id: I42862862c4d7044a3a16fb7674ba34115c8a4912
| * Support using cc_prebuilt_library_shared with cc_libraryColin Cross2019-06-035-12/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | Allow a cc_prebuilt_library_shared to share the same name as a cc_library by always creating static and shared variants of prebuilts so that the variants of the source module are always a superset of the variants of the target module. Bug: 131709055 Test: TestPrebuilts Change-Id: I4afd6d37e6a986d08ad25aee69eca6d994febc6b Merged-In: I4afd6d37e6a986d08ad25aee69eca6d994febc6b (cherry picked from commit 33b2fb73335547e39bdad764af249f948eb43935)
| * Remove libc_scudo library when building asan.Christopher Ferris2019-05-311-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Running any executable built with asan and libc_scudo results in crashes. Bug: 131810078 Test: Built the media processes with the sanitizer enabled verifying Test: that the libc_scudo.so shared library is not listed in the Test: mediaextractor and the mediaswcodec binaries. Test: Build the media processes without the sanitizer enabled verifying Test: that the libc_scudo.so shared library is listed in the Test: mediaextractor and the mediaswcodec binaries. Change-Id: Ie55a0414088787ec11d85fffcb04592ed4f23c57 Merged-In: Ie55a0414088787ec11d85fffcb04592ed4f23c57 (cherry picked from commit 753d4a69d55bf7492e3c4bf193c3a906dcb23535)
* | Snap for 5616629 from 7b8a567f44b3fdb30eac8211e8ed8e27fb162797 to qt-releaseandroid-build-team Robot2019-05-302-4/+6
|\| | | | | | | Change-Id: I737bb8777869aab016645ecb2c2751ce72de6f63
| * Don't build hiddenapi flags or encode dex for unbundled buildsColin Cross2019-05-292-4/+6
| | | | | | | | | | | | | | | | | | | | | | Builds with TARGET_BUILD_APPS shouldn't build the hiddenapi flags or encode dex files even if frameworks/base exists. Bug: 133343287 Test: mainline modules build Change-Id: I0647451420fd09bb680808b35e1ad3b8f514ba46 Merged-In: I0647451420fd09bb680808b35e1ad3b8f514ba46 (cherry picked from commit 9c74a1ee855b1dcf4871a4cc40f317bd765ab7fd)