aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Remove PrimaryBuilderExtraFlags and cull Args.HEADmasterLukacs T. Berki2021-09-081-39/+5
| | | | | | | | | | PrimaryBuilderExtra flags was only used from soong_ui and has nothing to do with Blueprint files or modules and Args contained a lot of members that were likewise only used for plumbing withing soong_ui or for command line processing for soong_build. Test: Presubmits. Change-Id: Ibf009e446b4044309a331592a88a4aa86b4801e3
* Prefix file names with ctx.SrcDir() in docgen.Lukacs T. Berki2021-09-081-78/+3
| | | | | | | | | | This is because docgen will be called from the bootstrap Ninja file with cwd == /. Side cleanup: remove an unused template. Test: Presubmits. Change-Id: Ia5ff10247becbabc7a76c21f4ed05d654a7b20c3
* Pass StopBefore as an argument to RunBlueprint.Lukacs T. Berki2021-09-072-13/+6
| | | | | | | | Its value is a function of the call site, so it doesn't make a lot of sense to plumb it through the configuration. Test: Presubmits. Change-Id: I5081650818664f283ebc5dc04daef90c26759353
* Remove ConfigRemoveAbandonedFilesUnder.Lukacs T. Berki2021-09-064-196/+0
| | | | | | | It was not implemented by anyone. Test: Presubmits. Change-Id: I8b98620c0ef9c1f242fe7fc0a7d810f2af15d042
* Merge "Rename Blueprints to Android.bp ."Lukács T. Berki2021-09-037-48/+43
|\
| * Rename Blueprints to Android.bp .Lukacs T. Berki2021-09-027-48/+43
| | | | | | | | | | | | | | | | | | | | | | 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
* | Make cmdline args consistent with what they do.Lukacs T. Berki2021-09-021-2/+2
| | | | | | | | | | Test: Presubmits. Change-Id: I6d5f827e06526a121f915aae57c6f086ba44f21d
* | Remove the bootstrap.Config class.Lukacs T. Berki2021-09-023-71/+28
|/ | | | | | | | | | | | | | | 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
* Simplify bootstrapping:Lukacs T. Berki2021-09-015-53/+23
| | | | | | | | | | | | - 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
* Remove some unnecessary arguments from Blueprint.Lukacs T. Berki2021-08-313-74/+51
| | | | | | | | | | | | | 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
* Remove Depfiles from bootstrap.Args .Lukacs T. Berki2021-08-272-2/+0
| | | | | | | | 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
* Rename BuildDir and NinjaBuildDir.Lukacs T. Berki2021-08-266-52/+52
| | | | | | | | | | 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
* Do not separate .primary and .bootstrap dirs.Lukacs T. Berki2021-08-191-24/+15
| | | | | | | | | | | 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
* Do not reference Ninja variables in Makefiles.Lukacs T. Berki2021-08-191-9/+13
| | | | | | | | | | | | | 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
* Merge "Do not do glob-related things in RunBlueprint()."Lukács T. Berki2021-08-193-81/+59
|\
| * Do not do glob-related things in RunBlueprint().Lukacs T. Berki2021-08-193-81/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Use pretty print for json module graphLiz Kammer2021-08-171-1/+3
|/ | | | | | Test: SOONG_DUMP_JSON_MODULE_GRAPH=/tmp/json/srcs m nothing and verify output Change-Id: I779dcebce7435f2f48263909c4c62c27c0fbfec4
* Remove Srcdir() from BootstrapConfig.Lukacs T. Berki2021-08-162-6/+2
| | | | | | | It was always ".". Test: Presubmits. Change-Id: I0612b9b07233659adc708b9710db9aec6e24f224
* Remove global variables in command.go .Lukacs T. Berki2021-08-163-57/+18
| | | | | | | | | | 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
* Delete support for standalone Blueprint.Lukacs T. Berki2021-08-1610-531/+6
| | | | | | | | Now that Blueprint has been merged with Soong, a large amount of code is unnecessary. Test: Presubmits. Change-Id: I8d30d8b80f37fdc6a9db630a1792c57c7d6edb38
* Remove the ability to emit Blueprint docs.Lukacs T. Berki2021-08-162-48/+0
| | | | | | | | | 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
* Explain why build.ninja is a non-default output.Lukacs T. Berki2021-08-161-0/+3
| | | | | Test: Only comment change. Change-Id: I335670b7f3bed0fe34fdb1d625b6e459146cc192
* Separate the concept of subninjas and glob files.Lukacs T. Berki2021-08-164-32/+33
| | | | | | | | | | | | | | | | | | 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
* Expose build-globs.ninja write function to android/soong.Jingwen Chen2021-08-122-16/+22
| | | | | | | | This enables bp2build to write its own build-globs.ninja file. Test: soong integration tests Fixes: 193650250 Change-Id: Icb35f3cf3c30929dab1b2c2e9b244321be30f967
* Add function to retrieve module by name.Chris Parsons2021-07-211-0/+25
| | | | | | | | | | | | | | 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
* Support AppendMatchingProperties on an embedded anonymous structandroid-s-beta-4android-s-beta-3android-s-beta-4Colin Cross2021-06-282-1/+198
| | | | | | | | | Recurse into embedded anonymous structs and the BlueprintEmbed workaround structs when looking for properties in extendPropertiesRecursive. Test: proptools/extend_test.go Change-Id: I975651a64e5173747403629a09263562761f1495
* Module/providers can now emit extra JSON data.Lukacs T. Berki2021-06-251-4/+21
| | | | | Test: Presubmits. Change-Id: I448e85f9144b9b35e7822ab7629329bae7a2fb8e
* Delete creation of empty glob file am: 3a495910adSpandan Das2021-06-151-16/+0
|\ | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1736533 Change-Id: I9f3365344ef37afa9f389b604c4a68a2d7f8c995
| * Delete creation of empty glob fileSpandan Das2021-06-151-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Add support for maps as properties" am: 16caaa4817Treehugger Robot2021-05-276-316/+563
|\| | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1715913 Change-Id: I134c53bd884308243b4c0c2d026736bec92288c8
| * Merge "Add support for maps as properties"Treehugger Robot2021-05-276-316/+563
| |\
| | * Add support for maps as propertiesLiz Kammer2021-05-266-316/+563
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Add a test for AddNinjaFileDeps am: 7a2a352825Colin Cross2021-05-261-0/+100
|\| | | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1715723 Change-Id: Ieb32a2a0a399fc3fe7f354cf0bd20621ea3d5342
| * | Add a test for AddNinjaFileDepsColin Cross2021-05-241-0/+100
| |/ | | | | | | | | | | | | | | | | 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
* | Add `blueprint_go_packages` phony to build all go packages am: 0f0e304d08Dan Willemsen2021-05-241-7/+34
|\| | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1713431 Change-Id: I6fa5e01c5e68cd933eb8abe29d808ff4941bcf0d
| * Add `blueprint_go_packages` phony to build all go packagesDan Willemsen2021-05-241-7/+34
| | | | | | | | | | | | | | | | | | | | 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
* | Merge "Fix AddNinjaFileDeps in a LoadHook" am: 69e2bbe2dfTreehugger Robot2021-05-212-5/+10
|\| | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1712169 Change-Id: Ic8a91706868263a18bee9b51af172a13884ddce4
| * Merge "Fix AddNinjaFileDeps in a LoadHook"Treehugger Robot2021-05-212-5/+10
| |\
| | * Fix AddNinjaFileDeps in a LoadHookColin Cross2021-05-192-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Propagate the ninja file deps from a LoadHook to the build.ninja.d file. Bug: 188547846 Test: next CL Change-Id: If8176474b5094ee40d07df12f5da79a906ce7290
* | | Merge "Add OtherModuleFarDependencyVariantExists." am: 1f716db99fBill Peckham2021-05-211-2/+18
|\| | | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1697063 Change-Id: I0ee202a7a8003d0226c263cb999d973121e55dc9
| * | Merge "Add OtherModuleFarDependencyVariantExists."Bill Peckham2021-05-211-2/+18
| |\ \ | | |/ | |/|
| | * Add OtherModuleFarDependencyVariantExists.Martin Stjernholm2021-05-201-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the logical extension corresponding to AddFarVariationDependencies in the same way OtherModuleDependencyVariantExists corresponds to AddVariationDependencies. Test: m nothing Bug: 188398129 Change-Id: I5517bfd6be5e2c58432c2902dfd1ca7668c76598
* | | Merge "Support go 1.16 in gotestmain" am: d7d1e39aafColin Cross2021-05-141-0/+4
|\| | | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1696685 Change-Id: I400af9c08bbc2f29324035cb8a27523013edeabf
| * | Merge "Support go 1.16 in gotestmain"android-s-beta-2android-s-beta-1Colin Cross2021-05-141-0/+4
| |\ \
| | * | Support go 1.16 in gotestmainColin Cross2021-05-041-0/+4
| | |/ | | | | | | | | | | | | | | | | | | | | | go 1.16 adds a new method on the testDeps interface passed to testing.MainStart. Test: m nothing Change-Id: I5c42a4294a775337696dc2d64791dee301eac390
* | | Add support for setting string property in bpmodify am: b1abbada6aColin Cross2021-05-072-28/+100
|\| | | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1692188 Change-Id: Icb4ba0eed829c4fd415e5b445996259c1c3499f0
| * | Add support for setting string property in bpmodifyColin Cross2021-05-042-28/+100
| | | | | | | | | | | | | | | | | | | | | | | | Add a -str argument to set a property to a string value. Bug: 186723288 Test: bpmodify_test.go Change-Id: I490e3be182693c8720020814da579e6e788b3d9f
* | | Improve bpmodify_test.go am: 5ef7b6608cColin Cross2021-05-071-203/+204
|\| | | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1692187 Change-Id: Ib85af9584a93acdac73dd4d4cd657c9d81b55747
| * | Improve bpmodify_test.goColin Cross2021-04-291-203/+204
| |/ | | | | | | | | | | | | | | Make TestProcessModule use subtests, give the tests names, and use named fields in the testcase struct. Test: bpmodify_test.go Change-Id: I85345bd419e4c3ccf0050b7efae0479dd03d8bea
* | Make AddVariationDependencies return list of nil for non-parallel mutators ↵Colin Cross2021-04-292-6/+156
|\| | | | | | | | | | | | | | | am: 2f7d3dd6fb Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1689707 Change-Id: I0f09501f6e5e884fed48a0b67adf23ccae9dbb90