Commit graph

18947 commits

Author SHA1 Message Date
Jiyong Park
62304bbeec Add test_for property
This change adds 'test_for' property to cc_test_* types. The property is
used to mark a module as a test for one or more APEXes, in which case
the module has accecss to the private part of the listed APEXes. For
example, the module is linked with the actrual shared library in the
APEX instead of the stub of the shared library.

Exempt-From-Owner-Approval: already +2'ed by owner

Bug: 129539670
Bug: 153046163
Test: m
Change-Id: I45ed0d7a15540b0d69b2a3b8d9c4cb202adff6f2
2020-04-25 06:25:42 +00:00
Yi Kong
96447be640 Merge "Disable ARM32 libgcc" 2020-04-25 04:44:37 +00:00
Jooyung Han
28a49820e4 Merge "Apex: support codenames for min_sdk_version" 2020-04-25 04:41:44 +00:00
Treehugger Robot
52c0b7b35b Merge "Repeat kapt processor argument for multiple processors" 2020-04-24 15:51:13 +00:00
Ivan Lozano
dc455395ee Merge "Clean up rust tests." 2020-04-24 15:43:22 +00:00
Treehugger Robot
65c1d14cfa Merge "android_app_import is now ApexModule" 2020-04-24 12:12:23 +00:00
Ulyana Trafimovich
dc9510537a Merge "Add "updatable" property to ApexModule interface." 2020-04-24 08:25:34 +00:00
Treehugger Robot
f4dc25b476 Merge "Remove libopus from apex_available whitelist" 2020-04-24 00:33:59 +00:00
Nicolas Geoffray
e4a4b6ac43 Merge "Add conscrypt-module-host-exports to the list." 2020-04-23 17:57:18 +00:00
Matthew Maurer
1f434b26c1 Merge "Update Android's rustc version 1.40.0->1.42.0" 2020-04-23 16:53:41 +00:00
Ivan Lozano
2f15bae336 Clean up rust tests.
The list of required deps for testing is a lot shorter as we no longer
include as many prebuilt libraries and our list of stdlibs is much
shorter. Remove the libraries we no longer need, and add the
non-prebuilt libstd and libtest to the deps generated for every test.

Bug: 153463188
Test: Soong tests pass.
Change-Id: I94f7b514797ab8d6aedb543ea6afdb07611b7293
2020-04-23 09:39:34 -04:00
Ulya Trafimovich
7c140d828a Add "updatable" property to ApexModule interface.
For a given variant of a module that implements ApexModule interface,
the "updatable" property tests if this variant comes from an updatable
apex. For platform variants it is always false.

Test: lunch aosp_walleye-userdebug && m nothing
Bug: 138994281
Change-Id: I2d4c54fb397e29dc9b3203be7fb17be4536529f7
2020-04-23 11:58:53 +01:00
Jiyong Park
592a6a41de android_app_import is now ApexModule
Like other prebuilts (java_import, etc.), android_app_import has now
became ApexModule. It means it supports APEX-specific properties like
apex_available, min_sdk_version, etc.

Bug: 154488897
Test: m
Change-Id: I86f02771496ffc68c98a50ddfc786788fa1e05fb
2020-04-23 19:02:04 +09:00
Anton Hansson
14f42d34af Merge "Remove unused arguments in droiddoc" 2020-04-23 09:56:40 +00:00
Nicolas Geoffray
0a2e297206 Add conscrypt-module-host-exports to the list.
Test: build-mainline-modules.sh
Change-Id: I9ca14cc37a69b1172f52412297977dd03c6ca1a0
2020-04-23 09:35:45 +01:00
Jooyung Han
47db5adb06 Remove libopus from apex_available whitelist
libopus sets its own apex_available property.

Bug: 150999716
Test: m
Change-Id: I4cff3ebb7e017a1fb629b18b72238acf3df0d26e
2020-04-23 15:54:23 +09:00
Jooyung Han
79519b6caf Merge "Skip version mutator for host/ramdisk/recovery" 2020-04-23 03:46:30 +00:00
Jooyung Han
624d35cb4d Skip version mutator for host/ramdisk/recovery
"version" mutator creates stubs variants for "cc" libraries with
"stubs.versions". These stubs are for APEX-APEX or APEX-Platform
boundaries.

For host/ramdisk/recovery variants, stubs are not necessary.

Exempt-From-Owner-Approval: cp from internal

Bug: 153698496
Test: m
Merged-In: Id576c4318d9d69246a4a7e2fb4145d5fd2ab9416
Change-Id: Id576c4318d9d69246a4a7e2fb4145d5fd2ab9416
(cherry picked from commit c40b5193fe)
2020-04-23 03:46:09 +00:00
Colin Cross
5a11686e64 Repeat kapt processor argument for multiple processors
kapt claims to support a comma separated list of annotation
processors, but it errors if multiple annotation processors
are given.  Surrounding the the list with {} does not error,
but it also doesn't even warn if the second element in the
list is garbage, so it may not be running the second
processor.  Repeat the processor argument for each
annotation processor class instead.

