Commit graph

22 commits

Author SHA1 Message Date
Jiyong Park
b326ac2b65 Fix: vendor and odm are restricted to use public platform properties
There was a mistake in the condition.

Bug: N/A
Test: N/A

Change-Id: I07f79fdcc3c946a4b9e957e5a42b6694b5eeb251
2019-12-05 13:35:35 +09:00
Colin Cross
09ef474b6f Merge changes I0dcc9c7b,I9bc40642
* changes:
  Move cc.imageMutator into the android package
  Make CreateVariations return []android.Module
2019-11-25 22:30:17 +00:00
Colin Cross
4b49b768a2 Make TestContext.RegisterModuleType take an android.ModuleFactory
Avoid having to pass ModuleFactoryAdaptor to every call to
RegisterModuleType in a test by wrapping RegisterModuleType.

Test: all soong tests
Change-Id: If8847d16487de0479cc3020b728256922b3cadba
2019-11-25 10:59:44 -08:00
Colin Cross
7228ecd5e3 Move cc.imageMutator into the android package
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
2019-11-20 15:21:32 -08:00
Colin Cross
84dfc3d331 Make CreateModule take an android.ModuleFactory
Reduce the boilerplate required to call CreateModule by taking an
android.ModuleFactory instead of a blueprint.ModuleFactory.

Test: m checkbuild
Change-Id: I1259d2dd3f7893b5319c333bc180727ac40f9e91
2019-09-26 17:19:26 +00:00
Inseob Kim
988f53cf5a Move sysprop gen code to sysprop module
sysprop_library now generates srcjar itself, effectively cutting the
implicit dependency from java module to sysprop module.

Bug: 131637873
Test: m {sysprop_library}-dump-api
Test: m (with no arguments) performs API check
Change-Id: Ia11a744e74b6f733ff0e30d194fbba22505ed644
2019-09-23 15:34:06 +09:00
Inseob Kim
64c4395386 Add version to vendor variants
Vendor variant is now divided into several vendor.{version} variants,
depending on their intended usages:

vendor.{BOARD_VNDK_VERSION}: vendor and vendor_available modules
vendor.{PLATFORM_VNDK_VERSION}: VNDK modules in the source tree
vendor.{snapshot_ver}: VNDK snapshot modules

This also affects exported module names from Soong to Make. But to
maintain backward compatibility, ".{BOARD_VNDK_VERSION}" suffix will not
be emitted for modules having version BOARD_VNDK_VERSION, so that vendor
modules still can be referred as-is.

Bug: 65377115
Bug: 68123344
Test: clean build and boot blueline
Change-Id: Ib9016a0f1fe06b97e9423fd95142653a89a343fa
2019-09-18 10:53:30 +09:00
Inseob Kim
4288274f14 Implement sysprop_library API stability check
sysprop_library now checks the API stability itself, cutting dependency
on java_sdk_library. Under the directory {module_dir}/api,
{module_name}-current.txt and {module_name}-latest.txt hold API
signatures.

When sysprop_library is built, or a user run "m {module_name}-check-api"
command, API check is performed. First, current.txt must have exactly
same signature with built sysprop_library module. Second, current.txt
must be compatible with latest.txt.

Build system emits a handy error message to generate/update those API
files, in case of missing or mismatching. Also, a script file for
freezing API files is introduced.

Bug: 131637873
Test: 1) m && boot blueline
Test: 2) m {sysprop_library} performs API check
Test: 3) manual test for check-api, freezing api
Change-Id: I9d25f5dc64299e666527ca8e23d7233966901c4e
Merged-In: I9d25f5dc64299e666527ca8e23d7233966901c4e
Merged-In: Ib7ad4f17e82c90da5ef3f80e2ab88c0b53112c60
(cherry picked from commit 093f0eb133)
2019-08-23 06:28:34 +00:00
Inseob Kim
5cefbd289d sysprop_library: Rename system scope to public
In the first design, public sysprops have been accessible from Java
modules linking against SDK. But SDK modules shouldn't do, because
sysprop_library isn't for the apps. This renames system to public, so
that only public(System till now) and internal scopes remain from now.

Bug: 131637873
Test: m && sysprop_test
Change-Id: I548007d4a6018922f98d3d13915cee1d66070086
2019-06-11 23:31:32 +09:00
Inseob Kim
da63a49338 Fix sysprop_library build err when using filegroup
.sysprop files are intended to be used only with sysprop_library, and we
can prevent build error by specifying dependencies upon CreateModule.

Bug: 131708148
Test: 1) try building sysprop_library module.
Test: 2) see liblog is correctly linked.
Change-Id: I702cedc255ee0b6a30c15e474dd6a88d9607b145
2019-06-10 14:18:13 +00:00
Yi Kong
e7fe9913d6 Clean up no_libgcc
no_libgcc is no longer needed anywhere. Move all occurances to no_libcrt
and remove no_libgcc.

