Commit graph

1291 commits

Author SHA1 Message Date
Colin Cross
67d0cbed90 Fix missing glob filelists when sandboxed
Sandboxing the primary builder caused the glob filelists to not
be written because they were using a relative path, causing
primary builder reruns on the second build.

Also report errors when writing the filelist files.

Test: m checkbuild
Change-Id: Id1706560d04c85f00f829cfb714967bb8600626f
2020-01-16 10:57:08 -08:00
Colin Cross
1cda3fd3e4 Fix primary builder reruns caused by globs
Globs produce a filelist using restat rules to avoid primary builder
reruns.  On the first execution of the primary builder the filelists
are written directly by the primary builder, so that the second
execution can restat them all but avoid rerunning the primary builder.
This wasn't working because the glob filelists were written after
the build.ninja file, but the build.ninja file depends on the
filelists.  Switching the order avoids the extra rerun.

Test: m nothing && m nothing
Change-Id: Ia8e0924598220d4ff34235907a8de2e3e03632df
2020-01-16 10:38:46 -08:00
Sasha Smundak
d7a5f952f2 Add mappings for Go extractor.
Bug: 137798757
Test: manual
Change-Id: I48905714d5fb4c4051c2ef3c77d8ff03d9935480
2020-01-14 17:02:29 -08:00
colincross
b92b466a46
Merge pull request #276 from colincross/blueprintsfile
Add EarlyModuleContext.BlueprintsFile
2020-01-14 14:14:41 -08:00
Colin Cross
c03a50c49c Add EarlyModuleContext.BlueprintsFile
EarlyModuleContext already has ModuleDir, add BlueprintsFile too.

Test: m checkbuild
Change-Id: Ia9e0c724562e1461dfcd5e01f56ff8abbea2ac06
2020-01-14 13:00:01 -08:00
Automerger Merge Worker
ca01e7e98f Merge remote-tracking branch 'aosp/upstream' into master am: de71320aa6 am: 1b5f9af317
Change-Id: I70c865fb198e30cd381b0b14c4fa2785d7908d7b
2020-01-11 07:17:14 +00:00
Colin Cross
1b5f9af317 Merge remote-tracking branch 'aosp/upstream' into master
am: de71320aa6

Change-Id: I3358f3d9f28e37922a1699d02ddd1f7b4722aed0
2020-01-10 23:00:52 -08:00
Colin Cross
de71320aa6 Merge remote-tracking branch 'aosp/upstream' into master
* aosp/upstream:
  Fix reading absolute paths through OsFs

Bug: 146437378
Test: m checkbuild
Change-Id: Iabee4c296902a227def128b6285118de50917885
2020-01-10 17:09:30 -08:00
colincross
b6ebce2c23
Merge pull request #275 from colincross/sandbox_primary_builder
Fix reading absolute paths through OsFs
2020-01-10 14:16:28 -08:00
Colin Cross
2f95ec7031 Fix reading absolute paths through OsFs
OsFs may be asked to read absolute paths if buildDir is absolute.
Check if the path is absolute before prepending srcDir to it.

Bug: 146437378
Test: fs_test.go
Change-Id: I2a67593e9d836ca3e11dc10b81f49a4fb49d2cdf
2020-01-10 13:52:22 -08:00
Automerger Merge Worker
cd0c3da180 Merge remote-tracking branch 'aosp/upstream' into master am: 40e4d10377 am: a722dcff9a
Change-Id: Ia893371a10874dc53fc1e624370746a8b030e7d7
2020-01-10 17:52:44 +00:00
Colin Cross
a722dcff9a Merge remote-tracking branch 'aosp/upstream' into master
am: 40e4d10377

Change-Id: I0c0849f3f7a9de20def3dccd401b17191f422807
2020-01-10 09:37:47 -08:00
Colin Cross
40e4d10377 Merge remote-tracking branch 'aosp/upstream' into master
* aosp/upstream:
  Allow primary builder to change working directory

