The filesystem object was available through ModuleContext.Fs(), but
gives too much access to the filesystem without enforicing correct
dependencies. In order to support sandboxing the soong_build
process move the filesystem into the Config. The next change will
make it private.
Bug: 146437378
Test: all Soong tests
Change-Id: I5d3ae9108f120fd335b21efd612aefa078378813
Use the empty string for the core image variant so that modules
added to imageMutator do not change their build directory.
Bug: 142286466
Test: m checkbuild
Change-Id: Ida4534d9a4d6176236aaa480fed359ce27acfaa1
Merged-In: Ida4534d9a4d6176236aaa480fed359ce27acfaa1
(cherry picked from commit 72d685ee7f45e5393be44ae4159edf083ac918de)
AndroidMkEntries now returns multiple AndroidMkEntires so that a module
can emit multiple Make modules if needed.
Bug: 128708192
Test: m
Change-Id: I56b6f76d22943b80329951c5acb80a1b932441ad
Move the ImageMutator to be registered just after the archMutator
in preparation for moving it between osMutator and archMutator.
Requries updating variants in a few tests that now run the
ImageMutator.
Bug: 142286466
Test: no change to build.ninja
Test: all soong tests
Change-Id: Ia9d2a7bc0e225bedec3c9a83ea04f471a931bf47
Avoid having to pass ModuleFactoryAdaptor to every call to
RegisterModuleType in a test by wrapping RegisterModuleType.
Test: all soong tests
Change-Id: If8847d16487de0479cc3020b728256922b3cadba
Prepare for making the image mutator available to all modules and
moving it between the os and arch mutators by moving it into the
android package and using an interface implemented by the module
types to control it.
Bug: 142286466
Test: No unexpected changes to out/soong/build.ninja
Change-Id: I0dcc9c7b5ec80edffade340c367f6ae4da34151b
Add a ToMakePath() method that returns a new path that points out
out/ instead of out/soong/, and replace the
"$(OUT_DIR)/" + path.RelPathString()
pattern with
path.ToMakePath().String()
Bug: 141877526
Test: m checkbuild
Change-Id: I391b9f2ed78c83a58d905d48355ce9b01d610d16
There is no need to create a separate buildDir for each test
file, use TestMain to create a global one for the package.
Test: all soong tests
Change-Id: I435ee7aa88b7e0bb8ccc1ba79f82833a7accf3e9
There are several firmware files that are being installed to
system/etc/firmware or vendor/firmware. A new module type is
defined to install firmware files to install in the system
or vendor image.
Fixes: b/133711895
Test: Ran lunch, wrote unit test cases, created a sample Android.bp
with defined prebuilt_firmware Soong and ran mma.
Change-Id: Iaa791cdda4402936037c5a456cc8bf8e6c905b3e
A new module named prebuilt_font allows a set of fonts to be
installed in the /fonts system image.
Bug: b/123403785
Test: Wrote and ran unit test cases.
Change-Id: Icd468abe3d70a528b28a8d8f216407484e9966a7
The new system collects all Android.mk variable assignments using a map
and writes them to io.Writer. Compared to the previous system, which
directly writes all entries to buffers, this new system is more robust
and test-friendly.
Test: Built without prebuilt_etc.go change and diffed the mk output.
Test: prebuilt_etc_test.go
Change-Id: Idd28443d129ff70053295015e69328a8fa3eca47
They are counterparts of LOCAL_HOST_REQUIRED_MODULES and
LOCAL_TARGET_REQUIRED_MODULES respectively.
Fixes: 128693436
Test: treehugger, convert cts/hostsidetests/devicepolicy/Android.bp
Change-Id: Id66ffca6edffe18993ac51e8930f1d0e78178249
This is almost the same as prebuild_etc except the base path.
Bug: 122616578
Test: prebuilt_etc_test.go
Change-Id: I512b17a88062403225ae6ec248f857c88fccf47a
This is almost the same as prebuilt_etc except the base path.
Bug: 122616578
Test: prebuilt_etc_test.go + manual test with external/neven
Change-Id: Ie3d17c06a878853ec9df93fe2c61c8772bc5cff4
Translate owner: "x" into LOCAL_MODULE_OWNER := x in prebuilt_etc
rules.
Test: unit test in CL exercised with m nothing
Change-Id: Ic177b61e6f685f7a0263129a34acdf0bd46d16c2
Base name of the output file of a prebuilt_etc is by default the module
name. This default behavior can be customized by either via the
'filename' property or the new 'filename_from_src' property. The former
explicitly sets the base name while the latter makes the file name to be
that of the source file.
Test: m (prebuilt_etc_test added)
Change-Id: Ic2900417bda62993f6de2612d993234b82b74479
filename property is an optional property that specifies the name of the
installed file which is by default name of the module.
This will be used to APEXs to have ./etc/ld.config.txt files for their
own.
Test: m (prebuilt_etc_test.go added)
Change-Id: Ic8d0c0044c5bc2c6c33117fe2c19ef6ad75451a8
The property is similar to the ones for cc_*, where it can additionally
create a recovery variant of the module when used.
Bug: 112780007
Test: Build mke2fs.conf with `recovery_available: true`.
Test: `go test -run TestPrebuiltEtc`
Change-Id: Ia04360d00453fa1f80022301feb369514f5e2b0b