Commit graph

1866 commits

Author SHA1 Message Date
Lukacs T. Berki
6a48d308a6 Remove ConfigRemoveAbandonedFilesUnder. am: f99e89c147
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1817977

Change-Id: I78ad77bcf99c77e372c3e2cf6c3b207df9965daa
2021-09-06 12:13:16 +00: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
Lukács T. Berki
3b69a0a224 Merge "Rename Blueprints to Android.bp ." am: 5e56efb7c8
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1817978

Change-Id: I70d85f0dccdd6390ca198132455d5ea3b33292c1
2021-09-03 18:38:53 +00:00
Lukács T. Berki
5e56efb7c8 Merge "Rename Blueprints to Android.bp ." 2021-09-03 18:20:39 +00:00
Lukacs T. Berki
8a97f47ac3 Make cmdline args consistent with what they do. am: 9b435b8089
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1815793

Change-Id: I65e4a1ca16684ab1efe7600d55b67fdbb69550d9
2021-09-02 15:48:56 +00:00
Lukacs T. Berki
9b435b8089 Make cmdline args consistent with what they do.
Test: Presubmits.
Change-Id: I6d5f827e06526a121f915aae57c6f086ba44f21d
2021-09-02 13:29:10 +02:00
Lukacs T. Berki
cf5b271af2 Remove the bootstrap.Config class. am: d782b504e0
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1817976

Change-Id: Ifbd54ab958809635d39b49f52ed63765c7c7d3d1
2021-09-02 10:53:13 +00: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
Lukacs T. Berki
d782b504e0 Remove the bootstrap.Config class.
It was confusing because there are two concepts with the same name:
thebootstrapping config special-cased in the bootstrap modules /
singletons and the "global" config.

This change folds the first into the second.

A further next step would be to split the Go parts and the Ninja parts
(subninjas + primary builder invocation) apart, but at some point, I
should stop gold-plating this.

Test: Presubmits.
Change-Id: Id341dee664a9d2527535f4f9980e5f0d10139eef
2021-09-02 09:58:45 +02:00
Lukacs T. Berki
8c57b1e2e9 Simplify bootstrapping: am: ceb3c43f65
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1814783

Change-Id: I9ef24bad2a7dd94fc6780768f590d94c32198d85
2021-09-01 14:28:44 +00:00
Lukacs T. Berki
ceb3c43f65 Simplify bootstrapping:
- Remove the bootstrap_go_binary module type in favor of
blueprint_go_binary
- Make it so that all the binaries used during bootstrapping are in the
host tool directory so that the bootstrap and main Ninja files are
consistent

Test: Presubmits.

Change-Id: I00744fec0474fbea89db6c0c0338856453138564
2021-09-01 11:55:00 +02:00
Lukacs T. Berki
f05ce1b487 Remove some unnecessary arguments from Blueprint. am: ce41c169b5
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1814158

Change-Id: Id3bfbe21e3c1cc94597b513a7f159b52a13e5820
2021-08-31 13:48:47 +00:00
Lukacs T. Berki
ce41c169b5 Remove some unnecessary arguments from Blueprint.
What's gone:

