Commit graph

20438 commits

Author SHA1 Message Date
Treehugger Robot
e9eacaa061 Merge "Move gen-kotlin-build-file.sh to python" 2020-06-29 21:12:45 +00:00
Thiébaud Weksteen
5e291c238f Fix bpfmt issues and add bpfmt to preupload checks
Test: m nothing
Change-Id: I10526a33685335bdd26cc7692815133379d4e0f6
2020-06-29 09:14:08 +02:00
Treehugger Robot
0c6f111d7b Merge changes Ifd2858dd,I2585dd99,I65e7a456
* changes:
  apex: use SubName for requiredDeps
  apex: support "vendor: true"
  apex: AndroidMk writes common properties
2020-06-29 02:20:56 +00:00
Roland Levillain
aca944916a Add "art/test" to the list of Core Library projects.
Allow modules under art/test to use `sdk_version: "none"`. This is so
that ART run-test module definitions can use the same settings as
Libcore tests:

  sdk_version: "none",
  system_modules: "core-all-system-modules",

Test: m nothing
Bug: 147814778
Change-Id: Ibb74d6a06a6609be511403c51ca7a02204bf606f
2020-06-27 16:20:00 +01:00
Roland Levillain
e95eb455cc Merge "Add soong.java.testProperties to java_defaults module type." 2020-06-27 14:33:12 +00:00
Colin Cross
9b1aa0cb86 Move gen-kotlin-build-file.sh to python
Kotlin common multiplatform sources support will require more
complexity in gen-kotlin-build-file.sh, move it to python instead.

Test: m checkbuild
Change-Id: I02312160ad781877f1fec971168331c0dcecf136
2020-06-26 22:41:34 -07:00
Matthew Maurer
85a08fc454 Merge "Add clippy-driver build rule" 2020-06-26 20:33:37 +00:00
Treehugger Robot
a8bfdbd131 Merge "Update rustc to 1.44.0" 2020-06-26 19:26:09 +00:00
Nicolas Geoffray
eb2676ea71 Merge "Add platform libraries required for ART chroot testing." 2020-06-26 19:10:30 +00:00
Treehugger Robot
b1af227b4a Merge "Add Matt to OWNERS for Rust" 2020-06-26 17:22:09 +00:00
Chris Gross
8f3386e49b Merge "Use a default exclude filter for JaCoCo in Soong." 2020-06-26 14:59:15 +00:00
Nicolas Geoffray
792ea7359a Add platform libraries required for ART chroot testing.
Those libraries are not in an APEX, and are provided as stubs
in the platform-mainline-sdk. Therefore compile them explicitly and make
them available in the dist directory.

Test: scripts/build-mainline-modules.sh
Bug: 142935992
Change-Id: I919d8c580e907ce9a7b54366653d0c63ab9d00c7
2020-06-26 15:17:47 +01:00
Jeff Vander Stoep
530dccb8c5 Update rustc to 1.44.0
Test: Treehugger
Change-Id: Ib940bc5afbbbec6b16ed7c2879ad31438e58907d
2020-06-26 15:26:49 +02:00
Roland Levillain
b5b0ff3555 Add soong.java.testProperties to java_defaults module type.
This is so that we can use some test properties in a `java_defaults`
module for ART run-tests.

Test: atest art-run-test-001-HelloWorld
Bug: 147814778
Change-Id: Ifb9817ca2f08e64f911c123a4022fbf688405547
2020-06-26 12:51:37 +01:00
Thiébaud Weksteen
92f703b084 Add clippy-driver build rule
Depending on the location of the repository (e.g. external/, vendor/), a
different set of lints will be enabled. Add the clippy property to the
rust_* modules. This property can be used to overwrite the default
behaviour.

Test: m checkbuild
Bug: 157238651
Change-Id: Ife0f723ef4a74abb102597f8486a7b9f30e7d351
2020-06-26 13:31:21 +02:00
Ulyana Trafimovich
3d88ad68be Merge "Move construct_context.sh from Make to Soong. Update OWNERS list." 2020-06-26 08:46:58 +00:00
Jingwen Chen
d06f11ee71 Merge "Support multiple dists per Android.bp module, and dist output selection." 2020-06-26 08:03:27 +00:00
Jeff Vander Stoep
03186ed247 Add Matt to OWNERS for Rust
Test: n/a
Change-Id: Ibecfd0edd9950a161246d9a13179d88f7e957244
2020-06-26 09:23:47 +02:00
Thiébaud Weksteen
9ae615fb99 Merge "Remove duplicate Helper call" 2020-06-26 07:18:02 +00:00
Treehugger Robot
3e2a34dd8d Merge "Dist build.ninja and Android.bp.list" 2020-06-25 22:23:45 +00:00
Colin Cross
8ba7d47bba Dist build.ninja and Android.bp.list
Debugging issues on the build servers can be difficult because the
intermediate files are not visible.  Gzip ninja file and Makefiles
generated by Soong and the ninja files generated by Kati to the dist
directory, and also copy all of the finder output files.