Bug: 154736649
Test: TestKapt
Test: m checkbuild
Change-Id: I4c7c161dbf867d7fba1aaf16fd5e502647e3f682
2020-04-22 20:43:37 -07:00
Oliver Nguyen
0e8579b4f1 Merge "Only package gcno files for gcov coverage builds." 2020-04-23 00:45:51 +00:00
Oliver Nguyen
0452678a40 Only package gcno files for gcov coverage builds.
Bug: 154550223
Test: m -j NATIVE_COVERAGE=true droid dist tests
Test: m -j CLANG_COVERAGE=true droid dist tests
Merged-In: I81598bcab8db105de6692156c001fc961409ce63
Change-Id: I81598bcab8db105de6692156c001fc961409ce63
2020-04-22 13:30:07 -07:00
Matthew Maurer
e972e8822b Update Android's rustc version 1.40.0->1.42.0
Test: cd external/rust/crates; mm
Bug: 152633654
Change-Id: Ic7cbc1869fdffa332033cecd4c4596775946d0e9
2020-04-22 13:22:25 -07:00
Anton Hansson
0f15a9f866 Remove unused arguments in droiddoc
Nothing passes these arguments, so it's dead code.

There is a lot of other cruft in this file that is effectively
dead code, but required further cleanup.

Bug: 152479829
Test: m
Change-Id: Ib2630d4d49f21003b17e2331b0900e8df0a27e66
Merged-In: Ib2630d4d49f21003b17e2331b0900e8df0a27e66
(cherry picked from commit 0ee713aa0e)
2020-04-22 21:15:09 +01:00
Treehugger Robot
1b7599d918 Merge "cc: add min_sdk_version prop" 2020-04-22 00:48:34 +00:00
Treehugger Robot
524af35fdc Merge "Make sure car-lib system APIs are not changing unintentionally" 2020-04-21 23:43:13 +00:00
Dan Willemsen
c4c33e0e58 Merge "Stop dumping obsolete variables" 2020-04-21 22:35:36 +00:00
Treehugger Robot
9145d847e4 Merge "Turn on ninja phony outputs" 2020-04-21 22:30:24 +00:00
Makoto Onuki
a573f1906f Make sure car-lib system APIs are not changing unintentionally
Soon had a special rule to skip the "released-api" compatibility
check on the car-lib system API. We should enable it.

Bug: 154632388
Test: m droid
Change-Id: Ib4e584def7e786e3e129cd2bfb23958ac9b4b72d
Merged-in: Ib4e584def7e786e3e129cd2bfb23958ac9b4b72d
2020-04-21 12:37:37 -07:00
Yi Kong
14b65d19a7 Disable ARM32 libgcc
ARM32 does not depend on libgcc to provide unwinding symbols.

Test: TreeHugger
Change-Id: I68f1cd3c4e1ff9713ffe4e3ac02bca053aced116
2020-04-21 12:19:01 +00:00
Jooyung Han
379660c9c2 cc: add min_sdk_version prop
min_sdk_version is the minimum version of the sdk that the compiled
artifacts will run against.

For example, when a module is used by two APEXes and their
min_sdk_versions are set to 29 and 30, then the module should support
both versions even if it is compiled against 30. Therefore,
min_sdk_version of the module needs to be set 29 in that case. In
general, this is set as the minimum value of min_sdk_vesions of APEXes.

For now, there's no build-time checks about this prop even if the prop
is set.

Bug: 145796956
Bug: 152655956
Bug: 153333044
Test: m nothing
Change-Id: I072ad8c317d2615e8b08e4e7ea2db8e7955b4b12
2020-04-21 15:24:00 +09:00
satayev
aa52a04fdd Merge "Remove Android compat annotations on jarjar transform." 2020-04-20 15:11:09 +00:00
Treehugger Robot
a268d59e8b Merge "Report reverse dependencies for dangling rules." 2020-04-20 13:41:55 +00:00
Treehugger Robot
5df873862d Merge "Add logging for stats on finished commands" 2020-04-20 11:56:24 +00:00
Artur Satayev
762d9f38af Remove Android compat annotations on jarjar transform.
Set a system property to enable Android specific transformer that drops
UnsupportedAppUsage annotation for repackaged classes to avoid adding
unneeded hidden api symbols on jarjar.