- TopFile (it's always Android.bp)
- GeneratingPrimaryBuilder (we don't make that distinction anymore)

Also rename BuildDir and NinjaBuildDir to SoongOutDir and OutDir,
respectively, to be consistent with the rest of the code.

Test: Presubmits.
Change-Id: I55ecb02a59fe68bf5674395a108181ea7557b21f
2021-08-31 10:58:04 +02:00
Lukacs T. Berki
10c8322ae6 Remove Depfiles from bootstrap.Args . am: 0459f6b18e
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1808877

Change-Id: Ic45a0fd380cb8288a58a7339885ca59d0248c73c
2021-08-27 19:56:54 +00:00
Lukacs T. Berki
0459f6b18e Remove Depfiles from bootstrap.Args .
It is not used anymore; Soong assumes that the depfile is just the name
of the output file with a ".d" suffix.

Test: Presubmits.
Change-Id: Ifbf722dcdffc8420e12a032e23ab791a6be5a736
2021-08-27 15:56:00 +02:00
Lukacs T. Berki
eb25e8caee Rename BuildDir and NinjaBuildDir. am: 5c4abb15e3
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1810317

Change-Id: Ie22c1062431149e97f3bc37395b5c7434e92a476
2021-08-27 13:54:13 +00:00
Lukacs T. Berki
5c4abb15e3 Rename BuildDir and NinjaBuildDir.
These are just out/ and out/soong/ and the old names were quite
confusing.

Test: Presubmits.
Merged-In: Idd9ce3c38a259faabcc56f0cd3fdac8b289123b1
Merged-In: I334ab40c668d2a94536f3e63d5f1fa0b401388ac
Change-Id: Ib7c568c6a97701f2240c5e3f0f2ce67397819ac0
2021-08-26 15:08:09 +02:00
Lukacs T. Berki
3377feea84 Do not separate .primary and .bootstrap dirs. am: 51b625928d
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1802496

Change-Id: I2040b9b2de6bf90c09d8d1723c9165113c75ed6d
2021-08-19 18:17:09 +00:00
Lukacs T. Berki
2ece082345 Do not reference Ninja variables in Makefiles. am: 5f0a740fed
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1800994

Change-Id: I833d40edc47b402ec01770a6cb3e0ac9a2f9f909
2021-08-19 15:16:22 +00:00
Lukacs T. Berki
51b625928d Do not separate .primary and .bootstrap dirs.
This makes it possible to share work between the bootstrap and the main
Ninja file.

As a side fix, remove the reference to $srcDir from moduleSrcDir() since
that is hardwired to "." anyway.

Test: Presubmits.
Change-Id: Ia4a251dd34273ec3e0436ac7a2fbafe4ef46c73f
2021-08-19 16:26:36 +02:00
Lukacs T. Berki
5f0a740fed Do not reference Ninja variables in Makefiles.
installPath was included by androidmk.go in the Soong-generated
Android.mk file, which means that the Ninja variable reference
`$buildDir` passe through Kati, with unpredictable results.

`$buildDir` is still used in a few places, but those are not problematic
because they are not copied to Android.mk (they could probably be
removed, but it's not trivial enough to be done as a drive-by fix)

Test: Presubmits.
Change-Id: I6a5ea8b1679001ff685d263310cb061d3a6a992e
2021-08-19 13:46:22 +02:00
Lukács T. Berki
58c28580fd Merge "Do not do glob-related things in RunBlueprint()." am: 3bec89465e
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1799767

Change-Id: I6e7b980bcdfea32ba32a6f626e16f854ac5b8267
2021-08-19 06:31:35 +00:00
Lukács T. Berki
3bec89465e Merge "Do not do glob-related things in RunBlueprint()." 2021-08-19 06:17:32 +00:00
Lukacs T. Berki
008b6ea661 Do not do glob-related things in RunBlueprint().
From now on, the responsibility of writing build-globs.ninja and adding
the glob list files to build.ninja.d will be the responsibility of
whoever calls Blueprint.

It's nicer this way because the bootstrap Blueprint invocation does not
need globs and Blueprint can be invoked multiple times from the
soong_build binary depending on what it does.

Regrettably, the little Blueprint invocation that generates
build-globs.ninja still requires a reference to a BootstrapConfig
because GlobRule references ${buildDir}.

Side cleanup: remove Args.DocFile, which was unused.

Test: Presubmits.
Change-Id: I37586966e3d6b7557a490ed1ae81ec596ec66ee5
2021-08-19 08:16:19 +02:00
Liz Kammer
32d736310a Use pretty print for json module graph am: 6e4ee8db2d
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1799130

Change-Id: I0d90d7f584ba32ab1af899b340ea265fd64deb64
2021-08-18 07:35:23 +00:00
Liz Kammer
6e4ee8db2d Use pretty print for json module graph
Test: SOONG_DUMP_JSON_MODULE_GRAPH=/tmp/json/srcs m nothing and verify
      output
Change-Id: I779dcebce7435f2f48263909c4c62c27c0fbfec4
2021-08-17 17:32:42 -04:00
Lukacs T. Berki
ee289293ea Remove Srcdir() from BootstrapConfig. am: 6ec924c12b
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1796651

Change-Id: If9394b2a7bc92ba04f37a77dd4138dc54e16cc3b
2021-08-17 15:14:21 +00:00
Lukacs T. Berki
b636b78072 Remove global variables in command.go . am: 980c1f0c72
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1796446

Change-Id: I6bfe4b9864b406e58aa6af2007f486dc6a442b81
2021-08-17 15:14:20 +00:00
Lukacs T. Berki
d812a01b1b Delete support for standalone Blueprint. am: 016a7dd6ef
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1796439

Change-Id: I0383b473121ed81fba0c6fe98ccc8109cced7258
2021-08-17 15:14:20 +00:00
Lukacs T. Berki
7f5966aea0 Remove the ability to emit Blueprint docs. am: 64ee4262a0
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1796437

Change-Id: I22125bda108939bbe6a603abf483a5dbf5d1a851
2021-08-17 15:14:19 +00:00
Lukacs T. Berki
6ec924c12b Remove Srcdir() from BootstrapConfig.
It was always ".".

Test: Presubmits.
Change-Id: I0612b9b07233659adc708b9710db9aec6e24f224
2021-08-16 17:04:50 +02:00
Lukacs T. Berki
980c1f0c72 Remove global variables in command.go .
There used to be two:
- The absolute source directory is now threaded through the code instead
- The command line arguments are moved to soong_build

Test: Presubmits.

Change-Id: Ie09de1a2862ec4ced2c7385198300359f805127d
2021-08-16 15:28:04 +02:00
Lukacs T. Berki
016a7dd6ef Delete support for standalone Blueprint.
Now that Blueprint has been merged with Soong, a large amount of code is
unnecessary.

Test: Presubmits.
Change-Id: I8d30d8b80f37fdc6a9db630a1792c57c7d6edb38
2021-08-16 14:09:47 +02:00
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
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
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
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
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
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
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