Commit graph

2785 commits

Author SHA1 Message Date
Sam Delmerico
112f8ce34f apply gofmt am: 26e44b7b78
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2448682

Change-Id: I9627ededb4270842ccc5f205b720c002c30c52a5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-22 15:43:22 +00:00
Sam Delmerico
26e44b7b78 apply gofmt
Change-Id: I2416e246b3d8485a6b7810b998cff2f45f6a0494
2023-02-21 15:11:20 -05:00
Liz Kammer
c869b2f2f4 Add event handler for each mutator am: a988f08000 am: 01fb1d4c41 am: becc2f6a3e
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2432532

Change-Id: I6319daf46aac511ee6c5dece56971674f3a134ef
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-14 21:50:58 +00:00
Liz Kammer
b5cb3d0c7b Add getter for EventHandler so its easier to mock am: 073f69d723 am: addb326e69 am: c2e79cbc36
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2434332

Change-Id: I4da2738ecc0a459ed96d364fbf20019c6c20d059
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-14 21:45:16 +00:00
Liz Kammer
becc2f6a3e Add event handler for each mutator am: a988f08000 am: 01fb1d4c41
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2432532

Change-Id: Ib9b6f0db5dd408a48acddb634b1889403405afc3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-14 20:42:40 +00:00
Liz Kammer
c2e79cbc36 Add getter for EventHandler so its easier to mock am: 073f69d723 am: addb326e69
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2434332

Change-Id: I1a174c90e1d7f7e59f05677cf29363e6320ed9ca
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-14 20:40:40 +00:00
Liz Kammer
01fb1d4c41 Add event handler for each mutator am: a988f08000
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2432532

Change-Id: I977d86f07f9d68534e2f1714379e0882d74b8b48
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-14 19:53:24 +00:00
Liz Kammer
addb326e69 Add getter for EventHandler so its easier to mock am: 073f69d723
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2434332

Change-Id: I5623fa879897e896ba1762172bd0b1a0dc6addf7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-14 19:51:29 +00:00
Liz Kammer
a988f08000 Add event handler for each mutator
Collect additional metrics for individual mutators in order to
understand impact of individual mutators.

Test: m nothing
Change-Id: Ic3ecb1e79a79dd665c9f60d29f0dfd3732481c2d
2023-02-13 18:02:23 -05:00
Liz Kammer
073f69d723 Add getter for EventHandler so its easier to mock
Test: m nothing
Change-Id: Ied338a25f12404ddc88c3b3cb7d7f2ff9ade3aab
2023-02-13 18:02:22 -05:00
Chris Parsons
d6d14057b4 Close ninja file descriptor am: 58a29728ea am: 33d423ce03 am: c7a2ba54bf
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2428033

Change-Id: I2df73f9719ec9a26aa01012e3ce7184e3104265b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-09 21:02:17 +00:00
Chris Parsons
c7a2ba54bf Close ninja file descriptor am: 58a29728ea am: 33d423ce03
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2428033

Change-Id: I652b2701a72de7198553766f90ae396828214103
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-09 19:07:25 +00:00
Chris Parsons
33d423ce03 Close ninja file descriptor am: 58a29728ea
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2428033

Change-Id: I47bb7ac1f2628b3aed73491d71ab0415edfe4654
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-09 17:45:29 +00:00
Chris Parsons
58a29728ea Close ninja file descriptor
With this close() missing, especially with large ninja files, soong paid
the runtime cost at arbitrary times during the rest of its execution (or
during process cleanup).

Test: Manual runs of `m nothing` and verifying timing metrics
Change-Id: Ibdfbf7371cfc4c58c485e76f96b8e9b9ad900972
2023-02-08 23:33:56 -05:00
Cole Faust
8048715429 Show the ninja string that failed to parse in errors am: c5baf11a2d am: c03d43564a am: d7cd87ae92
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2393625

Change-Id: I0377eed81e23f654514c8ea7869ee96bd2bca557
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-20 01:30:49 +00:00
Cole Faust
d7cd87ae92 Show the ninja string that failed to parse in errors am: c5baf11a2d am: c03d43564a
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2393625

Change-Id: I09c15bd36805c6679d7ca2ce05029e5bdcd25d5b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-20 00:55:44 +00:00
Cole Faust
c03d43564a Show the ninja string that failed to parse in errors am: c5baf11a2d
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2393625

Change-Id: Ie6c2eac046adda1bd4a2a57c33658fdc8c6b01a8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-20 00:21:49 +00:00
Cole Faust
c5baf11a2d Show the ninja string that failed to parse in errors
So that it's easier to debug what the problem is.

