Move the rules to build framework.aidl into Soong, and use it
when compiling aidl files with sdk_version: "current".
Also fixes incorrectly using the aidl includes exported by the
"framework" module when the proguardRaiseDep dependency was
added.
Bug: 130798034
Test: sdk_test.go
Change-Id: I126adf1d9e7b6acb528875ff62b974ba7ad9a337
Found while executing the build actions remotely.
Bug: 130111713
Test: treehugger
Test: run actions remotely with given dependencies, they pass.
Change-Id: I2bff8fb8ccf50fde446d6bcef0f1dca9b2974b4b
Add a proto.plugin property to allow specifying a custom protoc
plugin to generate the code.
Fixes: 70706119
Test: m am StreamingProtoTest
Change-Id: I1ecdd346284b42bbcc8297019d98d2cd564eb94c
From now on, a java shared library can be built only with adding
".sysprop" description file to srcs. Sysprop library generator will
automatically generate a .java file, and soong will wrap it into .srcjar
file which will finally be contained in the java library. For the schema
of description file, see system/tools/sysprop/sysprop.proto.
Bug: 80125326
Test: 1) write a .sysprop description file.
2) create java_library and add description file to srcs.
3) create a test app, link against library of 2), and call generated
sysprop methods.
4) see compile succeeded.
Change-Id: I3ff87bc0a20f5a1aa126ef6d0f4d874a2ff4af8d
Historically, we've always passed '-I .' as the first argument to
protoc, essentially treating all proto file package names as their full
path in the android source tree. This would make sense in a monorepo
world, but it makes less sense when we're pulling in external projects
with established package names.
So keep the same default (for now), but allow individual builds to opt
into using local paths as the default names with
'canonical_path_from_root: false'. A cleanup effort and/or large scale
change in the future could change the default to false.
As part of this, run protoc once per input proto file, since the flags
may need to change per-file. We'll also need this in order to specify
--dependency_out in the future.
Bug: 70704330
Test: aosp/master build-aosp_arm.ninja is identical
Test: aosp/master soong/build.ninja has expected changes
Test: m
Test: Build protobuf test
Change-Id: I9d6de9fd630326bbcced1c62a4a7e9546429b0ce
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
Assume logtags files will have hardcoded tag numbers and don't
build against the merged file. Simplifies the build when
logtags files are split across Make and Soong.
Test: m checkbuild
Change-Id: I1e995ec458690fcadb1b86d64864f277aa9fe3af
Allow srcs to contain .srcjar files, which will be extracted just
before javac. Also allow genrules and generated sources to directly
return .srcjar files.
Test: m checkbuild
Change-Id: Ie4cf60ecb9d2ec63a4c2275221544203b1383597
Source jars were not working as designed because javac will only
compile files from the -sourcepath if there are references to them
starting from files on the command line. Switch to extracting
the source jars into a directory and passing a list of the files
to javac.
Test: m checkbuild
Change-Id: I9f7d824f8538d081b2f5ad64ae3cbfd0e96213af
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
srcFileLists was an ill-fated attempt to deal with generators that
produce a set of java sources that is not known ahead of time.
For example, the list of files produced by protoc depends on the
package statement in the .proto file. srcFileLists put the list
of generated files into a file, which was then passed to javac
using the @file syntax. This worked, but it was too easy to cause
missing dependencies, and will not work well in a future distributed
build environment.
Switch to putting generated sources into a jar, and then pass them
jar to javac using -sourcepath.
Test: m checkbuild
Change-Id: Iaab7a588a6c1239f7bf46e4f1b102b3ef517619b
Remove inheritance implemented with the bad "superclass calls
subclass through interface" pattern, and replace it with composition.
Test: builds
Change-Id: If323f89360455b3f98b40777edaaaa265bb3b5fc
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
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
When the UseGoma flag is set, put all rules except the C compilation
rule in an externally defined local_pool, which will have been created
by kati. The gomacc wrapper will already be in the CC_WRAPPER
environment variable.
Bug: 31142427
Change-Id: I699d4edff2e302eee398dad8692ceb14721a628c
This centralizes verification and common operations, like converting the
path to a source file to the path for a built object.
It also embeds the configuration knowledge into the path, so that we can
remove "${SrcDir}/path" from the ninja file. When SrcDir is '.', that
leads to paths like './path' instead of just 'path' like make is doing,
causing differences in compiled binaries.
Change-Id: Ib4e8910a6e867ce1b7b420d927c04f1142a7589e
Depends on https://github.com/google/blueprint/pull/78
This uses the new CommandDeps field to move implicit dependencies
embedded in the Command string next to the definition, instead of having
to specify them in every BuildParam struct. This should make it easier
to verify dependencies.
Change-Id: I2711b160920e22fa962a436e1f7041272166f50f
The source path was being appended to the module out directory
to create the file list file, which was resulting in .. in the
source path moving the file list file up the directory tree.
Use SrcDirRelPath to convert the globbed resource directories
to be relatiave to $srcDir before appending them.
Also do the same fix to generated aidl, logtags, yacc, and lex
files.
Change-Id: I2e636bd30abf03bc1d80a897951a9812cc3e09ef
Add support for converting logtags files to source files. Each
.logtags file is converted to a .java file, but only after all
.logtags files have been combined into a merged text file by
the logtagsSingleton.
Change-Id: I375d82874029bd26a7c528e46add2a638ba123f9
Add support for aidl files listed in srcs for java builds, and
an aidl_preprocess module type for framework and sdk aidls.
Change-Id: I3aa537f4483822e5b534c74d0b35f13a938f8947