Commit graph

2160 commits

Author SHA1 Message Date
Lukacs T. Berki
64ee4262a0 Remove the ability to emit Blueprint docs.
This is not necessary anymore now that Blueprint doesn't have a separate
existence and Soong's documentation generation uses a completely
separate code path.

Test: Presubmits.
Change-Id: Ibc9e57379c5f8ee9a06d90fbe81fac314f01ee92
2021-08-16 13:42:42 +02:00
Lukacs T. Berki
b1bd47c7df Explain why build.ninja is a non-default output. am: 0eb24a7041 am: b7e1688954 am: 5846dbb290 am: f6ff0287bd
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1796431

Change-Id: Ie19d25d30bee86b08fdb8c3d4cd2d5197527f073
2021-08-16 10:45:50 +00:00
Lukacs T. Berki
6c21b1518f Separate the concept of subninjas and glob files. am: d3a0637702 am: ba3389c635 am: 01893ca863 am: 2d36c81913
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1794507

Change-Id: I3482da71182e12704e9e6ce8243d082eb5e2a762
2021-08-16 10:45:44 +00:00
Lukacs T. Berki
f6ff0287bd Explain why build.ninja is a non-default output. am: 0eb24a7041 am: b7e1688954 am: 5846dbb290
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1796431

Change-Id: I1048984b9ac275670d6f9acbd8544ad3c457174a
2021-08-16 10:32:26 +00:00
Lukacs T. Berki
2d36c81913 Separate the concept of subninjas and glob files. am: d3a0637702 am: ba3389c635 am: 01893ca863
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1794507

Change-Id: Id83c6c33047185d47fdce7d95a8dda545dc89f4f
2021-08-16 10:32:20 +00:00
Lukacs T. Berki
5846dbb290 Explain why build.ninja is a non-default output. am: 0eb24a7041 am: b7e1688954
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1796431

Change-Id: I7d980690a82e265e2a9507b89d48acc093adecb3
2021-08-16 10:16:39 +00:00
Lukacs T. Berki
01893ca863 Separate the concept of subninjas and glob files. am: d3a0637702 am: ba3389c635
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1794507

Change-Id: I49747e82f2a49c58fef34997b559afddb0b1bb5c
2021-08-16 10:16:31 +00:00
Lukacs T. Berki
b7e1688954 Explain why build.ninja is a non-default output. am: 0eb24a7041
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1796431

Change-Id: Ia57fa998d681a588d72a72a6281685b67991696a
2021-08-16 10:02:49 +00:00
Lukacs T. Berki
ba3389c635 Separate the concept of subninjas and glob files. am: d3a0637702
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1794507

Change-Id: I4514143e03335dc348c25c6b61f0913224b6b8af
2021-08-16 10:02:43 +00:00
Lukacs T. Berki
0eb24a7041 Explain why build.ninja is a non-default output.
Test: Only comment change.
Change-Id: I335670b7f3bed0fe34fdb1d625b6e459146cc192
2021-08-16 11:48:51 +02:00
Lukacs T. Berki
d3a0637702 Separate the concept of subninjas and glob files.
This makes the distinction between what the bootstrap .ninja file and
the main .ninja files do clearer: the bootstrap .ninja file includes the
build-globs.ninja file(s) which the main .ninja file writes.

This required removing the "default" statement from said bootstrap
.ninja file: now we can build more than one thing instead of just
build.ninja and thus soong_ui explicitly tells Ninja what to do instead.

On the side, stop catering for the use case where the bootstrap
Blueprint invocation uses globs: Soong's does not and that's our only
use case.

Test: Presubmits.

Change-Id: Icffce31928242cfe9cdab56b290a37598d32a58c
2021-08-16 09:16:09 +02:00
Xin Li
87029a352f [automerger skipped] Mark sc-dev-plus-aosp-without-vendor@7634622 as merged am: bb964bc8eb -s ours am: a71df7be16 -s ours am: 990fb5e787 -s ours
am skip reason: Merged-In Ibc01f9d5af34f9caeac114b98f7dfb2b5770f222 with SHA-1 74137dfbbb is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/blueprint/+/15570795