Bug: 146418363
Test: m, manual diff hiddenapi-flags.csv
Exempt-From-Owner-Approval: patch approved by owner
Change-Id: I10b49feb15257301574162b5d389cbc30277f672
2020-04-20 11:17:18 +00:00
Treehugger Robot
acc5448f2b Merge "Do not check ABI for coverage variants" 2020-04-20 03:50:03 +00:00
Dan Willemsen
acafc67399 Add logging for stats on finished commands
Includes the exit code, real time, user time, system time, and maxrss.

Test: m nothing; check out/soong.log
Change-Id: I93dea9fc1c7fb892150e16e11cae09f2372f4429
2020-04-19 12:06:14 -07:00
Dan Willemsen
c615e29b3e Stop dumping obsolete variables
Test: m nothing
Change-Id: I4d7cce3a1d5f7f5f517d74e440059a69de36249d
2020-04-19 03:59:35 +00:00
Dan Willemsen
6587beddfa Turn on ninja phony outputs
This replaces the _kati_always_build_ hack with a ninja feature so that
ninja can actually understand what's happening. This means that we can
turn on some more options and checks around expected output filenames:

* Remove the output file(s) before the command executes
* Error if the output file(s) don't exist after the execution
* Error if the output is a directory

They're turned on immediately during the soong bootstrap runs, as those
run a limited number of rules. The main ninja execution does not remove
the output files, and prints warnings instead of errors for the others.
I'll turn them on as we understand how often those warnings are seen.

Test: m (check for new warnings)
Test: treehugger (check for new warnings)
Change-Id: I7f5c1a361dd1498eb54a2c07a918f3b0aa086e4c
2020-04-18 20:25:59 -07:00
Anton Hansson
43b6019eb2 Merge "Remove _API_FILE variables" 2020-04-18 09:13:49 +00:00
Jooyung Han
79a24f2ca8 Merge "apex: respect filename property for apk-in-apex" 2020-04-18 02:23:07 +00:00
Anton Hansson
27d9ec1860 Remove _API_FILE variables
There are no known usages of these variables, and many have been
incorrectly set for a long time.

Also convert the <module> phony for api txt to androidmk.

Bug: 152479829
Test: m
Change-Id: Iff355041d88eb59ac47dd19a03e993cf1ce3927e
2020-04-17 20:27:11 +01:00
Martin Stjernholm
946fb67272 Report reverse dependencies for dangling rules.
To help find what pulls them in.

Test: m checkbuild on a tree that exhibited the problem in
  https://android-build.googleplex.com/builds/pending/P13607612/aosp_crosshatch-userdebug/latest/view/logs/build_error.log

Change-Id: I59f3c98f21e5fb45dbd0aa814400f734d769a442
2020-04-17 16:00:43 +01:00
Ramy Medhat
383683559c Merge "Allow remote execution of link actions." 2020-04-17 13:59:26 +00:00
Jooyung Han
49f6701e9a apex: Don't run apex mutators if disabled
apex_deps/apex/apex_flattened mutators don't have to run if module is
disabled.

For some branches which have no valid targets, apex modules are disabled
by the os mutator. e.g. aosp-build-tools

Some enforcement checks which run during those mutators may fail because
build-environment doesn't provide full context information.

For example, "Platform_version_all_codenames" config variable is not
set while apex.min_sdk_version uses one of those codenames.

Bug: 152655956
Test: m
Change-Id: I47e27d2d025ba4c36534708b113ce77c4cb2397b
2020-04-17 15:49:32 +09:00
Ramy Medhat
9a90fe5e23 Allow remote execution of link actions.
This CL adds a remoteexec package that allows adding a configurable RBE
prefix to the template.

Test: built aosp crosshatch userdebug with and without RBE_CXX_LINKS.
Change-Id: Ica920c3d7f79f2996210b9cbd448126451c1707c
2020-04-16 21:18:10 -04:00
Yo Chiang
ff6bd149dd Merge "cc_prebuilt_library respect module name and stem" 2020-04-17 01:07:03 +00:00
Treehugger Robot
045d75f11a Merge "Add a new protobuf message named Upload to upload build metrics." 2020-04-16 23:13:00 +00:00
Patrice Arruda
adfc1120b9 Add a new protobuf message named Upload to upload build metrics.
A new protobuf message named Upload is defined to send build metrics
to the Android Build Server API after a build is completed. These
metrics are collected from googlers only, as described in
go/local-developers-metrics-wfh.

Bug: b/140638454
Test: m nothing
Change-Id: I5e49b5ace053913be2b75673cb1375f4cef37825
2020-04-16 14:02:56 -07:00
Treehugger Robot
895d5bf924 Merge "Dereference paths to be mounted into soong sandbox" 2020-04-16 07:00:28 +00:00
Jooyung Han
58a7d9c371 Merge "apex: remove compat symlinks to vndk apex" 2020-04-16 04:02:02 +00:00