Commit graph

1356 commits

Author SHA1 Message Date
Colin Cross
ba9a3b9ea8 Merge remote-tracking branch 'aosp/upstream' am: ce522b4826
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1401130

Change-Id: Ib14cd39cef93cefdcbcb78564767b936c77856af
2020-08-14 23:00:02 +00:00
Colin Cross
ce522b4826 Merge remote-tracking branch 'aosp/upstream'
* aosp/upstream:
  Add CreateAliasVariation
  Combine variant fields into variant struct

Bug: 164216768
Test: m checkbuild
Change-Id: Ie46adc27a7af6a35803f2189ed7dbc154de79541
2020-08-14 14:05:56 -07:00
colincross
bc973ffe1e
Merge pull request #314 from colincross/alias_variations
Add CreateAliasVariation
2020-08-14 13:47:14 -07:00
Colin Cross
279489c017 Add CreateAliasVariation
CreateAliasVariation creates a new variation for the current mutator
that is an alias to a variation that was created with CreateVarations
by the same mutator.  It is similar to AliasVariation, except that
AliasVariation creates an alias from the pre-mutated variant to one
of the new variations, while CreateAliasVariation creates an alias
from a new post-mutated variation to one of the new variations.

Bug: 164216768
Test: TestCreateAliasVariation
Change-Id: I8847b8d6fc1d3248abc910b2fe2399881f9bdaee
2020-08-14 11:15:58 -07:00
Colin Cross
edc41769fe Combine variant fields into variant struct
Combine variant, variations and dependencyVariations into a single
struct.

Test: blueprint tests
Change-Id: I76811bb2bdf76f1b4cffc6a7b9bc7362ecb5f7b9
2020-08-14 11:15:58 -07:00
Colin Cross
ec4ae78c09 Merge remote-tracking branch 'aosp/upstream' into inclusive am: c69182870e
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1380886

