Commit graph

9371 commits

Author SHA1 Message Date
Elliott Hughes
3a1fd8e0a1 Switch to toybox ln(1).
Test: treehugger
Change-Id: Ia52e73e87a6c4648285d2340908013cd8528d221
2019-01-10 21:43:11 +00:00
Elliott Hughes
0bd4ab5334 Merge "Switch to toybox expr(1)." 2019-01-10 21:40:37 +00:00
Treehugger Robot
20a8856c8f Merge "Add BUILD_USERNAME and BUILD_HOSTNAME" 2019-01-10 21:29:47 +00:00
Colin Cross
863ac187ce Merge changes Ice10d0cc,I83ef48cb
* changes:
  Use latest SDK version for current in PDK builds
  Split out sdk.go from java.go
2019-01-10 18:53:17 +00:00
Treehugger Robot
dd106202a8 Merge "Handle Jacoco filters" 2019-01-10 18:22:17 +00:00
Elliott Hughes
6491f8df60 Switch to toybox expr(1).
Test: treehugger
Change-Id: Ib015c70841504d74fd0272a8ca6ecb3c617fb759
2019-01-10 17:04:57 +00:00
Elliott Hughes
8ad233538b Merge "Switch to toybox echo(1)." 2019-01-10 16:38:36 +00:00
Treehugger Robot
28d8079294 Merge "Allow modules to disable stripping when dexpreopting" 2019-01-10 08:58:01 +00:00
Colin Cross
98fd57460f Use latest SDK version for current in PDK builds
PDK builds need to use the latest SDK version instead of "current"
to match the behavior of Make.

Bug: 118634643
Test: sdk_test.go
Change-Id: Ice10d0ccb4066f27ce5839fc96a4026510057121
2019-01-10 07:09:35 +00:00
Colin Cross
fb6d781202 Split out sdk.go from java.go
Split out SDK handling functions from java.go to sdk.go and tests
from java_test.go to sdk.go.

Test: sdk_test.go
Change-Id: I83ef48cbe5230572c1d4ecc0e89021d2f7c71b76
2019-01-10 07:09:29 +00:00
Elliott Hughes
e1184be0c0 Switch to toybox echo(1).
Test: treehugger
Change-Id: Ie40cce5113f4b9bd17ec28c572952aacf1057804
2019-01-10 06:25:25 +00:00
Elliott Hughes
c33514e3b6 Revert "Switch to toybox cp(1)."
This reverts commit 9886695763.

Reason for revert: http://b/122623408
Bug: http://b/122623408

Change-Id: Ib9ec92f9dd6f9a0db7f598b10241b0474e46aba0
2019-01-10 06:03:25 +00:00
Colin Cross
8c6d250c0b Allow modules to disable stripping when dexpreopting
Add a no_stripping property and pass it to dexpreopt to disable
stripping for a module.

Bug: 122610462
Test: dexpreopt_test.go
Change-Id: I5a4b005633bb8b1ea373e9eeb420aa0999de17ab
2019-01-10 05:39:50 +00:00
Colin Cross
ed918b77bb Merge "Don't strip when dexpreopt is disabled" 2019-01-10 05:08:55 +00:00
Treehugger Robot
cd21d46df8 Merge "goma_ctl.py ensure_start in Soong UI." 2019-01-10 03:55:22 +00:00
Yoshisato Yanagisawa
2cb0e5df53 goma_ctl.py ensure_start in Soong UI.
As suggested in b/118390303#comment18, let me run
"goma_ctl.py ensure_start" in soong UI.

Bug: 118390303
Test: stop compiler_proxy, and execute following command:
Test: USE_GOMA=true lunch aosp_arm-eng
Test: and confirms compiler_proxy is running.
Change-Id: I859daae6ae2399c5b6bce2fafd874dfdb7c6aae0
Signed-off-by: Yoshisato Yanagisawa <yyanagisawa@google.com>
2019-01-10 10:14:16 +09:00
Jiyong Park
b07885714c Rename non-stubs variant of a lib if it is included in APEX
If a lib is directly included in an APEX (via native_shared_libs
property) and the lib has stubs (via stubs.versions property), then the
ordinary non-stubs variant of the library is renamed to
<libname>.bootstrap in the makefile. At the same time, the stubs variant
of the lib becomes visible and it's name is <libname>.

This ensures that modules in Android.mk build against the stubs
variant thus preventing them from using private APIs in the lib.

The non-stubs variant, however, is used if the module explicitly has
set the new 'bootstrap' property to true. This is useful for building
some early binaries (such as init and vold) which need to run before
APEXes are activated. Since they can't use the bionic libs from the
runtime APEX, they should use the bionic libs left in the system
partition which is called the boostrap bionic.

Bug: 120266448
Test: m
Test: m with https://android-review.googlesource.com/c/platform/bionic/+/849044