Bug: 146437378
Test: m checkbuild
Change-Id: I95c476539cd2a74500b3f94baf048306ad5d9eca
2020-01-09 14:25:08 -08:00
colincross
5e8efd5f08
Merge pull request #274 from colincross/sandbox_primary_builder
Allow primary builder to change working directory
2020-01-09 12:56:10 -08:00
Colin Cross
c5fa50e057 Allow primary builder to change working directory
Bug: 146437378
Test: pathtools/fs_test.go
Change-Id: I513ceb9b8b0b4f18223bc34ecad9846fe220709b
2020-01-08 15:54:58 -08:00
Automerger Merge Worker
e356e519fd Merge remote-tracking branch 'aosp/upstream' into master am: 86286b9ac9 am: 2ad0aebc37
Change-Id: If811a4aff87b0be85e0519925bfb7938024c22c0
2020-01-06 23:03:12 +00:00
Colin Cross
2ad0aebc37 Merge remote-tracking branch 'aosp/upstream' into master
am: 86286b9ac9

Change-Id: I7de707e2e39e3159e37da789ba65fb7d5f78e45a
2020-01-06 14:48:45 -08:00
Colin Cross
86286b9ac9 Merge remote-tracking branch 'aosp/upstream' into master
* aosp/upstream:
  Move unpackProperties to proptools and export it
  Add scoped module factories
  Move LoadHooks from Soong to Blueprint

Test: m checkbuild
Change-Id: I25ac946cdbe6c4faca167413c347f3de4be58024
2020-01-06 12:59:56 -08:00
colincross
55ca1c0860
Merge pull request #273 from colincross/scoped_module_factories
Scoped module factories
2020-01-06 12:53:54 -08:00
Colin Cross
f27c5e470b Move unpackProperties to proptools and export it
Test: unpack_test.go
Change-Id: I145369323bd7d5003a261c13dfb8ed31d0be51b5
2020-01-02 20:32:51 -08:00
Colin Cross
9672d86a87 Add scoped module factories
Add RegisterScopedModuleType to LoadHookContext that registers
a module type factory that will be visible for the remainder of
the file.  Also add ModuleFactories that returns the globally
register module factories.

Test: all blueprint tests
Change-Id: If646a73befe3b8e45c4b0984531c6a39ddc8d066
2020-01-02 20:32:51 -08:00
Colin Cross
da70fd0b84 Move LoadHooks from Soong to Blueprint
Move LoadHooks from Blueprint and run them during ParseBlueprintsFiles.
This will allow them to add scoped module types that are visible to the
rest of the Blueprints file.  Requires passing the config object to
ParseBlueprintsFiles.

Test: all blueprint tests
Change-Id: Ia2a2c9a0223d5458bfd48bd22ebed0fdbd0156c6
2020-01-02 20:32:51 -08:00
Automerger Merge Worker
12612a4222 Merge remote-tracking branch 'aosp/upstream' into master am: 88e39c0c1c am: cfcbd29e86
Change-Id: I9c3a79ef2d8cfdbdf4e8a97011a03cc1a0c6f628
2019-12-18 20:07:02 +00:00
Colin Cross
cfcbd29e86 Merge remote-tracking branch 'aosp/upstream' into master
am: 88e39c0c1c

Change-Id: Ib75816fe43d1aaaa9d71f817459e1d3cedf4b199
2019-12-18 11:50:01 -08:00
Colin Cross
88e39c0c1c Merge remote-tracking branch 'aosp/upstream' into master
* aosp/upstream:
  Add Context.SetFs

Bug: 146437378
Test: m checkbuild
Change-Id: I5d40d2467957b34fb8787b5d12b9b994d8627ad1
2019-12-17 15:55:16 -08:00
colincross
9999eddc46
Merge pull request #272 from colincross/sandbox_primary_builder
Add Context.SetFs
2019-12-17 14:42:15 -08:00
Colin Cross
8cde425b60 Add Context.SetFs
Allow the primary builder to set the filesystem directly.