Bug: 157656545
Test: m dist nothing
Change-Id: I48d75305e551ccae81c7a55721981cf58acd838b
2020-06-25 12:50:00 -07:00
Thiébaud Weksteen
5f2de778f4 Remove duplicate Helper call
The testRustContext function is used to prepare the environment for the
unit tests. As such, it is marked as a Helper function. Remove a
second superfluous call within its definition.

Test: m nothing
Change-Id: I37ea9a584b33498794c1cac828a7557d4bea8d7c
2020-06-25 21:25:41 +02:00
Liz Kammer
d9857f83a8 Merge "Add androidmk error for multiple assignments" 2020-06-25 18:11:07 +00:00
Chris Gross
2f748692dd Use a default exclude filter for JaCoCo in Soong.
Instrumented builds should exclude certain classes from instrumenation
by default. (e.g. JaCoCo itself) Leverage the existing
DefaultJacocoExclusionFilter to do this.

Note: Two different default filters exist now (one for Make and one for
Soong), as they have different wildcard rules.

Test: EMMA_INSTRUMENT=true EMMA_INSTRUMENT_STATIC=true m -j32
TeleService and inspected the resulting temporary jar that was
instrumented to confirm that anything from org/jacoco was excluded.
Bug: 159748844

Change-Id: I5466b0a03957edfbe53971d5d1a7729fdb8337db
2020-06-25 16:45:44 +00:00
Martin Stjernholm
c4fe0dd3cc Merge "Disable flattening only for unbundled apps." 2020-06-25 13:49:30 +00:00
Ulya Trafimovich
5cb30c5820 Move construct_context.sh from Make to Soong. Update OWNERS list.
This script belongs with other manifest-related scripts, and the future
plan is to rewrite it in Python and share common functionality with
other scripts.

Test: lunch aosp_cf_x86_phone-userdebug && m
Bug: 132357300
Change-Id: I4b90129e5023ca1a2c818fc160c34b0b7da943ef
2020-06-25 14:46:35 +01:00
Jingwen Chen
40fd90ae52 Support multiple dists per Android.bp module, and dist output selection.
This CL adds "dists" to the base property struct to support multiple
dist file configurations, and generic tag support to dist tagged outputs
of modules.

Fixes: b/152834186
Test: soong tests and `m sdk dist`

Change-Id: I80c86bc9b7b09e671f640a4480c45d438bdd9a2a
Signed-off-by: Jingwen Chen <jingwen@google.com>
2020-06-25 12:42:07 +00:00
Jooyung Han
efb184e499 apex: use SubName for requiredDeps
apexBundle keeps the required dependencies for native modules which are
external dependencies and then records it in .mk file as
LOCAL_REQUIRED_MODULES key.

LOCAL_REQUIRED_MODULES should list module name which are made of
cc.BaseModuleName() + SubName.

By the way, because a use_vendor:true apex is supposed to be installed
in /system/apex, we don't append SubName(.vendor) suffix.

Bug: 159211312
Bug: 155841765
Test: m
Change-Id: Ifd2858dda0b373110a0cd18a0c55db41f0fc2a99
2020-06-25 17:14:25 +09:00
Treehugger Robot
670ed3d97d Merge "Avoid race condition over ExportedSystemIncludeDirs" 2020-06-25 07:35:54 +00:00
Jooyung Han
85d61767b5 apex: support "vendor: true"
When an apex sets "vendor: true", it becomes a vendor apex.

Vendor apexes use vendor variants for native modules and are
installed in /vendor/apex.

Bug: 159211312
Test: m
Change-Id: I2585dd990ba857a2ab3ec6ab24e09d4652e867f2
2020-06-25 15:37:47 +09:00
Jooyung Han
2ed99d00b4 apex: AndroidMk writes common properties
AndroidMkEntries handles bunch of common properties(e.g. LOCAL_INIT_RC,
LOCAL_VINTF_FRAGMENTS, etc).

However apex defines its own Custom() writer, so those properties should
be handled manually.

For example, when an apex defines "init_rc" properties, the value should
be passed to Make via LOCAL_INIT_RC.

Bug: 159211312
Test: m
Change-Id: I65e7a456486c9f5fe70c91b78ff181425035fcf2
2020-06-25 15:30:26 +09:00
Jooyung Han
dd85fd89b0 Merge "apex: add apex_manifest.pb in file_contexts" 2020-06-25 06:21:40 +00:00
Jooyung Han
83f107cdfb Merge "Check base property before using it" 2020-06-25 03:13:16 +00:00
Treehugger Robot
0acb0fb2b7 Merge "Only look for profiles when we have a profile dir" 2020-06-25 01:28:52 +00:00
Jooyung Han
14a08f5b28 Merge "apex/apk: enforce min_sdk_version of all deps" 2020-06-25 01:18:52 +00:00
Jooyung Han
5c17ac003a Check base property before using it
OverrideModule's `base` property should point a valid
module(OverridableModule).

