Commit graph

9509 commits

Author SHA1 Message Date
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
Sundong Ahn
b952ba018f Add Srcs_lib and Srcs_lib_whitelist_dirs properties
After fixing --stub-packages handling, some modules needs Srcs_lib and
Srcs_lib_whitelist_dirs properties. So Add these two properties

Bug: 117127012
Test: m -j

Change-Id: I1345f22e7e1dd9d0ee7779720004e6eba77eeff5
2019-01-08 16:35:47 +09: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
Dan Willemsen
f793933054 Turn on ninja error for missing dep files
So that ninja produces an error instead of just a warning when a dep
file is not produced.

Bug: 121058584
Test: check build logs for "depfile is missing" warning
Test: treehugger
Change-Id: I1cbaba866eaf293495c3c0b2b174190bcb2b0f9a
2019-01-07 18:57:04 +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
Jiyong Park
7c1dc6100a Don't use vendor variant when BOARD_VNDK_VERSION is not set
Vendor variants are not available when BOARD_VNDK_VERSION is not set.

Test: m for aosp_marlin
Change-Id: I5d89a401f5cf98db3f0a9aa553f00b2d6ee9ed1e
2019-01-05 11:17:10 +09:00
Nan Zhang
17f2767724 Generate build timing metrics to proto format file
Test: Dumped the text formated based metrics file to out dir,
and checked the file.
Bug: b/63815990

Change-Id: Iff476f72a0be74eb53b6b26ef468d11c0f24a404
2019-01-04 15:54:01 -08:00
Jaewoong Jung
bf35e33cfb Merge "Add buildDir to java patch-module paths." 2019-01-04 20:43:50 +00:00
Jaewoong Jung
91b38477e2 Merge "Add defaults support to genrule." 2019-01-04 20:43:37 +00:00
Jaewoong Jung
a45e15e2d4 Merge "Make bpf implement SourceFileProducer." 2019-01-04 19:04:47 +00:00
Jaewoong Jung
98716bdf40 Add defaults support to genrule.
Bug: 119635195
Test: genrule_test.go
Change-Id: I8aeff18760b031491012dd4864985b4ed01dbf3a
2019-01-04 15:37:59 +00:00
Jaewoong Jung
38e4fb2ce6 Add buildDir to java patch-module paths.
This solves a problem where javac fails to find patch-module targets
when a build diretory is not under the project root.

Bug: 117770838
Test: java_test.go + manual build
Change-Id: If70d0d388a3f6c87b3f78a927df2063616d50c8a
2019-01-04 15:37:20 +00:00
Treehugger Robot
9b84d34be3 Merge "Don't expect depfile from .s files" 2019-01-04 15:19:33 +00:00
yangbill
7265e5f9c1 Pass -S option to wrapper for python binary.
Prevent problem for some users using PAR file built by android's
build system which cause by the different site package of python
installed by user themselves.

Bug: 120469915
Test: 1. m atest
         atest --help
      2. apply aosp/861470
         full build

Change-Id: I72c83f9397f0e88eecfcd32806f1746520299447
2019-01-04 18:10:32 +08:00
Dan Willemsen
fcabb1c518 Don't expect depfile from .s files
.s files (unlike .S files) aren't run through the preprocessor, so -M*
doesn't actually write out a depfile.

Since our ninja is now going to be verifying that the depfile is created
(https://android-review.googlesource.com/861510), don't specify a
depfile for .s files.

Bug: 121058584
Test: apply https://android-review.googlesource.com/861510
Test: cd external/libavc; mma
Change-Id: I1697aa020c63639317c8f4771147026601ae72fc
2019-01-03 23:25:11 -08:00
Logan Chien
fa478c0234 Do not build lsdump for APEX variants
This commit stops building lsdump files for APEX variants since APEX
variants are local to APEX modules themselves.

Bug: 121986692
Test: make findlsdumps  # compare $ANDROID_PRODUCT_OUT/lsdump_paths.txt
Change-Id: I37fcd152d0d84d235a354ea53e53e808dd71464a
2019-01-04 13:28:06 +08:00
Logan Chien
3aeedc9592 Do not add _platform suffix to non-apex variation
This commit renames `_platform` suffix to `` (empty string) so that
non-apex variations are not renamed to `_core_shared_platform` or
`_vendor_shared_platform`.

This commit makes sure that `_core_shared` and `_vendor_shared` is
always under `$OUT_DIR/soong` regardless the usages from apex modules.
Furthermore, this avoids the confusing stale lsdump files (e.g. both
`_core_shared` and `_core_shared_platform exist) while creating
reference ABI dumps for VNDK ABI checks.

Bug: 121986692
Test: lunch aosp_arm64-userdebug; make  # no more _platform variants.
Change-Id: Ic02a60ac45f982580349661c22331d114617fd92
2019-01-04 13:28:01 +08:00
Nan Zhang
e7968b192c Merge "Pass --merge-qualifier-annotations to check-api" 2019-01-04 00:53:45 +00:00