Change-Id: If2adfc7959e4d63c303d3601243c8d5a196848fd
2021-08-14 06:57:06 +00:00
Xin Li
990fb5e787 [automerger skipped] Mark sc-dev-plus-aosp-without-vendor@7634622 as merged am: bb964bc8eb -s ours am: a71df7be16 -s ours
am skip reason: Merged-In Ibc01f9d5af34f9caeac114b98f7dfb2b5770f222 with SHA-1 74137dfbbb is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/blueprint/+/15570795

Change-Id: I7f47059430e40712ad66787c39c05e3b21789268
2021-08-14 06:42:16 +00:00
Xin Li
a71df7be16 [automerger skipped] Mark sc-dev-plus-aosp-without-vendor@7634622 as merged am: bb964bc8eb -s ours
am skip reason: Merged-In Ibc01f9d5af34f9caeac114b98f7dfb2b5770f222 with SHA-1 74137dfbbb is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/blueprint/+/15570795

Change-Id: Id0828b8a4157a52365e327fad35d20e23e22a4d4
2021-08-14 06:29:53 +00:00
Xin Li
bb964bc8eb Mark sc-dev-plus-aosp-without-vendor@7634622 as merged
Merged-In: Ibc01f9d5af34f9caeac114b98f7dfb2b5770f222
Change-Id: Ic01b923c7858bde6cf8d153950fc1771dc52aede
2021-08-14 06:03:52 +00:00
Jingwen Chen
73e7a1f21a Expose build-globs.ninja write function to android/soong. am: 8979d4c54c am: a8b7ca3812 am: 8d49ffc799 am: cdb1e3e267
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1794227

Change-Id: Ibe9315f3c59a2cc15f56676684eba93b5710b295
2021-08-12 15:17:51 +00:00
Jingwen Chen
cdb1e3e267 Expose build-globs.ninja write function to android/soong. am: 8979d4c54c am: a8b7ca3812 am: 8d49ffc799
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1794227

Change-Id: I364aca5bb983252635271d50a4c2863ba699a769
2021-08-12 14:58:15 +00:00
Jingwen Chen
8d49ffc799 Expose build-globs.ninja write function to android/soong. am: 8979d4c54c am: a8b7ca3812
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1794227

Change-Id: Ib1d1af6ad539c64fe30495f19a54ca40fdcecb43
2021-08-12 14:43:26 +00:00
Jingwen Chen
a8b7ca3812 Expose build-globs.ninja write function to android/soong. am: 8979d4c54c
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1794227

Change-Id: I49abb29bd1f36146b414be3add8026269531ccb6
2021-08-12 14:24:23 +00:00
Jingwen Chen
8979d4c54c Expose build-globs.ninja write function to android/soong.
This enables bp2build to write its own build-globs.ninja file.

Test: soong integration tests
Fixes: 193650250
Change-Id: Icb35f3cf3c30929dab1b2c2e9b244321be30f967
2021-08-12 10:13:44 +00:00
Chris Parsons
f5f6cbe480 Add function to retrieve module by name. am: 030150d8f9 am: 2322a800cc am: 74137dfbbb
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1772793

Change-Id: I525109b32e0007249386a9eb2ccad6aa753e5688
2021-07-23 15:40:29 +00:00
Chris Parsons
74137dfbbb Add function to retrieve module by name. am: 030150d8f9 am: 2322a800cc
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1772793

Change-Id: Ibc01f9d5af34f9caeac114b98f7dfb2b5770f222
2021-07-23 15:22:52 +00:00
Chris Parsons
2322a800cc Add function to retrieve module by name. am: 030150d8f9
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1772793

Change-Id: I0369f0189cc8aed26db141a9d34bad554119a17f
2021-07-23 15:05:24 +00:00
Chris Parsons
030150d8f9 Add function to retrieve module by name.
This function should only be used in corner-cases where it is not
possible to retrieve the module by traversing a dependency graph; there
are no guarantees about which variant is returned, and the function will
eagerly panic if something is amiss (the name doesn't belong to a module
but to an alias instead).

This function is particularly useful for bp2build, which does not use
real variants when evaluating the blueprint graph.