Change-Id: I5ca3261464e85a1bcf413f6d9fa5addee84f39e1
2020-08-06 20:06:02 +00:00
Colin Cross
c69182870e Merge remote-tracking branch 'aosp/upstream' into inclusive
* aosp/upstream:
  Android inclusive language fixit.  Make comment more succinct, clear and remove use of term "sanity".
  Update bpdocs to filter nested properties by tags (#312)

Bug: 162536543
Test: m checkbuild
Change-Id: I4b40b1637e142d2f2fd513f62357213a9832bbaa
2020-07-30 17:28:24 -07:00
colincross
576b0fd577
Merge pull request #313 from colincross/inclusive
Android inclusive language fixit.  Make comment more succinct, clear …
2020-07-30 16:51:50 -07:00
Daniel Cardenas
5de3dc04e0 Android inclusive language fixit. Make comment more succinct, clear and remove use of term "sanity".
Bug: 162536543
Change-Id: I4b40b1637e142d2f2fd513f62357213a9832bbaa
2020-07-30 16:48:42 -07:00
Liz Kammer
9810dcd4b9
Update bpdocs to filter nested properties by tags (#312)
* Update bpdocs to filter nested properties by tag

Prior to this change nested properties tagged with `blueprint:"mutated"`
are erroneously included in documentation, this corrects that behavior
and adds testing to verify.

Tested: go test bpdocs tests
Change-Id: I822c9a98276634d2f584d8709e83003824cdffd5
2020-07-28 09:30:46 -07:00
Colin Cross
d5cf2cb6be Merge remote-tracking branch 'aosp/upstream' am: 9b15d1a888
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1364798

Change-Id: I9fcc87af3d45dcc134e8b32cacbab1d0157448dc
2020-07-16 22:08:46 +00:00
Colin Cross
9b15d1a888 Merge remote-tracking branch 'aosp/upstream'
* aosp/upstream:
  Add flag to use validations for tests
  Add Validations support to Blueprint
  Remove unused Context.ModulePath

Test: m checkbuild
Change-Id: Ib63d651e79801121681dff449136067d1ea3b321
2020-07-16 13:00:57 -07:00
colincross
94594808c5
Merge pull request #308 from colincross/modulepath
Remove unused Context.ModulePath
2020-07-16 12:54:17 -07:00
colincross
ab003ffcee
Merge pull request #311 from colincross/validations
Add Validations support to Blueprint
2020-07-09 19:20:01 -07:00
Colin Cross
0cdec99c81 Add flag to use validations for tests
Using validations for tests ensures the tests run without blocking
the critical path.

Change-Id: Icb21a52e96f70d815f7df86882351c13f5575cf5
2020-07-09 14:28:20 -07:00
Colin Cross
9ece72b055 Add Validations support to Blueprint
The Android fork of Ninja supports "validations", a node that is
added to the top level of the build graph whenever another node
is in the build graph.  Add support in Blueprint to specify them
on build statements and write them to the ninja.

Test: ninja_writer_test.go
Change-Id: I87cd1281dbd2ed113cc26a265c50d20c65118c91
2020-07-09 14:28:20 -07:00
Colin Cross
8ea9686962 Merge remote-tracking branch 'aosp/upstream' am: 726d2e6085
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1354383

Change-Id: Ic720c2289434125580ff1e832a32ddf1438f1f30
2020-07-08 18:22:28 +00:00
Colin Cross
8e454c5575 Remove unused Context.ModulePath
Context.ModulePath is a duplicate of Context.BlueprintFile, and is
misleading because it returns the path to the Android.bp, and not
the path to the directory that contains the Android.bp file like
ModuleContext.ModuleDir.

Change-Id: I505136fce3c3d37595cd4b4e08de5e2691a2a0f6
2020-07-06 13:34:42 -07:00
Colin Cross
726d2e6085 Merge remote-tracking branch 'aosp/upstream'
* aosp/upstream:
  Add ReplaceDependeciesIf to allow for conditional replacement

Test: m checkbuild
Change-Id: Iff96881da42c7ea3c3594d2ff2451215c38c4cdc
2020-07-02 09:04:03 -07:00
colincross
e635dc0568
Merge pull request #307 from paulduffin/master
Add ReplaceDependeciesIf to allow for conditional replacement
2020-06-30 09:37:59 -07:00
Paul Duffin
8969cb6170 Add ReplaceDependeciesIf to allow for conditional replacement
Adds support for making the replacement of one dependency with another
conditional on the from and to module as well as the tag used.
2020-06-30 12:15:26 +01:00
Dan Willemsen
bc3c09c88d Merge remote-tracking branch 'aosp/upstream' am: d877dde242
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1349285

Change-Id: I5847b94560a809797bee3b7cbff9de1c87a8b1a8
2020-06-25 00:54:17 +00:00
Dan Willemsen
d877dde242 Merge remote-tracking branch 'aosp/upstream'
* aosp/upstream:
  Stop writing depfiles from Glob singleton

Bug: 159845846
Test: manually check that changes to directories cause glob re-execution
Test: second build after a clean does not rerun soong_build
Change-Id: I1f257f3f11f70cb407397854fd85292dd0d0b08e
2020-06-24 16:22:27 -07:00
Dan Willemsen
fe13954f3c
Merge pull request #306 from danw/globs
Stop writing depfiles from Glob singleton
2020-06-24 14:35:11 -07:00
Dan Willemsen
55252655d2 Stop writing depfiles from Glob singleton
This makes a minimal difference on my AOSP tree (which is on a fast NVME
drive), but it saves ~10-15% of the time in our primary builder
(soong_build) on larger trees on slower drives.

We're always going to run the glob tool at least once outside of the
primary builder, and ninja only loads depfiles created after running the
tool, so this should be a no-op change.

We still need to write the list file (if it has changed), since that's
the file we're adding as a dependency of the primary builder, so the
effective timestamp must be earlier than the build.ninja timestamp.

Change-Id: I872b7581da50e7f2089daa7e248ca05b6703f019
2020-06-24 14:23:22 -07:00
Chris Parsons
470dd942e7 Merge remote-tracking branch 'aosp/upstream' into pull-upstream-2 am: 10b473fefa
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1339763

Change-Id: Ifcf191ebc34518c85a7a79b149e7eaa2d06c8e8a
2020-06-16 22:47:53 +00:00
Chris Parsons
10b473fefa Merge remote-tracking branch 'aosp/upstream' into pull-upstream-2
* aosp/upstream:
  Use github actions instead of travis
  Export ModuleListFile in bootstrap (with fix) (#304)
  Revert "Merge pull request #301 from c-parsons/modulelistfile"
  Revert "Always emit rules for tests and add phony to run them"
  Revert changes to singleton_ctx.go
  Change bootstrap.moduleListFile to be exported
  Add a getter for ModuleListFile to SingletonContext

Test: `m nothing` and treehugger
Change-Id: I37cb1b08d962ab34d3b7d7999496795986315217
2020-06-16 13:02:55 -04:00
Dan Willemsen
2c0cd0ac8d
Merge pull request #305 from danw/ghactions
Use github actions instead of travis
2020-06-15 11:19:25 -07:00
Dan Willemsen
bb7ecb7fb3 Use github actions instead of travis
Change-Id: I8a03ca383c53bbcacc403cb954fc2ec2af8fe33d
2020-06-15 10:32:10 -07:00
c-parsons
fe2fa04c30
Export ModuleListFile in bootstrap (with fix) (#304)
* Export ModuleListFile in bootstrap (with fix)

* Run gofmt on command.go
2020-06-15 09:03:27 -07:00
colincross
743261c07e
Merge pull request #303 from colincross/blueprint_tests
Revert changes that broke the build or tests
2020-06-11 16:34:45 -07:00
Colin Cross
bae4de9f16 Revert "Merge pull request #301 from c-parsons/modulelistfile"
This reverts commit 1160e9826f, reversing
changes made to 3a153ecc7f.
2020-06-11 16:29:43 -07:00
Colin Cross
f89751462c Revert "Always emit rules for tests and add phony to run them"
This reverts commit 63085f9e7c.

It breaks the blueprint tests, and we aren't use it yet, so revert
it for now.

Change-Id: I1ac81371342285e8d57baf15fe3a223d4140c6cf
2020-06-11 16:23:10 -07:00
colincross
1160e9826f
Merge pull request #301 from c-parsons/modulelistfile 2020-06-04 14:42:05 -07:00
Colin Cross
f7f790fe75 Merge remote-tracking branch 'aosp/upstream' am: 91fa1c8b99
Change-Id: I032e8b1478d5aa46fe603dd346705c22bcefd581
2020-05-28 02:59:50 +00:00
c-parsons
01e094f1b4
Revert changes to singleton_ctx.go 2020-05-27 21:34:26 -04:00
c-parsons
8690f8f196
Change bootstrap.moduleListFile to be exported 2020-05-27 21:31:07 -04:00
Colin Cross
91fa1c8b99 Merge remote-tracking branch 'aosp/upstream'
* aosp/upstream:
  Add ctx.OtherModule(Reverse)DependencyVariantExists.

Bug: 151303681
Test: treehugger
Change-Id: I2389db5e558a34b8a44756bdd2a5f91a0a0f6a3f
2020-05-26 14:48:26 -07:00
colincross
3a153ecc7f
Merge pull request #300 from marstj/master
Add ctx.OtherModule(Reverse)DependencyVariantExists.
2020-05-26 13:27:14 -07:00
Martin Stjernholm
2f212479e2 Add ctx.OtherModule(Reverse)DependencyVariantExists.
This allows guarding calls to AddVariationDependencies and
AddReverseDependency to register dependencies on optional modules.
2020-05-26 20:52:43 +01:00
Chris Parsons
56a06b3c06 Add a getter for ModuleListFile to SingletonContext 2020-05-20 13:50:58 -04:00
Colin Cross
0f1a8e2f85 Merge remote-tracking branch 'aosp/upstream' am: 709f28242e
Change-Id: I4aee761b65fdde0fbe2640df98dafc2a68cdd0b0
2020-05-18 20:40:44 +00:00
Colin Cross
709f28242e Merge remote-tracking branch 'aosp/upstream'
* aosp/upstream:
  Support checking syntax of generated Blueprint files
  Always emit rules for tests and add phony to run them

Bug: 155628860
Bug: 156428456
Test: treehugger
Change-Id: Ia0e0c8d8d07489c945d4e03d039273cc3f597ac0
2020-05-18 12:03:48 -07:00
colincross
2bcc43c60f
Merge pull request #299 from paulduffin/master
Support checking syntax of generated Blueprint files
2020-05-14 16:10:00 -07:00
Paul Duffin
2a2c58ef46 Support checking syntax of generated Blueprint files
Adds a CheckBlueprintSyntax(...) method to check the syntax of a
Blueprint file.

Changes processModuleDef and newModule from being method on *Context to
being standalone functions. That ensures that CheckBlueprintSyntax(...)
does not need to take a context and so there is no chance that it can
change its state.
2020-05-13 09:06:17 +01:00
colincross
301749801e
Merge pull request #298 from colincross/blueprint_tests
Always emit rules for tests and add phony to run them
2020-05-12 20:45:35 -07:00
Colin Cross
63085f9e7c Always emit rules for tests and add phony to run them
Emit the rules to build blueprint tests even if runGoTests is not
set, and add a phony rule "blueprint_tests" to run them.  This will
allow Soong to stop running the tests at the beginning of every build
but still run them as part of checkbuild or with a manual
`m blueprint_tests`.

Bug: 156428456
Test: m
Test: m blueprint_tests
Change-Id: If293a0757766d3046e78bf230a1825f15adc68fd
2020-05-12 19:20:26 -07:00
Colin Cross
8f60c67b41 Merge remote-tracking branch 'aosp/upstream' am: 6f902c4134
Change-Id: I49d97f46239283fadb938133d26b801d714c6327
2020-05-06 02:43:36 +00:00
Colin Cross
6f902c4134 Merge remote-tracking branch 'aosp/upstream'
* aosp/upstream:
  Run LoadHooks before registering module

Bug: 155462403
Test: treehugger
Change-Id: I649f2a524f200d696b038ee6bc99d95308e1b475
2020-05-04 08:30:27 -07:00
colincross
b0fe51a0c2
Merge pull request #297 from paulduffin/master
Run LoadHooks before registering module
2020-05-04 08:27:39 -07:00