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
In Soong, a Config() method will always return a Config. Make
ModuleContext, SingletonContext, TopDownMutatorContext and
BottomUpMutatorContext's Config() methods explictly return
a Config to avoid having to type-assert everywhere. Overriding
the Config method requires duplicating the list of methods in
blueprint.BaseModuleContext and blueprint.BottomUpMutatorContext,
following the same pattern used by the other *Contexts.
Config() obsoletes the AConfig() method used in some places, which
will be cleaned up in the next patch.
Test: m checkbuild
Change-Id: Ibe21efde933959811d52443496967ab8ce71215e
This reverts commit 63a250a336.
Reason for revert: Some failures:
namespace_test.go:648: dir1/Blueprints:2:4: a namespace must be the first module in the file
such as New Build Breakage: aosp-master/build_test @ 4475274
Change-Id: I1b5db8eb934e51ff22241bfca44199d886b1393b
Bug: 65683273
Test: build/soong/scripts/diff_build_graphs.sh \
--products=aosp_arm \
'build/blueprint:work^ build/soong:work^' \
'build/blueprint:work build/soong:work'
# and see that the only changes were:
# 1. adding some new files
# 2. changing some line numbers
Test: m -j nothing # which runs unit tests
Change-Id: I6d3e52ef62c4cabe85b9a135a54de0e1a6aab29c
Use aapt2 instead of aapt to compile Android app resources.
Also generate all files into srcjars instead of individual
sources.
Test: m checkbuild
Change-Id: I5a67991a0daf0017e8159b46fcff7d5564a91468
Wrap blueprint.PackageContext so that the *Func methods can provide
an android.Config instead of an interface{}. The modified signatures
means that every method in ModuleContext and SingletonContext
that takes a blueprint.PackageContext now needs to be wrapped to
take an android.PackageContext.
SingletonContext wasn't previously wrapped at all, but as long
as it is, wrap everything like ModuleContext does. This requires
updating every Singleton to use the android-specific methods.
Test: builds, all Soong tests pass
Change-Id: I4f22085ebca7def6c5cde49e8210b59d994ba625
Bug: 64267858
Test: create reference abi dump for libjpeg locally. Change return type
of libjpeg_std_err and build with :
BOARD_VNDK_VERSION=current mm -j64 showcommands dist
Build fails and abidiff report gets copied into out/dist/abidiffs.
Change-Id: I7c8ecfac95361e731009e5913bd3a7bb323a9597
Can be caused by `json:"omitempty"` instead of `json:",omitempty"`
Bug: 69076024
Test: m -j # which runs unit tests
Change-Id: I92e3193d00a740c72d36a56748e0b0a8ad1d772e
* changes:
Fix genrules depending on Go tools
Use logtags without merged file
Export extract-srcjars.sh to Make
Remove partial javastream proto support
Add support for .srcjar files from genrules and srcs
Fix java AIDL properties to match C/C++
Fix proto flags in java
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
This fourth possible value currently has the same semantics
as a default/unset EXPERIMENTAL_USE_OPENJDK9, but allows
people to explicitly switch back to the old semantics when
the default changes.
Test: make showcommands core-oj (in environments with
EXPERIMENTAL_USE_OPENJDK9 set to "", "1.8", and "true").
Bug: 38177295
Change-Id: I25accf14344a05349a6e97572d7c2c1f6a7f2063
Add an android.DirectorySortedPaths that stores paths sorted such
that all paths in a directory including subdirectories are in a
contiguous subslice. This will allow efficient O(log(N)) finding
of all paths in a directory using a binary search on the directory
prefix.
Test: TestDirectorySortedPaths in paths_test.go
Change-Id: I5a06a89351ae06e88c06526be54a6b79075361b7
This isn't often used, but the values were quite old. So update them to
something closer to aosp_arm64 from today.
Bug: 68803744
Test: m clean; m --skip-make libc
Change-Id: Id5c60b62e7c7a91635dea9669fc604d63d299778
This CL adds the ability to centrally enable or disable CFI for
components using either an environment or product config
variable. This is a better, nore manageable option that enabling CFI
across each component individually.
Bug: 67507323
Test: CFI_INCLUDE_PATHS= system/nfc m -j40
Test: CFI_EXCLUDE_PATHS = frameworks/av m -j40
Change-Id: I38b77946759121aec99ab25f31aaee2e5d993f73
there's no use case for prepending/appending to bool, and string
properties within module struct. Declearing "*bool" and "*string" almost
cover everything user need.
I did see one case that user specify relative_install_path as
path prefix in cc_defaults, and concatenate with the one in real module
to get the final relative install path in Android.bp <bionic/tests/libs>.
Test: m -j checkbuild
Bug: b/68853585
Change-Id: If3a7a2689c3fc307aae136af6bc9c57f27a1e1a0
Allow functions to get the result associated with a OncePer key without
also specifiying a function. Panics if the key has not already been
set. Also replace the open-coded concurrent map implementation with
the new sync.Map.
Test: m checkbuild
Change-Id: I814fdb1ffffaee8398dc877af146e29638c8a6a8
Move AppendProperties and PrependProperties into TopDownMutatorContext
so that LoadHooks can be a subset of TopDownMutatorContext that also
includes CreateModule.
Test: m checkbuild
Bug: 35570956
Change-Id: Iffa6a6aec96f08821c2446e0e0f4622ab772b54c
This reverts commit 5c3c768187.
This reapplies I70e45caa92f65dc6a3bc81ae33a5a8f34ad11890 along with
additional changes in other projects to match the new types.
Bug: 68337468
Test: m checkbuild
Change-Id: I2d2d876b291869f834a6468d3e2ad99148f94a15
Strip debug info in javac when PRODUCT_MINIMIZE_JAVA_DEBUG_INFO
is set.
Test: m with PRODUCT_MINIMIZE_JAVA_DEBUG_INFO=true
Change-Id: I167e742662801291c516bf1ff826486560d22147
Switch commonProperties to *string and *bool so that defining them
in a module correctly overrides instead of appends to values set
in defaults modules.
Bug: 68337468
Test: m checkbuild
Change-Id: I70e45caa92f65dc6a3bc81ae33a5a8f34ad11890
A module referenced with srcs: ":module" was not honoring
ALLOW_MISSING_DEPENDENCIES=true. Don't fail if the module
doesn't exist, an error will already have been produced by
ExtractSourcesDeps.
Bug: 68183622
Test: m ALLOW_MISSING_DEPENDENCIES=true
Change-Id: Id806633d12ab2ecd78b532e1922e59824e5c20a8
Also adds checks that the dependencies are android.Modules and
are not disabled.
Test: m checkbuild
Change-Id: I05e945f38915d49cd3c0ab72a86576949bc7eff2
Move firstUniqueElements to android.FirstUniqueStrings,
lastUniqueElements to android.LastUniqueStrings, and lastUniquePaths
to android.LastUniquePaths.
Test: m checkbuild
Change-Id: Ieac840405126c7f8f98afb4a4ef35c01a18fe7fb
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
android.ModuleContext should replace the blueprint.ModuleContext
methods with ones that take android.Module parameters instead of
blueprint.Module parameters. As a first step, don't include
blueprint.ModuleContext in android.ModuleContext and manually
specify the methods from blueprint.ModuleContext that we need.
Future patches will replace these methods with ones that take
android.* types. Also do the same for TopDownMutatorContext.
Test: m checkbuild
Change-Id: If11c298eed98bc65712b4942d0283cafa058726c
The source for dx may not be available in PDK builds, use the
prebuilt one from prebuilts/build-tools instead.
Bug: 67663308
Test: m TARGET_BUILD_PDK=true
Change-Id: I9090b5190539f901fc05264a472133c12d4ea2a1
If sdk jars(android_stubs_current, etc) are compiled using soong java
modules, we have to filter them when running Java build with Turbine.
TODO: provide more unit-tests.
Test: m clean && m -j32; go test java_test
Change-Id: Iad7c241b0e8b0ca760950733f513124b56c84564
Make Rel() on ModuleOutPath and ModuleGenPath return the path
relative to the module out and module gen directories respectively,
and make TestingModule.Output() match against the full relative
path to the module.
Test: java_test.go still passes
Change-Id: Id5b2ec3fdef41d4169b943e68d032fc64a2b6f92