Change-Id: I882b8aeb5b29460f07b4424e4f8eb844d6c9a9b0
2019-01-10 09:57:29 +09:00
Jiyong Park
10ed054a6b Merge "Add PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES" 2019-01-09 23:33:51 +00:00
Colin Cross
cbed657b74 Don't strip when dexpreopt is disabled
If dexpreopt is disabled for a module then classes.dex must not be
stripped.

Bug: 121377197
Test: m WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY=true
Change-Id: Icfa48804cf02291874ac6623c9b9297821ac8ce6
2019-01-09 19:47:47 +00:00
Sasha Smundak
e5c5317f44 Handle Jacoco filters
Test: treehugger
Change-Id: I8bf242cdb4709d086ff0806c143ff03ad2e5cd30
2019-01-09 19:30:38 +00:00
Elliott Hughes
e0e244130f Switch to toybox du(1).
Test: treehugger
Change-Id: Id66705f35e82ed25af6dbd5a131ce90ceba60912
2019-01-09 09:39:02 -08:00
Elliott Hughes
6cf911150a Merge "Switch to toybox cp(1)." 2019-01-09 16:52:19 +00:00
Nicolas Geoffray
bb02d6033e Merge "Preopt: Pass -Xbootclasspath: arg to dex2oat." 2019-01-09 12:37:15 +00:00
Jiyong Park
7f67f48cbb Add PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES
It is a list of <module_name>:<manifest_name> pairs. When the module
name of an APK or an APEX matches with <module_name>, then its app
manifest name is overridden to <manifest_name>.

<module_name> and <manifest_name> can be patterns as in
com.android.%:com.mycompany.android.%.release

Note that, in case of APEXes, the manifest name refers to the name of
the zip container. The apex manifest name (which is specified in
apex_manifest.json) is not overridden.

Test: m with PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES for
1) an APK in Android.mk
2) an APK in ANdroid.bp
3) an APEX
and check that manifest names are modified as specified

Change-Id: Ie58882d90884695e893944c43d9c8803b283e93d
2019-01-09 21:12:27 +09:00
Treehugger Robot
e6092a5e48 Merge "Remove duplicated shouldUncompressDex logic" 2019-01-09 11:55:30 +00:00
Anton Hansson
1976a25692 Make androidmk translate LOCAL_32_BIT_ONLY
Translate LOCAL_32_BIT_ONLY := true to compile_multilib: "32".

Test: androidmk frameworks/av/services/mediadrm/Android.mk
Change-Id: I9f73f5fdfc67738286844ff42b39ee54403fe649
2019-01-09 10:50:57 +00:00
Vladimir Marko
d2ee532fc3 Preopt: Pass -Xbootclasspath: arg to dex2oat.
Test: Pixel 2 XL boots.
Bug: 119868597
Change-Id: Ibbff11d13a6d67034e783de2f7d8c930251bd899
2019-01-09 09:39:20 +00:00
Colin Cross
2fc72f66d0 Remove duplicated shouldUncompressDex logic
shouldUncompressDex has already been computed and stored in
deviceProperties.UncompressDex, pass it to dexpreopter instead
of recomputing it.

Also add a stub for java libraries to set UncompressDex.

Test: no change to build.ninja
Change-Id: I663d9fbbe768a8dc9a97c7d456dd7a010f43162d
2019-01-09 08:31:48 +00:00
Colin Cross
1f8076b42d Merge changes I6f80b7b3,Ida8f046c
* changes:
  Don't dexpreopt when compile_dex but not installable
  Don't dexpreopt or strip java_test modules
2019-01-09 05:43:12 +00:00
Colin Cross
9036e2eef1 Merge changes Ideba9c0d,Iea2ab9be
* changes:
  Add dexpreopt enabled tests
  Add Maybe* methods to TestingModule
2019-01-09 05:28:20 +00:00
Treehugger Robot
667b3ae692 Merge "Executables in APEXes have root:shell" 2019-01-09 05:23:20 +00:00
Elliott Hughes
9886695763 Switch to toybox cp(1).
Test: treehugger
Change-Id: I91eddd95abc03f76d4da7fdc1e70c5cf314e6127
2019-01-08 16:31:54 -08:00
Elliott Hughes
2837d75ffd Merge "Switch to toybox chmod(1)." 2019-01-09 00:27:35 +00:00
Jaewoong Jung
acb529b038 Handle multi dir all-*-files-under function calls.
This change fixes a bug where androidmk assumes all-*-files-under
function only takes one directory parameter.

Test: androidmk_text.go, manual execution
Change-Id: Ib1614a2ddde7ea1120c1c37126231988f4862165
2019-01-09 00:07:01 +00:00
Jiyong Park
805cbc3ac2 Executables in APEXes have root:shell
Executables under /system/bin are configured as (uid:gid)=(root:shell)
by fs_config.cpp. Therefore, an executable that is moved/copied from
/system/bin to an APEX should be configured as such.

