Commit graph

11 commits

Author SHA1 Message Date
Yu Liu
82e444710d Write ninja file in parallel.
Bug: 335718784
Test: CI
Change-Id: I26f7babca349c654780711cfe0f0ece3faa5f436
2024-05-20 21:46:19 +00:00
Colin Cross
95b3627f6f Move TransitionMutator to transition.go and add tests
Bug: 319288033
Test: transition_test.go
Change-Id: Ia6fd96a69f559e3356155954fd021ec8d7293908
2024-04-12 14:58:58 -07:00
Cole Faust
6437d4e737 Select statements
Select statements are a new blueprint feature inspired by bazel's select
statements. They are essentially alternative syntax for soong config
variables that require less boilerplate. In addition, they support
making decisions based on a module's variant, which will eliminate
the need for manual property struct manipulation, such as the arch
mutator's arch: and target: properties.

In order to support decisions based on the variant, select statements
cannot be evaluated as soon as they're parsed. Instead, they must be
stored in the property struct unevaluated. This means that individual
properties need to change their type from say, string, to
Configurable[string]. Currently, only configurable strings, bools, and
string slices are supported, but more types can be added later.
The module implementation must call my_property.Evaluate(ctx) in order
to get the final, resolved value of the select statement.

Bug: 323382414
Test: go tests
Change-Id: I62f8721d7f0ac3d1df4a06d7eaa260a5aa7fcba3
2024-03-06 15:00:39 -08:00
Cole Faust
7add62142d Enforce that providers are not changed
When setProvider() is called, hash the provider and store the hash in
the module. Then after the build is done, hash all the providers again
and compare the hashes. It's an error if they don't match.

Also add a flag to control it in case this check gets slow as we convert
more things to providers. However right now it's fast (unnoticable
in terms of whole seconds) so just have the flag always enabled.

Bug: 322069292
Test: m nothing
Change-Id: Ie4e806a6a9f20542ffcc7439eef376d3fb6a98ca
2024-01-30 15:18:24 -08:00
Aditya Choudhary
a992d06f60 Create src file provider in build/blueprint
Change-Id: I7091effe7791c1f3ea57e775b37cd72f4ee13d03
2023-12-05 07:14:29 +00:00
Steven Moreland
d457f11884 Add name hint to blueprint.
Bug: N/A
Test: updated
Change-Id: Iac9218aa7621dd6223dc26a9f2ebec5d68211328
2023-04-10 20:21:15 +00:00
Chris Parsons
c2753f9bfa Fix bpmodify Android.bp definition
With this fix, running `m bpmodify` will correctly generate a go binary
at out/host/linux-x86/bin/bpmodify, after running tests in
bpmodify_test.go.

Test: m bpmodify
Change-Id: I42be5a366891b51a559d39d72d2b013e3a115492
2022-08-02 15:25:59 -04:00
Chris Parsons
18ebb2318a Add event handling to blueprint for metrics
In conjunction with soong/build changes, this materialized runtime
metrics for various soong_build events.

Test: Manually verified materialized protos for bp2build, mixed builds,
and legacy build.

Change-Id: Ia92403605e3063028dbf6a1ded8449c190b9e63e
2022-03-25 13:15:17 -04:00
Bob Badour
76f9b09e3d [LSC] Add LOCAL_LICENSE_KINDS to build/blueprint
Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to:
  Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: Iba783a5b977976ee2d49a8553908fec1219dad68
2021-09-08 14:01:45 -07:00
Lukacs T. Berki
f99e89c147 Remove ConfigRemoveAbandonedFilesUnder.
It was not implemented by anyone.

Test: Presubmits.
Change-Id: I8b98620c0ef9c1f242fe7fc0a7d810f2af15d042
2021-09-06 11:35:28 +02:00
Lukacs T. Berki
eef5685c65 Rename Blueprints to Android.bp .
This was the only one in the source tree.

Side cleanup: remove some dead code that I assume comes from the time
where Blueprint files had to specify what subdirectories other Blueprint
files are in.

Test: Presubmits.
Change-Id: If84c4e85bc5516f30da97c1be29b56e50dddb3c4
2021-09-02 11:48:19 +02:00
Renamed from Blueprints (Browse further)