Commit Graph

20735 Commits

Author SHA1 Message Date
Liz Kammer
ae1efd5997 Merge "Set sdk_version for prebuilt_api to scope" am: 40be9bb8e1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1361248

Change-Id: I55bdb4e0cf2ffb7de44d715e7a94b4250b0b4c3c
2020-07-14 18:36:38 +00:00
Liz Kammer
40be9bb8e1 Merge "Set sdk_version for prebuilt_api to scope" 2020-07-14 18:17:44 +00:00
Treehugger Robot
76ad7335d2 Merge "Use monotonic clock instead of wall time clock for metrics." am: 75fd488028
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1361900

Change-Id: I0a1d646e51d1c30bab15889ec8dc6d519b4230ea
2020-07-14 00:01:24 +00:00
Treehugger Robot
75fd488028 Merge "Use monotonic clock instead of wall time clock for metrics." 2020-07-13 23:48:42 +00:00
Liz Kammer
f971af7997 Set sdk_version for prebuilt_api to scope
Remove old TODO setting sdk_version to "current" as the associated bug
appears to have been fixed.

Test: m checkapi
Change-Id: I7737fbd17d2f54fc4578e04d07875b4b8d408ef9
2020-07-13 15:41:20 -07:00
Colin Cross
2f67efffd7 Merge "Support lint on unbundled builds" am: 562b6ee5cf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1360940

Change-Id: I566128d420a0b0047785ca753be3603d60c5f934
2020-07-13 21:57:23 +00:00
Colin Cross
562b6ee5cf Merge "Support lint on unbundled builds" 2020-07-13 21:33:09 +00:00
Patrice Arruda
958b89c0b5 Use monotonic clock instead of wall time clock for metrics.
From several dashboards, there are high spikes from several
builds where the real time of executing a part of the build
system took many many hours. This is due to using the wall
time clock when calculating the duration. For metrics, the
monotonic clock should be used for more accurate measurement.
Also, cleaned up the time.go file to use the proper proto
functions when marshalling perf protobuf and deleted
unnecessary functions.

Bug: b/143492984
Test: Wrote and ran unit test case.
Change-Id: I1540cfbf37915e3045ecedaa2595c1f9429bcd62
2020-07-13 21:14:34 +00:00
Treehugger Robot
95393f8df1 Merge "Add array type property flags, equivalent to args" am: aeaffeb710
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1356166

Change-Id: I2ee8453417c920c32c451c0f8f6ee77d903d7e87
2020-07-13 21:05:16 +00:00
Treehugger Robot
aeaffeb710 Merge "Add array type property flags, equivalent to args" 2020-07-13 20:52:20 +00:00
Liz Kammer
585cac22d9 Add array type property flags, equivalent to args
The property args is currently a string, but represents a collection of
arguments to metalava/doclava. This has resulted in variables being used
rather than default modules to share arguments.

Test: go test java_tests
Bug: 145644363
Change-Id: I670235e8f1cf19bfe8909049c4765637d0accd47
2020-07-13 08:57:49 -07:00
Treehugger Robot
17c7e4ad72 Merge "Do not consider disabled prebuilt variants." am: 775c8e1af7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1356826

Change-Id: I8a8c52f6108574b9daab129274b2efb195554b1a
2020-07-13 14:09:55 +00:00
Treehugger Robot
775c8e1af7 Merge "Do not consider disabled prebuilt variants." 2020-07-13 13:59:30 +00:00
Treehugger Robot
a738f0144e Merge "Set LOCAL_APKCERTS_FILE for apk_set modules in apexes" am: 20efa41af8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1361026

Change-Id: Ic09f50a9f6f7868be2480cade9e3389b56dcb45e
2020-07-13 11:56:52 +00:00
Treehugger Robot
20efa41af8 Merge "Set LOCAL_APKCERTS_FILE for apk_set modules in apexes" 2020-07-13 11:39:43 +00:00
Colin Cross
cae5903677 Merge "Use unzip -DD" am: b7cea24fe3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1361337

Change-Id: I78b6bff97590657fbd5ad398c18d1bf815161b56
2020-07-13 06:09:29 +00:00
Colin Cross
b7cea24fe3 Merge "Use unzip -DD" 2020-07-13 05:58:42 +00:00
Treehugger Robot
a23eb4c462 Merge "Fix string concatenation error" am: 9d98ac15bb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1360939

Change-Id: Ieabd5925353386d26f5e1359cb3d97135cdbf672
2020-07-12 23:22:05 +00:00
Treehugger Robot
9d98ac15bb Merge "Fix string concatenation error" 2020-07-12 23:08:40 +00:00
Colin Cross
d783bbbace Use unzip -DD
We put reproducible timestamps in zip files so that the artifacts
are consistent, but that leads to old timestamps in the output
directory if they are unzipped as part of the build.  Use
unzip -DD when unzipping to update the timestamps.