Test: build
Change-Id: I6dd49db71d05d7685aa90cc837627f65e6742d6d
2019-06-03 15:52:40 -07:00
Sundong Ahn
80a87b3309 Add No_dist property
For the sysprop apis, we don't need dist. So the No_dist property is
added for it.

Bug: 132448761
Test: m -j dist
Change-Id: I51c6a6b87ab9dc90b6825c0d4d414e958dd7b265
2019-05-15 12:20:03 +09:00
Colin Cross
3047fa23da Build framework.aidl in Soong
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
2019-04-18 13:51:58 -07:00
Colin Cross
f8b860a0fb Use LoadHook to create modules in java_sdk_library
Creating new modules in a mutator is dangerous, as other mutators
that need to see the new modules may already have run, in this case
the prebuilts mutator.  Move SdkLibraryMutator to a LoadHook instead.
Also moves registering the LoadHook mutator to testing.go so it is
registered for all tests.

Test: m checkbuild
Change-Id: I08bd76a0e6205d2ca27861058067a1562c339eed
2019-04-16 21:46:28 +00:00
Dan Willemsen
412160e1c9 Stop using build/target -> build/make/target symlink
Instead, fully specify build/make/target/... everywhere

Test: treehugger
Change-Id: I07ba0e9b0604919a271afd5133070616e1f404fc
2019-04-09 21:36:26 -07:00
Inseob Kim
1f959769f3 Remove libbase dependency of sysprop_library
libbase dependency is not really needed, but it has been causing build
failure while linking with static variant of sysprop_library. This cuts
the dependency and only depend on libbase_headers and liblog.

Bug: 129301987
Test: 1) flash and boot walleye
Test: 2) try to build various properties with sysprop_library.
Test: 3) sysprop_test
Change-Id: I027e01c754b782818f52103184301267d4cdd576
2019-03-27 17:27:05 +09:00
Inseob Kim
6e93ac9a32 Fix checking of empty slice properties
Properties can be empty (not nil), and in that case some weird error
messages will happen to be emitted.

Bug: N/A
Test: try to build with api_pacakges: [] and srcs: []
Change-Id: I492077616e742072696265796520737465616b21
2019-03-21 22:04:01 +09:00
Inseob Kim
f63c2fb897 Add comment to api_packages property
Bug: N/A
Test: N/A
Change-Id: I38791170993484cdae26edee9595a74802853176
2019-03-05 05:23:45 +00:00
Jiyong Park
854a9440dd Add recovery_available property to sysprop module
This is required for a sysprop module to be used by a module like the
init which is available both in core and recovery variants.

Test: m
Change-Id: I075428289f5bdce26e931ccf3262793ca6e4a0fd
2019-02-26 10:27:13 +09:00
Jiyong Park
5d1598f746 Fix: sysprop module can't be used with whole_static_libs
When a sysprop module is listed in whole_static_libs, it is renamed to
"lib" + <module> to actually refer to the generated C++ library for the
sysprop module.

Test: m (sysprop_test amended)
Change-Id: I05eddb24433d444376787be567830929ef078159
2019-02-26 10:26:44 +09:00
Colin Cross
e4759b9ab9 Add java/testing.go for sysprop_test.go
Share more of the setup code for java tests to sysprop_tests.go.

Test: java_test.go, sysprop_test.go
Change-Id: I0e3b287bf188c432d995a9a91a18ebef12aa47d1
Merged-In: I0e3b287bf188c432d995a9a91a18ebef12aa47d1
(cherry picked from commit b19745363f)
2019-02-16 17:08:01 -08:00
Inseob Kim
c0907f191a Create sysprop_library soong module
A newly introduced sysprop_library soong module will generate a
java_sdk_library and a cc_library from .sysprop description files.
Both Java modules and C++ modules can link against sysprop_library
module, thus giving consistency for using generated sysprop API.

As Java controls accessibility of Internal / System properties with
@hide and @SystemApi, 2 different header files will be created. And
build system will selectively expose depending on the property owner
and the place where the client libraries go into.

Bug: 80125326
Bug: 122170616
Test: 1) Create sysprop_library module.
Test: 2) Create empty txt files under prebuilts/sdk.
Test: 3) Create api directory, make update-api, and see changes.
Test: 4) Try to link against sysprop_library with various clients.
Test: 5) Soc_specific, Device_specific, Product_specific, recovery flags
work as intended.
Change-Id: I78dc5780ccfbb4b69e5c61dec26b94e92d43c333
2019-02-13 23:32:51 +00:00