It should be checked before using it.

Bug: 159503211
Test: add `override_apex` without `base`
      m emits error, not panic.
Change-Id: I1d7c9395cc9a7461e317dd4b6ddbec3a9e68e9bf
(cherry picked from commit 3851b0c1fe8e8ffd3d30b4b8a5289f39a2c98270)
2020-06-25 09:17:59 +09:00
Dan Willemsen
78d51b00de Only look for profiles when we have a profile dir
Right now, it's looking for *.prof files at the top of the source
directory.

For devices that don't specify the profile dir (everything on AOSP,
etc), this saves a couple percent of the globs that we check during
every build (and would re-execute if you add or remove files from the
top directory)

Bug: 159845846
Test: treehugger
Change-Id: I10d43422a2b5ae25e6557d435ecc89fe43536dd7
2020-06-24 16:33:31 -07:00
David Srbecky
1bb4665c40 Merge "Add SrcPath to InstallHookContext" 2020-06-24 22:51:31 +00:00
Makoto Onuki
35dfb01d86 Merge "Enable check for "try to expose APIs from hidden class"" 2020-06-24 22:18:35 +00:00
Martin Stjernholm
56507b4e0d Disable flattening only for unbundled apps.
This allows the unbundled master-art branch to still use flattened
APEXes in its test builds.

Bug: 159109002
Test: art/build/apex/runtests.sh on master-art
Test: m nothing
Change-Id: I768c6b7f5afbc348cd7730e4ba96507678434778
2020-06-24 22:33:44 +01:00
Treehugger Robot
6f61fa75c6 Merge "Minor tweaks to usage message." 2020-06-24 20:00:31 +00:00
Makoto Onuki
f51b7af2a4 Enable check for "try to expose APIs from hidden class"
Exempt-From-Owner-Approval:Cherry-pick from goog/master
Bug: 159121253
Test: treehugger (i.e. this shouldn't trigger "API has changed" error.)
Merged-in: I6ca2d8e3967cdc41aa2a931972472174aae2a613
Change-Id: I6ca2d8e3967cdc41aa2a931972472174aae2a613
2020-06-24 12:06:37 -07:00
Liz Kammer
5e4070cb6b Add androidmk error for multiple assignments
Identify variables that are cleared or reassigned, add an error and
prevent reassignment which caused a parser error.

Test: go test androidmk_test
Bug: 112653593
Change-Id: I0db3372b60812ff4cdaebb38a56ed0af0dbdb27e
2020-06-24 10:33:59 -07:00
Thiébaud Weksteen
e6ec845501 Merge "Add standard rustfmt.toml" 2020-06-24 17:22:46 +00:00
Jaewoong Jung
caec264ba9 Merge "Change how override_modules work with prebuilts." 2020-06-24 17:03:57 +00:00
Bob Badour
8970b45c8f Minor tweaks to usage message.
Fix typo in tab separator example.
Add missing usage message to usage error.

Test: manually

Change-Id: I1d3a01fcb7caffeb39d6e47ddfe665059b2860f5
2020-06-24 08:18:15 -07:00
Treehugger Robot
29abfb7fd1 Merge "Include resources in sdk snapshot of java library impl" 2020-06-24 14:24:03 +00:00
Jooyung Han
580eb4fe38 apex: add apex_manifest.pb in file_contexts
apex_manifest.pb is added to payload.img by the build system and is
supposed to be read by apexd during activation.

So, it should be labeled as "system_file" so that apexd can read it
regardless of how file_contexts is defined.

Bug: 159767275
Test: add an apex with file_contexts with everything as vendor_file
      apexd should activate the apex.
Change-Id: Ie34eb7ad905828976152d67a7dfabf0add0a5de4
2020-06-24 23:00:32 +09:00
Paul Duffin
ab5467dbd0 Avoid race condition over ExportedSystemIncludeDirs
It is not clear whether this is causing the bug but it is a potential
source of problems and if it does not fix the bug then at least it will
have eliminated this as the culprit.

Bug: 157656545
Test: m nothing
Change-Id: I3abcb9ae501977924d0d514f4d9007ead24fe0a5
2020-06-24 14:05:09 +01:00
Paul Duffin
4e77284ab4 Include resources in sdk snapshot of java library impl
Bug: 159607838
Test: m nothing
Change-Id: Ie7ddbffc3957f832abfadb27292c436e8e5dcbf3
2020-06-24 13:04:15 +01:00