Test: m nothing
Change-Id: I97e81f98f0365e981d34c6b8bec8528de1b7e514
2023-01-19 14:23:04 -08:00
Treehugger Robot
f7cf32a77e Merge changes I516c984b,I2b3354de am: a405cf7f6a am: a82dd5f183 am: 025144564c
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2364231

Change-Id: I1d105f3fa08b1ce2ddf5ce6e204b9c3aa955e3b7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-21 17:26:56 +00:00
Treehugger Robot
025144564c Merge changes I516c984b,I2b3354de am: a405cf7f6a am: a82dd5f183
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2364231

Change-Id: I46274bfec11afcdb580f7fb1839862c29130df06
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-21 16:40:18 +00:00
Treehugger Robot
a82dd5f183 Merge changes I516c984b,I2b3354de am: a405cf7f6a
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2364231

Change-Id: I29db8b42c0449ee8b2510ca4d5f549e2665ebeb0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-21 16:06:25 +00:00
Treehugger Robot
a405cf7f6a Merge changes I516c984b,I2b3354de
* changes:
  comment on how glob files are written
  cosmetic: use map[_]struct{}  for set semantics
2022-12-21 15:44:42 +00:00
Usta Shrestha
f0e02237da comment on how glob files are written
Bug: NA
Test: NA
Change-Id: I516c984b62d07ca7f188b2faef1466c5720b3b22
2022-12-21 01:04:19 -05:00
Usta Shrestha
09e0dd2ec9 cosmetic: use map[_]struct{} for set semantics
Bug: NA
Test: `m nothing` then view soong_metrics
Change-Id: I2b3354de3259ffef9ae881d59ac844fb518074f2
2022-12-21 01:01:55 -05:00
Sasha Smundak
de8eaaed42 bootstrap.Args should contain only relevant command line arguments am: 08343b7a89 am: 8ede84e357 am: 08080643bc
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2346817

Change-Id: I875692ee6a49b62ed588df7b76e8879a062877c8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-17 01:35:54 +00:00
Sasha Smundak
08080643bc bootstrap.Args should contain only relevant command line arguments am: 08343b7a89 am: 8ede84e357
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2346817

Change-Id: Idd7a6163ccbdb438e5ffa45ca5a990a190d6dc86
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-17 00:36:58 +00:00
Sasha Smundak
8ede84e357 bootstrap.Args should contain only relevant command line arguments am: 08343b7a89
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2346817

Change-Id: I951417af664c64ab1fdf4b1f41ec3a702a33efc9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-17 00:05:46 +00:00
Sasha Smundak
08343b7a89 bootstrap.Args should contain only relevant command line arguments
Soong/Bazel-specific arguments are now kept in Soong.

Test: treehugger
Change-Id: If37bc6ea60b58173baa981bb5c85bfc90102005c
2022-12-14 10:27:31 -08:00
Spandan Das
b76ef1d3a2 Merge "Conditional inclusion of blueprint modules" am: c3887c2bbb am: 9bc3a984d7 am: e2abe5bfa6
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2296765

Change-Id: Ifc91f9fcc16edc676bccaaa914b5700392ab6e2c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-06 01:29:44 +00:00
Spandan Das
e2abe5bfa6 Merge "Conditional inclusion of blueprint modules" am: c3887c2bbb am: 9bc3a984d7
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2296765

Change-Id: If04d9ceaddcbd5c8dc8a28b69241e7c6c9cbb517
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-06 00:50:20 +00:00
Spandan Das
9bc3a984d7 Merge "Conditional inclusion of blueprint modules" am: c3887c2bbb
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2296765

Change-Id: I013db529bab6f374bc1ba5831947464336a571a0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-06 00:18:11 +00:00
Spandan Das
c3887c2bbb Merge "Conditional inclusion of blueprint modules" 2022-12-05 23:50:23 +00:00
MarkDacek
ba4225a07f Add bazel-force-enabled-modules. am: 99f7962b35 am: 2def2db38b am: f1423d13cb
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2322194

Change-Id: I0f37025b73235025f0410a9cf8d6609b65524f4f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 23:44:55 +00:00
MarkDacek
f1423d13cb Add bazel-force-enabled-modules. am: 99f7962b35 am: 2def2db38b
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2322194

Change-Id: I0429639c8191020ccb594e597ddae9c740845514
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 23:00:02 +00:00
MarkDacek
2def2db38b Add bazel-force-enabled-modules. am: 99f7962b35
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2322194

Change-Id: If3e2893d549129999b077de97816a81aa13c6055
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 22:29:42 +00:00
Spandan Das
ed4af01be6 Conditional inclusion of blueprint modules
This introduces a new `blueprint_package_includes` module type. If
present, other blueprint modules in that file will be analyzed
if and only if the requested include tags are met