Bug: 161015009
Test: touch -d 2020-01-01 ref; find $OUT/system -not -newer ref
Change-Id: I70407a627cb070e24be510faa6a774e3d9eae3a8
2020-07-12 05:37:46 +00:00
Inseob Kim
c188fb0dfc Merge "Nullify stl and sanitize of llndk_headers" am: 41405cc275
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1356667

Change-Id: I5079d467fcf1d493275b8ec91d3c840e0c14359a
2020-07-11 05:29:11 +00:00
Inseob Kim
41405cc275 Merge "Nullify stl and sanitize of llndk_headers" 2020-07-11 05:19:17 +00:00
Colin Cross
4fb652d681 Set LOCAL_APKCERTS_FILE for apk_set modules in apexes
I321e80fd636a955213761f56a3ac64bfe7f7f7c0 missed setting
LOCAL_APKCERTS_FILE for apk_set modules in apexes, which causes
invalid apkcerts.txt files.

Bug: 160652723
Test: m apkcerts-list
Change-Id: I1ccaafd04978374d0da10363a1d782cfeae428e7
Merged-In: I1ccaafd04978374d0da10363a1d782cfeae428e7
(cherry picked from commit 7e2b36c7d5)
2020-07-10 20:38:50 -07:00
Colin Cross
8a6ed3750d Support lint on unbundled builds
Use prebuilts of the annotations.zip and api-versions.xml files
when running lint in an unbundled build.

Test: m TARGET_BUILD_APPS=Gallery2 lint-check
Change-Id: Idacf3758a2769678a635941486183673e95b43f8
2020-07-10 19:30:32 -07:00
Colin Cross
afa6a77c64 Fix string concatenation error
Fix an error caught by golint that prevents using go test.  string(int)
produces a rune, not a string representation of the int.  Use fmt.Errorf
instead to format the string.

Test: go test
Change-Id: I4c2e1e30a0f1b3dc24afd123c38c4e41c2abb47a
2020-07-10 16:32:49 -07:00
Treehugger Robot
9c3f56a3aa Merge "Specify module dependency in the srcs list" am: 21143a601c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1356365

Change-Id: I7249973dc3fc0cd87039c1ec38b2b213e07284c8
2020-07-10 18:47:06 +00:00
Treehugger Robot
21143a601c Merge "Specify module dependency in the srcs list" 2020-07-10 18:28:50 +00:00
Martin Stjernholm
235e2fdbd3 Do not consider disabled prebuilt variants.
Test: m nothing
Test: `m` with prebuilt SDKs in the manifest
Bug: 151303681
Change-Id: I44d3a3cc4d7c1e02cc0ec61827646801f804b168
2020-07-10 17:12:10 +01:00
Paul Duffin
a7d4a055b4 Differentiate sdk snapshot include dir by os type am: ed62b9cc2a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1360457

Change-Id: I91a343fc2abb19a15fbe44112810010e055a954a
2020-07-10 14:19:50 +00:00
Paul Duffin
ed62b9cc2a Differentiate sdk snapshot include dir by os type
Test: m nothing
Change-Id: Ide032aa64bb1fee69969c5e007bee6643d475309
2020-07-10 12:18:03 +01:00
Roland Levillain
78498eb983 Merge "Handle empty / undefined slice-type product variables uniformly." am: 8f91f7d802
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1359443

Change-Id: If55ff857da51cf3b34bb88c9967fcdb7907a4bb0
2020-07-10 08:20:45 +00:00
Roland Levillain
8f91f7d802 Merge "Handle empty / undefined slice-type product variables uniformly." 2020-07-10 08:06:20 +00:00
Treehugger Robot
6d80e8ef5d Merge "Add RBE metrics dump in Soong UI." am: afdd267ff7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1356722

Change-Id: I1704660a1e6433caf8fb5faea0d6873afaebd871
2020-07-09 23:10:18 +00:00
Treehugger Robot
afdd267ff7 Merge "Add RBE metrics dump in Soong UI." 2020-07-09 22:57:40 +00:00
Paul Duffin
e371a18acc Ensure that sdk/module_exports depends on source members am: cee7e66b07
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1359444

Change-Id: Ie52a110e30e646a0fdf9479039bb58ee6a722078
2020-07-09 21:42:34 +00:00
Patrice Arruda
62f1bf2378 Add RBE metrics dump in Soong UI.
From aosp/1329396, the RBE metrics protobuf file is part of the
metrics uploading process. The RBE metrics protobuf file is
generated by running the bootstrap shutdown command. A new function
named DumpRBEMetrics was written in order to generate the RBE metrics
protobuf file before sending to the uploading process.

Bug: b/140638454
Test: * Unit test cases
      * Ran RBE build on my local host and verified the
        metrics protobuf file is created.
      * Ran non-RBE build after RBE build and verified that
        the previous metrics protobuf file was deleted.