Bug: 146437378
Test: m checkbuild
Change-Id: Ic8cc3e6a03943d5f47b041a66df6a11f4336c97b
2019-12-17 13:14:31 -08:00
Jiyong Park
f357be7758 Merge remote-tracking branch 'upstream/master' into merge am: 3bbc581d99
am: 62aa0764a6

Change-Id: Ic3e0c449d14266bde7e35376fde74bfc4c5aa137
2019-11-18 20:44:24 -08:00
Jiyong Park
62aa0764a6 Merge remote-tracking branch 'upstream/master' into merge
am: 3bbc581d99

Change-Id: I976aefa9ce61d3b6fc48f9730caf80113c3b98d9
2019-11-18 20:41:09 -08:00
Jiyong Park
3bbc581d99 Merge remote-tracking branch 'upstream/master' into merge
* upstream/master:
  Slice properties can be replaced

Test: TH
Change-Id: I46603fde9d5824c4a2e633b8d2c81a6b6a5d6e7d
2019-11-19 12:18:35 +09:00
Jaewoong Jung
cecffaf05e
Merge pull request #270 from jiyongp/replace_properties
Slice properties can be replaced
2019-11-18 18:16:30 -08:00
Jiyong Park
10f27f8139 Slice properties can be replaced
override_* in Soong requires a module to override certain properties of
other module. In that case, values of a slice property (e.g. []string)
should be replaced by the same property value in the overriding module.
However, since proptools only supports Append and Prepend orders where
the original values are kept for slice properties, the behavior
couldn't be implemented. To support the use case, Replace order is
introduced, in which case slice property values are completely replaced.
For other types of properties, the Replace order behaves exactly the
same as the Append order.

Bug: 144338929
Test: m

Change-Id: Iae9feda035177fe6a22e6e8319c0fdaa9e08e85e
2019-11-19 10:45:58 +09:00
Jaewoong Jung
a67e7d88d2 Merge remote-tracking branch 'upstream/master' into merge am: 24f0b26d90
am: 792b384412

Change-Id: I094a649a4d27a95558e15efdd3d57eed38670f95
2019-11-15 11:20:20 -08:00
Jaewoong Jung
792b384412 Merge remote-tracking branch 'upstream/master' into merge
am: 24f0b26d90

Change-Id: Id11e01ecac6b061e28b54657cdc39e70d9b770d3
2019-11-15 11:12:53 -08:00
Jaewoong Jung
24f0b26d90 Merge remote-tracking branch 'upstream/master' into merge
* upstream/master:
  Add support for module variant aliases
  Delay allocating variationMaps until populating them
  Use module groups more widely

Test: TreeHugger
Change-Id: Ic591beac1ec34543ca8c1dfe7bc3ba456e763d7c
2019-11-15 07:45:46 -08:00
colincross
eda08050f3
Merge pull request #269 from colincross/alias
Add support for module variant aliases
2019-11-15 07:20:19 -08:00
Colin Cross
f7beb89df5 Add support for module variant aliases
Adding a dependency on a module with variants can be problematic
if the code adding the dependency is not aware of every mutator
that has created variants.  Add an AliasVariations to
BottomUpMutatorContext, which allows a mutator to alias the
original variant of a module to one of the new variants of the
module, which will allow future dependencies to be added using
the original list of variations.  The aliases are transient,
and only exist until the next mutator that calls CreateVariations
when visiting the module without also calling AliasVariations.

Test: TestAlises
Change-Id: Ieaa04b5a6bdcb5a1ff5114b1e03460de795d4479
2019-11-14 12:58:52 -08:00
Colin Cross
9403b5a790 Delay allocating variationMaps until populating them
Modules are created with a nil variantionMap, which avoids allocating
an empty map if the module will never be split.
Context.addVariationDependencies constructs a variationMap to
compare against the variationMap of each variant, but constructed
an empty variationMap if no variations were specified.  A nil
map is not the same as an empty map, so consistently use a nil
map and create it when populating the first entry.

