| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ExpandSourcesSubDir was calling SourceFileProducer.Srcs(), and then
doing:
moduleSrcs = append(moduleSrcs[:j], moduleSrcs[j+1:]...)
This modifies the backing store of the slice, which may affect the
original data stored in the SourceFileProducer. Make all Srcs
implementations return slice that points to a copy of the backing
array.
Test: m out/target/common/obj/PACKAGING/checkpublicapi-current-timestamp
Bug: b/76179848 b/76397326
Change-Id: I2432ce196984814daafc5aa9a2746e81de74494c
Merged-In: I2432ce196984814daafc5aa9a2746e81de74494c
(cherry picked from commit e42777a05a1f4bdde22b0dce03f3361e52e2dbae)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While the rule may really need all of the generated header files to
exist, only one of them (per genrule task) needs to be in the dependency
list, since the rest are essentially aliases.
This brings an AOSP aosp_arm-userdebug out/soong/build.ninja file from
372MB to 156MB, with equivalent functionality. The Android-aosp_arm.mk
file is reduced from 11MB to 6.5MB.
Bug: 73745773
Test: diff out/soong/build.ninja
Test: diff out/soong/Android-aosp_arm.mk
Test: rm -rf out; m
Change-Id: If17377666292cc20957417fc4c3cd52f98971d0c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The path to the output directory may be arbitrarily long, use
__SBOX_OUT_DIR__ in the list of output files passed to sbox
to avoid expanding it multiple times in the command line.
Fixes:
ninja: fatal: posix_spawn: Argument list too long
09:40:14 ninja failed with: exit status 1
when building libchrome with a long OUT or OUT_DIR_COMMON_BASE.
Bug: 73726635
Test: m checkbuild
Change-Id: I59024b2164287c8e531711afd9273b692ce9c28a
|
|
|
|
|
|
|
|
|
| |
This reverts commit 606e9de344fae07473dd79e5ac556886a72035de.
Reason for revert: <try to fix the broken build yesterday>
Change-Id: I2963b9af63c7c7398159e5e9a1e448266e1c81d5
Test: unittest
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit f36a3d9b6da654bf8bd7a49315b1625cf0e774ce.
Reason for revert: Broke several builds. I'm acting build cop, reverting.
Bug: 70351683
Change-Id: I775ada4e9cb6473519d51420b41b818af163da44
|
|
|
|
|
|
| |
Test: add unit-test, m -j32
Bug: b/70351683
Change-Id: Iff83c56d45dd668d9df6131c7df2e23e5c73a21b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug: 70387174
Test: Put this text into an Android.bp:
genrule {
name: "test_genrule",
tool_files: ["foo"],
out: ["foo.c"],
cmd: "for i in a b c; do echo $$i; done > $(out)",
}
cc_library {
name: "libtest_genrule",
srcs: [":test_genrule"],
}
and then run `m -j libtest_genrule`. Although the library
shouldn't compile, check that it produces a foo.c that has
"a\nb\n\c\n" and not "\n\n\n".
Change-Id: I139106479439c9b3a95f1a2ecc23e73570d7bd59
|
|
|
|
|
|
|
|
| |
Also allow commands with no tools for the case when standard
shell utilities are used to munge an input file.
Test: m checkbuild
Change-Id: Ie061e90cafe1a0a0db004a89e9a17fb48709cb03
|
|
|
|
|
|
|
|
| |
tool_files can be used to add dependencies on files used by tools,
so let it support globs.
Test: m checkbuild
Change-Id: I1c1cb098190e1bb1c81292f6eb0c4ed0e240c1e1
|
|
|
|
|
|
|
|
|
| |
AConfig() now duplicates Config(). Replace the uses of AConfig()
with Config(). Leave AConfig() for now until code in other
projects is cleaned up.
Test: m checkbuild
Change-Id: Ic88be643049d21dba45dbd1a65588ed94bf43bdc
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
genrules lost the ability to depend on Go tools after
I05e945f38915d49cd3c0ab72a86576949bc7eff2 which converted
VisitDirectDeps from blueprint Modules to android Modules.
Add VisitDirectDepsBlueprint to visit all modules including
blueprint Modules, and use it in genrule. Also add a check
for disabled modules that was being handled by
VisitDirectDeps.
Test: m checkbuild
Change-Id: I65724283166c63596d071e598c08fed87ef32896
|
|
|
|
|
|
| |
Test: m -j checkbuild
Bug: b/68853585
Change-Id: I0fd10ff31e90c1941e80cfbf25e40e9988f1e202
|
|
|
|
|
|
|
|
| |
python, and genrule.
Test: m -j checkbuild
Bug: b/68853585
Change-Id: Ic9a8083818e920dc399a4b00841e2aa496f70faa
|
|
|
|
|
|
|
|
|
|
| |
in preparation for each task to delete its output dir
before running.
Bug: 38205169
Test: rm out -rf && m -j
Change-Id: Ifcd42073d4fb74f532adc0c095555b4a542feb99
|
|
|
|
|
|
|
|
|
| |
rather than passing buildDir .
This will make it reasonable for sbox to delete its --output-root
Bug: 38205169
Test: m -j
Change-Id: Ic3a82a8df040117870c251c068a88545143257cf
|
|
|
|
|
|
|
|
|
| |
Most notably, the sandbox depfile path should be passed into the tool.
Bug: 68336760
Test: m -j checkbuild
Change-Id: I22f944a3f57d613fda26de0ea777a915cafcd020
|
|
|
|
|
|
|
|
| |
Also adds checks that the dependencies are android.Modules and
are not disabled.
Test: m checkbuild
Change-Id: I05e945f38915d49cd3c0ab72a86576949bc7eff2
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that android.ModuleContext does not include blueprint.ModuleContext
we can rename android.ModuleContext.ModuleBuild to
android.ModuleContext.Build without colliding with
blueprint.ModuleContext.Build. Leave ModuleBuild as a wrapper around
Build for now to avoid having to update all the users outside
build/soong simultaneously.
Test: m checkbuild
Change-Id: I18eb8cc04faf002049a11d9aac97e9732ff5d638
|
|
|
|
|
|
|
|
|
| |
Ninja doesn't support depfiles on a rule with multiple outputs.
Use a single output and put all the rest as implicit outputs.
Bug: 68057449
Test: java_test.go
Change-Id: Ia544493b1b3b51b185c865149d8f3e0eb3c57ee2
|
|
|
|
|
| |
Test: manual inspection of soong_build.html
Change-Id: Ibb5086de5497eb096ee7f68a5fd1ccaba630aa89
|
|
|
|
|
|
| |
Bug: 67364649
Test: TestGeneratedSources
Change-Id: I5400e4b013dc47c04b9d32787e50c5281033484d
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Allow sharing lists of files between make and soong by allowing
filegroups to export them as a make variable.
Test: m -j checkbuild
Change-Id: I27ae2f6d180bf01d69a628dbe59edcdba93da015
|
|/
|
|
|
|
|
|
| |
cc_genrule is the same as a normal genrule, but can depend on other cc
modules (like cc_object).
Test: mmma external/minijail
Change-Id: I8df87665c7bdc76ce89c92755c054f967a818e57
|
|
|
|
|
|
| |
Test: m
Test: Add genrule using go tool; m
Change-Id: I9a85348b6cf41f2cdb7684f787553c07de220d67
|
|
|
|
|
|
|
|
| |
So that we don't get confused when using :<module> in srcs to depend on
a module that could also be a HostBinTool.
Test: m -j
Change-Id: Ia3b1c26826e70f84c6dc5ff78c95dd11d76901b6
|
|
|
|
|
|
|
|
|
| |
Change module factories from returning a blueprint.Module and a list
of property structs to returning an android.Module, which holds the
list of property structs.
Test: build.ninja identical except for Factory: comment lines
Change-Id: Ica1d823f009db812c518f271a386fbff39c9766f
|
|
|
|
|
|
|
|
| |
Test: make OUT_DIR=/tmp/abspath
Test: make OUT_DIR=relative-out
Bug: 35562758
Change-Id: I688d5f6117b194440c5d01c1040033b5671187c2
|
|
|
|
|
|
|
|
|
|
|
| |
This causes Soong to put the outputs of each genrule into a temporary
location and copy the declared outputs back to the output directory.
This gets the process closer to having an actual sandbox.
Bug: 35562758
Test: make
Change-Id: I8048fbf1a3899a86fb99d71b60669b6633b07b3e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Descriptions currently look like:
[ 0% 4/29328] cc out-soong/.intermediates/external/clang/lib/Sema/libclangSema/android_arm_armv7-a-neon_denver_static_core/obj/external/clang/lib/Sema/SemaCodeComplete.o
This is not very helpful - most of the characters are used to show the
output path, which contains useful information like target architecture,
but also contains most of the path to the source files twice, and less
useful information like the exact variant name used by soong.
Make the descriptions look like:
[ 0% 3/29329] //external/clang/lib/Sema:libclangSema clang++ SemaTemplateInstantiate.cpp
This is //path/to/module:modulename tool relative/path/to/source/file
Test: builds, looks pretty
Change-Id: I3087aa7d4eb1860ef6239d77407b8b35445616d7
|
|
|
|
| |
Change-Id: Ieffb2bd7d739527db129ff300d8aec70d82c278a
|
|
|
|
|
|
|
|
| |
cmd may be empty if android.Expand fails, and continuing results
in a panic. Return immediately.
Test: m -j checkbuild
Change-Id: Ibf4d57ce048db9f7f16ce118ed9e9ecea5a6551c
|
|
|
|
|
|
|
|
|
|
|
|
| |
Calling android.NewContext() in tests results in a context that
contains all the mutators, module types, and singletons, which
causes unexpected interactions in unit tests. Create an empty
context instead, and add in only the necessary mutators, module
types, and singletons.
Bug: 36366816
Test: soong tests
Change-Id: Ic61262c37e3436b3ad4ccaca18b737021c304be6
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Allow tests to specify a data property that lists files or filegroup
modules that will be packaged alongside the test. Also add a path
property to filegroup modules to allow shifting the path of the
packaged files, and add ExpandSourcesSubDir to expand the filegroup
sources while including a shifted relative path in the Paths objects.
Test: soong tests, manually adding data to a module
Change-Id: I52a48942660e12755d313ef13279313361b4fc35
|
|/
|
|
|
|
|
|
|
|
|
| |
The genrule tool dependency handling was rejecting any dependencies
that were not tools. This caused a failure when ExtractSourceDeps
added a source file dependency on a filegroup module. Remove the
unnecessary check in the tool handling.
Test: builds
Bug: 35002681
Change-Id: Ibd8dff306be3ef55aac2e12a28ddc187be2234d9
|
|
|
|
|
|
|
|
| |
Call ExtractSourceDeps on genrule srcs properties.
Bug: 34283327
Test: no change to build.ninja
Change-Id: I934a418f32d4c94400728579543ca5c910bf7dfc
|
|
|
|
|
|
|
|
|
|
| |
filegroup is a module that contains a list of files, and can be used
to export files across package boundaries. filegroups (and genrules)
can be referenced from srcs properties of other modules using the
syntax ":module".
Test: m -j
Change-Id: I3d6fc4819c0b4225b474e0ad42f0d947f55a5961
|
|
|
|
|
|
|
|
| |
Instead of exporting the generated sources dir as headers, let
the Android.bp file specify subdirectories as exported.
Test: m -j checkbuild
Change-Id: I18dd900d63ce7485c8fbfcc39dc77abad6f733d7
|
|
|
|
|
|
|
|
| |
If a genrule sets deps_file: true, use a file in the gen directory
as a GCC-style deps file.
Test: m -j libLLVMObject
Change-Id: Id410165847e4eaea1853a392512e38787c431523
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To allow genrules with more than one tool, rename the tool property to
tools and make it an array, replace $tool with $(location <label>),
and use $() for other variables for consistency.
Also remove the host bin directory from the genrule path, and the
$srcDir variable, using either of them would have caused dependency
issues.
Bug: 31948427
Test: compare build.ninja
Change-Id: Icf6d3bce2bea00fec1363fd65c0bdf96d09281bf
(cherry picked from commit de6bd86d240b98b7ea7ff6a0454a13edc639a163)
|
|
|
|
|
|
|
|
|
| |
We were emulating this for proto files, standardize it and make the
other generators use it as well.
Test: Compare out/soong/build.ninja before/after change
Test: mmma -j system/tools/hidl
Change-Id: I1888c7b981749060a398387bbb9b481270bf6d75
|
|
|
|
|
|
|
|
| |
Register mutators inside lambdas that are called in a defined order to
correctly order mutators before and after the arch and deps mutators.
Test: build.ninja identical
Change-Id: Iefe2a3515aee8570e76a6e76925db4cda0e9e822
|
|
|
|
|
|
|
|
| |
Mutator registration is tightly coupled with the android package, move
all registration from the soong package to the android package.
Test: build.ninja identical
Change-Id: Ie183d0b52cc7431c9e05b231934d189208ef1efe
|
|
|
|
|
|
|
|
|
|
|
| |
The underlying code to expose outputs to other modules has suppported
this already for gensrcs (which runs the command multiple times to
create multiple outputs). This allows a genrule to run a command once,
and output multiple files.
Bug: 31742855
Test: Add multi-output genrule; Inspect build.ninja
Change-Id: I72054cc39c0d0e3e44feebba72005e5af1a1709a
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of just passing this to ninja, use os.Expand to parse the
variable substitutions. While we're here, define a new "genDir" variable
that is the root of this module's generated directory.
Bug: 31742855
Test: Ensure invalid variables cause error
Test: Inspect commands in build.ninja
Change-Id: Iff6d0499ab57367669e73df52ab7c647358da13b
|
|
|
|
|
|
|
|
| |
Append .Parallel() to all of the RegisterBottomUpMutator calls to tell
Blueprint it can run them in parallel.
Test: identical build.ninja, passes race detector
Change-Id: I969a0689522d4cba7c8ff51e2aa00fe2fd338a89
|
|
|
|
|
|
|
|
|
|
|
|
| |
Soong's multi-architecture building has grown complex, with the
combination of HostOrDevice+HostType+Arch necessary to determine how to
build a variant of a module, and three separate mutators to split each
into its variations.
Combine HostOrDevice+HostType into Os, which will be Linux, Darwin,
Windows, or Android. Store Os+Arch as a single Target.
Change-Id: I92f2e2dac53617d595a35cc285d2bd348baa0fbd
|
|
|
|
|
|
| |
This reverts commit 6713fb26cbcadf525cd75e47d7d0cbc23d282b3e.
Change-Id: Ic473cea2563b0b37dc08b0bc5d3a0ac8c4b6afe6
|
|
|
|
|
|
|
|
|
|
|
|
| |
Soong's multi-architecture building has grown complex, with the
combination of HostOrDevice+HostType+Arch necessary to determine how to
build a variant of a module, and three separate mutators to split each
into its variations.
Combine HostOrDevice+HostType into Os, which will be Linux, Darwin,
Windows, or Android. Store Os+Arch as a single Target.
Change-Id: Iae677eff61a851b65a7192a47f2dc17c1abb4160
|