Change-Id: I4b8068905cb67c4b8c2d94793917b98974fed707
2020-07-09 21:06:22 +00:00
Paul Duffin
cee7e66b07 Ensure that sdk/module_exports depends on source members
Previously, preferring a prebuilt of an sdk/module_exports's member
would cause the sdk/module_exports to depend on the prebuilt instead
of the source and cause problems with the build.

This chance prevents the dependency from an sdk/module_exports to its
members from being replaced with prebuilts.

Bug: 160785918
Test: m nothing
Change-Id: Iee4bcd438c11929e30fb5766701b05a0e89956d9
2020-07-09 17:51:06 +01:00
Roland Levillain
f6cc261733 Handle empty / undefined slice-type product variables uniformly.
When checking for the emptiness / non-existence of a product variable
having the type of a slice, check the length of this variable against
zero, instead of checking the variable itself against `nil`, as
empty / undefined list product variables may appear as nil or empty
lists -- the former approach works with both nil and empty lists,
while the latter only works with nil lists.

Test: m nothing
Bug: 159241638
Change-Id: Id436a13f8633bf698b64e6901662f67657034486
2020-07-09 17:22:31 +01:00
Treehugger Robot
3757864b5f Merge changes Iefcf4fbe,I450d4769,I1ffc7e7b am: 2c79c871d9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1354643

Change-Id: I1cfb9db20de17755612c85da5324c05177ed493e
2020-07-09 12:44:43 +00:00
Treehugger Robot
2c79c871d9 Merge changes Iefcf4fbe,I450d4769,I1ffc7e7b
* changes:
  Prepend default to allow overriding in the bp file.
  Do not follow SDK member dependencies for APEX payloads.
  Do not follow prebuiltDependencyTags in APEX payload walks.
2020-07-09 12:32:31 +00:00
Chih-Hung Hsieh
bbd25aeb42 Specify module dependency in the srcs list
* "srcs" list contains one main Rust source file,
  followed by optional dependent modules.
* A dependent module included in the "srcs" list is
  the module name prefixed with ":".
* Add a simple test.

Bug: 160331255
Test: make and manual test build dependencies on genrule modules
Change-Id: I4f079138c2599158810b6412fce81b612a3f64a4
2020-07-08 23:50:00 -07:00
Treehugger Robot
fb13e2db9b Merge "Document critical path in perf.md" am: 4e74082665
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1358804

Change-Id: I87a1d20ae3c624253f588d4faca0063b08cbf099
2020-07-09 02:16:54 +00:00
Treehugger Robot
4e74082665 Merge "Document critical path in perf.md" 2020-07-09 02:03:20 +00:00
Colin Cross
d417bf474f Document critical path in perf.md
Test: none
Change-Id: I7de9b98fea67084ec5b5ce5429f0a8f976341439
2020-07-08 15:51:37 -07:00
Paul Duffin
403b15074f Restrict replacements of source dependencies with prebuilts am: 80342d72d0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1351596

Change-Id: I575c38d7e707bf57afaa54d9d138ffaedbe6abbb
2020-07-08 18:22:32 +00:00
Paul Duffin
ad18b5c676 Stop java_sdk_library_import from depending on source modules am: 44f1d8404b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1351595

Change-Id: I7005815459924ddae58968e631a5809795382c9f
2020-07-08 18:22:28 +00:00
Paul Duffin
80342d72d0 Restrict replacements of source dependencies with prebuilts
Previously, when java_sdk_library_import was preferred over a
java_sdk_library the latter ends up depending on the prebuilt child
modules created by the java_sdk_library_import instead of the source
child modules that it created itself. That was because all dependencies
on those source child modules were replaced with the corresponding
prebuilt child modules.

This change prevents those dependencies from being replaced to preserve
the dependencies from java_sdk_library onto its source child modules by
making the replacement conditional depending on the tag used. It also
updates the affected test.

Bug: 159902351
Test: m nothing
Change-Id: I4441b901dedfd44b9769df1ac2e248b94834cf85
2020-07-08 16:46:16 +01:00
Paul Duffin
44f1d8404b Stop java_sdk_library_import from depending on source modules
Previously, java_sdk_library_import added the dependencies on its child
components in the deps mutator after prebuilts without a matching
source module are renamed to the source module name. That meant that
the java_sdk_library_import has to use the source module name and ended
up depending on the source module unless it was preferred.

This change adds a new component deps mutator that runs before the
PrebuiltRenameMutator so that the java_sdk_library_import can add
dependencies onto the prebuilt modules. It also updates an affected
test.

Bug: 159902351
Test: m nothing
Change-Id: I3576c4873302743e51aff547ea1497bef6d748ac
2020-07-08 16:46:16 +01:00
Jooyung Han
af6aa6ae9f Merge "Apply "excludes" for OutputFileProducer" am: ecc495fd09
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1354451

Change-Id: I486e84a330f00c917293e9586259e49749fd95f0
2020-07-08 06:53:11 +00:00
Jooyung Han
ecc495fd09 Merge "Apply "excludes" for OutputFileProducer" 2020-07-08 06:40:08 +00:00