example syntax:
```
Android.bp
blueprint_packgage_includes {
  match_all: ["tag1", "tag2", ...],
}

other_module1 {...}
other_module2 {...}
```
other_module1 and other_module2 will not be analyzed unless
tag1,tag2, ... are set

This also adds a new object of type `IncludeTags` to the Context object,
which is a container for these string keys.

Test: In build/blueprint, go test ./
Test: TH

Change-Id: I79de0d7da3224a5b2025c27a5137f39d00c7382e
2022-12-02 01:46:28 +00:00
MarkDacek
99f7962b35 Add bazel-force-enabled-modules.
Test: m nothing
Change-Id: I97d8fcb304f0d039fd7bbd3ea3d01966ae25471f
2022-12-01 20:15:33 +00:00
Colin Cross
a02a789e41 Add VariableFuncContext argument to VariableFuncs am: 1b457a5e10 am: 2fde855964 am: 6e7fcd48f5
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2286235

Change-Id: Id8931615071cab3ee2d520572f1d73be173e9e19
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-04 23:32:16 +00:00
Colin Cross
6e7fcd48f5 Add VariableFuncContext argument to VariableFuncs am: 1b457a5e10 am: 2fde855964
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2286235

Change-Id: I6ba6f89a19b1c94fd34b115e639ddd5f0861b7cb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-04 22:44:46 +00:00
Colin Cross
2fde855964 Add VariableFuncContext argument to VariableFuncs am: 1b457a5e10
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2286235

Change-Id: I31c3a919ad66d0abd68bb77aeeca15f6467dd159
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-04 22:15:14 +00:00
Colin Cross
1b457a5e10 Add VariableFuncContext argument to VariableFuncs
Add a VariableFuncContext argument to VariableFuncs that implements
GlobWithDeps.  This will allow Soong to use optimized glob dependencies
in VariableFuncs.

Bug: 257079828
Test: no dependencies on directories in build.ninja.d
Change-Id: Iee5fc9c9ae3087662a5d1a3d7323a87462299205
2022-11-04 18:21:31 +00:00
Devin Moore
c938d3cd6e Merge "bpmodify: Add a set-bool flag to set single boolean values" am: 2a9208713e am: 6a817b84a2 am: feffd3cc82
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2275926

Change-Id: Idb79a4809a9054262f6aa196d6ae38be1d97906c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-28 22:52:12 +00:00
Devin Moore
feffd3cc82 Merge "bpmodify: Add a set-bool flag to set single boolean values" am: 2a9208713e am: 6a817b84a2
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2275926

Change-Id: Ic750d92c1e254e963e384a6374c4c7c2b92a1917
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-28 22:17:56 +00:00
Devin Moore
6a817b84a2 Merge "bpmodify: Add a set-bool flag to set single boolean values" am: 2a9208713e
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2275926

Change-Id: I2340390806878ca8355d16654a2dcef522be45be
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-28 21:34:28 +00:00
Devin Moore
2a9208713e Merge "bpmodify: Add a set-bool flag to set single boolean values" 2022-10-28 20:54:06 +00:00
Devin Moore
753a555fdd bpmodify: Add a set-bool flag to set single boolean values
This is treated similar to other set commands, but add a single boolean
value to the property.

Test: bpmodify_test.go
Test: bpmodify -d -m android.hardware.drm -property frozen -set-bool
false Android.bp
Test: Same command above with "true" "misspelled" "1" for -set-bool
Bug: 231903487

Change-Id: I598da41a38409877af410f9715838d86b0873173
2022-10-28 18:46:51 +00:00
Lukács T. Berki
5027a87f7e Merge "Add order-only inputs for primary builder." am: 93bd28ae61 am: d2ad6f7305 am: 2304757986
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2273286

Change-Id: Id9938d703197cb19e0a364a9a19255610240cf95
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-28 09:05:01 +00:00
Lukács T. Berki
2304757986 Merge "Add order-only inputs for primary builder." am: 93bd28ae61 am: d2ad6f7305
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2273286

Change-Id: Idfa0f14ae23bee6bdefdb6d50d3e5e904c90b07a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-28 08:26:55 +00:00
Lukács T. Berki
d2ad6f7305 Merge "Add order-only inputs for primary builder." am: 93bd28ae61
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2273286

Change-Id: Ifddf21f5bcfef9091ed55c66f877fdcbaad894c2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-28 07:39:37 +00:00
Lukács T. Berki
93bd28ae61 Merge "Add order-only inputs for primary builder." 2022-10-28 07:05:00 +00:00