Test: With soong change, USE_BAZEL_ANALYSIS=1 m libc
Change-Id: I72b8335b642ed2d05e0a38e448cd380acc8d65b0
2021-07-21 16:16:40 -04:00
Colin Cross
114cfcc355 Support AppendMatchingProperties on an embedded anonymous struct am: 1c3530ab58 am: 8d61e6369d am: 641ccfa1d3
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1748912

Change-Id: Icf1189066f94d67fa837a2543ad660339f9ef11e
2021-07-02 00:13:10 +00:00
Colin Cross
641ccfa1d3 Support AppendMatchingProperties on an embedded anonymous struct am: 1c3530ab58 am: 8d61e6369d
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1748912

Change-Id: I3f63a800f3426c44e561986dd660db907e54490e
2021-07-01 23:52:19 +00:00
Colin Cross
8d61e6369d Support AppendMatchingProperties on an embedded anonymous struct am: 1c3530ab58
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1748912

Change-Id: I6e69a4ca890b230a310b1e336fcd2743e9b753f0
2021-07-01 23:38:40 +00:00
Colin Cross
1c3530ab58 Support AppendMatchingProperties on an embedded anonymous struct
Recurse into embedded anonymous structs and the BlueprintEmbed
workaround structs when looking for properties in
extendPropertiesRecursive.

Test: proptools/extend_test.go
Change-Id: I975651a64e5173747403629a09263562761f1495
2021-06-28 17:08:52 -07:00
Lukacs T. Berki
7e0188edd8 Module/providers can now emit extra JSON data. am: 1602226f23 am: 0c19d0fec8 am: d83120ca1c
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1748035

Change-Id: Id557ff2976126971694c800864dcbaa1d2a1e1f5
2021-06-25 16:21:08 +00:00
Lukacs T. Berki
d83120ca1c Module/providers can now emit extra JSON data. am: 1602226f23 am: 0c19d0fec8
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1748035

Change-Id: I1c2d3a8f051be9fe6dd0b69d20997cefa73b9dfe
2021-06-25 11:26:32 +00:00
Lukacs T. Berki
0c19d0fec8 Module/providers can now emit extra JSON data. am: 1602226f23
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1748035

Change-Id: Iba6d7b2362f0fe2505e0005332e5357e79af19c7
2021-06-25 11:13:59 +00:00
Lukacs T. Berki
1602226f23 Module/providers can now emit extra JSON data.
Test: Presubmits.
Change-Id: I448e85f9144b9b35e7822ab7629329bae7a2fb8e
2021-06-25 10:31:10 +02:00
Spandan Das
717e570c11 Delete creation of empty glob file am: 3a495910ad am: 78f4755aaa am: ff59682013
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1736533

Change-Id: If25e1c8afdffe2804f6117d6f8c796db89d6d819
2021-06-15 20:24:47 +00:00
Spandan Das
ff59682013 Delete creation of empty glob file am: 3a495910ad am: 78f4755aaa
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1736533

Change-Id: I4e56ca0611817fca2723821ed3b7f34fe11a8bbf
2021-06-15 20:06:53 +00:00
Spandan Das
78f4755aaa Delete creation of empty glob file am: 3a495910ad
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1736533

Change-Id: I9f3365344ef37afa9f389b604c4a68a2d7f8c995
2021-06-15 19:46:19 +00:00
Spandan Das
3a495910ad Delete creation of empty glob file
An empty glob file would be created inside the source tree if
soong_build is invoked directly (instead of via soong_ui). This logic is
now moved to soong/ui/build to prevent this behavior

Bug: 187194795
Test: Ran the following command locally for the target
art-target-arm:git_master-art
```
. ./build/envsetup.sh && lunch armv8-eng &&
art/tools/buildbot-build.sh --target
```
Before change glob file is created in $TOP/.bootstrap
After change glob file is created in $TOP/out/soong/.bootstrap

Change-Id: I6745996c940d790d1f1f387ca08aafc6a8a669df
2021-06-15 17:57:03 +00:00
Treehugger Robot
b5fc868f37 Merge "Add support for maps as properties" am: 16caaa4817 am: 2b3a6a50d5 am: 6845418d18
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1715913

Change-Id: I609831b31fd6957fcc654b59d2b71d268f3bf110
2021-05-27 21:11:22 +00:00
Treehugger Robot
6845418d18 Merge "Add support for maps as properties" am: 16caaa4817 am: 2b3a6a50d5
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1715913