Test: adb shell ls -al /system/bin/linker
/apex/com.android.runtime/bin/linker shows
-rwxr-xr-x 1 root shell 1133528 1970-01-01 09:00 /apex/com.android.runtime/bin/linker
-rwxr-xr-x 1 root shell 1133528 1970-01-01 09:00 /system/bin/linker

Change-Id: Ibb698aab237362fed312da2af809cceead8a1092
2019-01-09 08:41:45 +09:00
Treehugger Robot
06af80e3a4 Merge "Don't use vendor variant when BOARD_VNDK_VERSION is not set" 2019-01-08 23:34:08 +00:00
Jaewoong Jung
06fbd65c28 Merge "Add LOCAL_OVERRIDES_PACKAGES support to androidmk." 2019-01-08 15:15:07 +00:00
Jaewoong Jung
7494e7301a Merge "Add java_import_host handling logic." 2019-01-08 15:14:51 +00:00
Nan Zhang
d50f53bc25 Fix the issue for dumping metrics file to artifact
Bug: b/63815990
Test: N/A
Change-Id: I72ddc8579626e652a8c27299e009b24ded5312f6
2019-01-07 20:26:51 -08:00
Dan Willemsen
71edc8b848 Add BUILD_USERNAME and BUILD_HOSTNAME
As part of a future change to sandbox the build on Linux, the real
username will be switching to "nobody", and the hostname will be
switching to "android-build".

The USER environment variable will reflect the sandboxed value, so for
the build properties that want the external USER, they'll need to use
BUILD_USERNAME.

Similarly, BUILD_HOSTNAME will reflect the real value, while the
`hostname` tool will return "android-build"

Bug: 122270019
Test: check build.prop
Change-Id: I99604b9488732a63690b256dc4dd7894d369a32c
2019-01-07 23:00:54 +00:00
Jaewoong Jung
18ef4a2881 Add LOCAL_OVERRIDES_PACKAGES support to androidmk.
It is supposed to be translated to overrides.

Test: Manual test
Change-Id: Ice2e7c5f7669ad1e4c3e82000c8dd52d20a49a7a
2019-01-07 14:30:43 -08:00
Jaewoong Jung
2a9ed7c429 Add java_import_host handling logic.
Now java_import with a host flag set to true is converted to
java_import_host.

Bug: 122372359
Test: bpfix_test.go + manual test with real examples.
Change-Id: Ie38fa51a44c83c434927db4b742d6839c64b3d63
2019-01-07 14:13:51 -08:00
Treehugger Robot
e2e13a5d99 Merge "Save invocation info of dex2oat runs." 2019-01-07 21:38:16 +00:00
Treehugger Robot
ef7647f3ea Merge "Fix: soong_ui.bash's wrong check for TOP variable" 2019-01-07 04:44:59 +00:00
Treehugger Robot
4e78fec21e Merge "Pass -S option to wrapper for python binary." 2019-01-07 02:42:09 +00:00
Colin Cross
dc2da916fb Don't dexpreopt when compile_dex but not installable
Modules shouldn't be dexpreopted and possibly stripped when
compile_dex is set but installable is not set.  This matches the
previous behavior when the dexpreopt rules were in Make.

Bug: 121317615
Test: dexpreopt_test.go
Change-Id: I6f80b7b37a990c475b91aa5d98a19a3baa85eb1b
2019-01-06 08:50:36 -08:00
Colin Cross
e302687ea4 Don't dexpreopt or strip java_test modules
I6bb2c971cee65d2338839753aa0d84939f335b1b accidentally caused
java_test modules to be dexpreopted and possibly stripped.

Test: dexpreopt_test.go
Change-Id: Ida8f046c509c97e38bd3bce66944d32f01530db4
2019-01-06 08:50:32 -08:00
Colin Cross
638149e650 Add dexpreopt enabled tests
Add tests that verify when dexpreopt is enabled or disabled.

Test: dexpreopt_test.go
Change-Id: Ideba9c0dac30eb31e7ae29e46d1d1590202b8369
2019-01-05 22:36:13 -08:00
Colin Cross
b77ffc48dc Add Maybe* methods to TestingModule
Add methods to TestingModule that return an empty BuildParams instead
of panicking, which can be used to test if a module has a matching
rule.  Also add godoc to the TestingModule methods.

Test: m
Change-Id: Iea2ab9be57d3f3f60437041f4e5a7e2100e1fe48
2019-01-05 22:36:13 -08:00
Nan Zhang
dae8314a54 Merge "Generate build timing metrics to proto format file" 2019-01-05 02:17:30 +00:00