Change-Id: I48b604659f9cdb23326b504a093cdfe5a3eb4f68
2019-11-14 12:58:52 -08:00
Colin Cross
d03b59d03e Use module groups more widely
Use module groups instead of passing around the list of modules
extracted from a module group.

Test: blueprint tests
Change-Id: I02a79950c6377441c49129ebeb5f12be257df668
2019-11-14 12:58:52 -08:00
Xin Li
7d706b18f7 DO NOT MERGE - qt-qpr1-dev-plus-aosp-without-vendor@5915889 into stage-aosp-master
am: 71a8105b9f

Change-Id: Ia347c93aca7dc02b3c510bfb6765d98ebfda0e1a
2019-10-30 14:20:13 -07:00
Xin Li
71a8105b9f DO NOT MERGE - qt-qpr1-dev-plus-aosp-without-vendor@5915889 into stage-aosp-master
Bug: 142003500
Change-Id: Ibe4664a09d99ab8be52fb2b35978e8cb686b6a6c
2019-10-30 11:46:28 -07:00
Colin Cross
9a5267262a Merge remote-tracking branch 'aosp/upstream' into master am: 6c5a2f7288 am: 247a72401f
am: eedba6251b

Change-Id: I4b1516dbbfa47ebb334c8a7d7fcbc4f84dbb7ed4
2019-10-17 19:22:54 -07:00
Colin Cross
eedba6251b Merge remote-tracking branch 'aosp/upstream' into master am: 6c5a2f7288
am: 247a72401f

Change-Id: Icc4302034b45f79dfbde267f38495f596d376f8d
2019-10-17 19:15:31 -07:00
Colin Cross
247a72401f Merge remote-tracking branch 'aosp/upstream' into master
am: 6c5a2f7288

Change-Id: Ic41ffe8b6410bb4e6705f8f1c7307d1e74f1e8ce
2019-10-17 19:09:08 -07:00
Colin Cross
6c5a2f7288 Merge remote-tracking branch 'aosp/upstream' into master
* aosp/upstream:
  Move outputs of bootstrap modules in main stage to separate directory

Test: m checkbuild
Change-Id: I19de5b4acc6c4422fdc5177971de5bf6a755259a
2019-10-17 16:03:22 -07:00
colincross
7e8c766ab8
Merge pull request #267 from colincross/maindir
Move outputs of bootstrap modules in main stage to separate directory
2019-10-17 15:51:43 -07:00
Colin Cross
16fec72dfc Move outputs of bootstrap modules in main stage to separate directory
Don't write to $buildDir/.bootstrap in the ninja file generated for
the main stage.

Test: examine main stage build.ninja file
Change-Id: I9c6183c9a434ff11d44cdd4f9844eae192ebfe03
2019-10-17 13:42:34 -07:00
Colin Cross
b26091a6a9 Merge remote-tracking branch 'aosp/upstream' into master am: d2a5c6d5f2 am: 19ebe0019c
am: 83fb250244

Change-Id: Ibc6dab25b37a262400593d46c2d57fd7314a5d3d
2019-10-02 14:45:29 -07:00
Colin Cross
83fb250244 Merge remote-tracking branch 'aosp/upstream' into master am: d2a5c6d5f2
am: 19ebe0019c

Change-Id: I829a98caf401fe47f96da2f3f0567ca40ee9af3a
2019-10-02 13:52:57 -07:00
Colin Cross
19ebe0019c Merge remote-tracking branch 'aosp/upstream' into master
am: d2a5c6d5f2

Change-Id: I74697189fa6527abe3f39bd85dffcfaaf1a11289
2019-10-02 13:25:37 -07:00