Change-Id: I2e0f1cfbc1d30c79f2c9c1c497d00bfd61d36a13
2021-05-27 20:34:47 +00:00
Treehugger Robot
2b3a6a50d5 Merge "Add support for maps as properties" am: 16caaa4817
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1715913

Change-Id: I134c53bd884308243b4c0c2d026736bec92288c8
2021-05-27 20:06:35 +00:00
Treehugger Robot
16caaa4817 Merge "Add support for maps as properties" 2021-05-27 19:32:37 +00:00
Colin Cross
41624abee4 Add a test for AddNinjaFileDeps am: 7a2a352825 am: bec4769941 am: c36186601c
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1715723

Change-Id: I961e7bc14d3b3ab654b398cc7a81c311c5e4d31b
2021-05-26 18:06:31 +00:00
Colin Cross
c36186601c Add a test for AddNinjaFileDeps am: 7a2a352825 am: bec4769941
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1715723

Change-Id: Iadeb6705befa4dba70a714f958873e6fcd4cba46
2021-05-26 17:43:23 +00:00
Colin Cross
bec4769941 Add a test for AddNinjaFileDeps am: 7a2a352825
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1715723

Change-Id: Ieb32a2a0a399fc3fe7f354cf0bd20621ea3d5342
2021-05-26 17:21:44 +00:00
Liz Kammer
c1ccfee2bd Add support for maps as properties
This support enables specifying properties of the type "map" within a
Soong module, but explicitly does not allow them to be used within a bp
file.

This means that rather than specifying each arch/os/target within a
struct to support arch-variant properties/attributes, we can use a map.
This allows us to simplify the implementation of LabelAttribute,
StringListAttribute, and LabelListAttribute as the number of select
statements supported becoming large and hard results in a lot of
duplication.

Test: go test blueprint tests
Test: m nothing
Change-Id: I88cc5952a6bdb60a2344fa0737216f016086cea5
2021-05-26 09:54:22 -04:00
Colin Cross
7a2a352825 Add a test for AddNinjaFileDeps
Add a test for all the contexts that call AddNinjaFileDeps to ensure
they are propagated back to the main method.

Bug: 188547846
Test: TestAddNinjaFileDeps
Change-Id: Iaab32b8237eecee07fb930f2f9fe337c7d4e047c
2021-05-24 17:20:55 -07:00
Dan Willemsen
d772901373 Add blueprint_go_packages phony to build all go packages am: 0f0e304d08 am: 5832a98338 am: f060e1f905
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1713431

Change-Id: Ie1b98d5885cc33ceb1f9e33cbc01bd81e839c842
2021-05-24 22:18:47 +00:00
Dan Willemsen
f060e1f905 Add blueprint_go_packages phony to build all go packages am: 0f0e304d08 am: 5832a98338
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1713431

Change-Id: I092c67fdcd674b0a9ee2239be692f0bfef0cd587
2021-05-24 21:54:48 +00:00
Dan Willemsen
5832a98338 Add blueprint_go_packages phony to build all go packages am: 0f0e304d08
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1713431

Change-Id: I6fa5e01c5e68cd933eb8abe29d808ff4941bcf0d
2021-05-24 21:38:44 +00:00
Dan Willemsen
0f0e304d08 Add blueprint_go_packages phony to build all go packages
We have `blueprint_tools` that can build all Go binaries (and run their
associates tests). But if a package is not (yet) used, it won't be
included there. This makes testing the build of new Go packages
difficult.

Test: m blueprint_go_packages
Change-Id: I7a67cf2593fedcf499d40d82c266d3b0d7ebbef2
2021-05-24 11:36:37 -07:00
Neil Fuller
0af623d52a [automerger skipped] Merge "Fix AddNinjaFileDeps in a LoadHook" into sc-dev am: a90cba820b -s ours am: 0bbd97040f -s ours
am skip reason: Merged-In If8176474b5094ee40d07df12f5da79a906ce7290 with SHA-1 8266ace31a is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/blueprint/+/14683378

Change-Id: Iee56b417124bb238aa5cb578561d9b2c224a790e
2021-05-24 11:22:50 +00:00