aboutsummaryrefslogtreecommitdiffstats
path: root/sysprop
Commit message (Collapse)AuthorAgeFilesLines
* Soong package structure refactoringJaewoong Jung2020-06-021-0/+18
| | | | | | | | | | | | Give prebuilt_etc and sh_binary their own packages and split the gigantic main Android.bp up to small, per-package ones. (This is a cherry-pick change.) Test: m nothing, TreeHugger Bug: 156980228 Change-Id: I7b00cd344b9f16861f1ff39edf0029f016b853d0 Merged-In: I7b00cd344b9f16861f1ff39edf0029f016b853d0
* cc: add min_sdk_version propJooyung Han2020-04-251-0/+8
| | | | | | | | | | | | | | | | | | | | | | min_sdk_version is the minimum version of the sdk that the compiled artifacts will run against. For example, when a module is used by two APEXes and their min_sdk_versions are set to 29 and 30, then the module should support both versions even if it is compiled against 30. Therefore, min_sdk_version of the module needs to be set 29 in that case. In general, this is set as the minimum value of min_sdk_vesions of APEXes. For now, there's no build-time checks about this prop even if the prop is set. Bug: 145796956 Bug: 152655956 Bug: 153333044 Test: m nothing Merged-In: I072ad8c317d2615e8b08e4e7ea2db8e7955b4b12 Change-Id: I072ad8c317d2615e8b08e4e7ea2db8e7955b4b12 (cherry picked from commit 379660c9c2d7310a5c6f69a4a63e7ab82aa4fc2d)
* Add apex_available to sysprop_libraryPaul Duffin2020-04-222-1/+13
| | | | | | | | | | | Added apex_available support to sysprop_library and copied it onto the underlying cc_library. Bug: 152762638 Bug: 153306490 Test: m nothing Merged-In: I8f4c539532b48f3a45c1fbf0f7287db11df69d2f Change-Id: I8f4c539532b48f3a45c1fbf0f7287db11df69d2f
* Add C++ Host support on sysprop_libraryInseob Kim2020-04-222-4/+29
| | | | | | | | | | | | | | With Host_supported: true, C++ part of sysprop_library will create host variant which can be used from host modules. As there are no native system property support on host, libbase functions will be used instead. Adding support on host will help reduce code complexity of other host_supported modules. Bug: 147708854 Bug: 153306490 Test: m, sysprop_test, manually test host binary Merged-In: I850d91fea298ef1a0c16c6a7a9ec1aca5cf37e69 Change-Id: I850d91fea298ef1a0c16c6a7a9ec1aca5cf37e69
* Dedup cc library module type registrationPaul Duffin2019-12-201-2/+0
| | | | | | Test: m checkbuild Bug: 146540677 Change-Id: I6685338550f587212e70f3eba8d4342b66f566e2
* Improve cc tests by adding sanitizer mutatorsPaul Duffin2019-12-191-1/+0
| | | | | | | | | | | | | | | | | | | | This fixes an issue that arises when deduping cc build component registration code. The sanitize_runtime_deps and sanitize_runtime post deps mutators were not previously added when running cc tests. That meant the tests were not actually testing the same behavior as at runtime. Adding the mutators breaks the TestFuzzTarget test as the mutator adds libclang_rt.ubsan_standalone-aarch64-android as a dependency of libc++ and the former is not available. This fixes the test by adding the missing dependency as a cc prebuilt shared library. Test: m checkbuild Bug: 146540677 Change-Id: Ie13c7e6fcefef7d9cb1cc5364be3dc563ce40de5
* Dedup prebuilt mutator registrationPaul Duffin2019-12-191-2/+1
| | | | | | Test: m checkbuild Bug: 146540677 Change-Id: I9f8a11adf61fe6f352ec1eabc7c5bac332348ba2
* Dedup registration for cc default test configPaul Duffin2019-12-191-9/+1
| | | | | | | | | | | | | | | | The cc.GatherRequiredDepsForTest() method returns some default module definitions that are required when using cc module types like cc_library. Previously, the registration of the module types and mutators needed to process those default definitions was duplicated in the test config initialization. This change removes that duplicated code and replaces it with calls to cc.RegisterRequiredBuildComponentsForTest(ctx) which registers all the required build components. Test: m checkbuild Bug: 146540677 Change-Id: I80b6913c5691ff164ce9d308b9e1da24940f2d42
* Dedup system modules and sdk library module type registrationPaul Duffin2019-12-191-1/+2
| | | | | | Test: m checkbuild Bug: 146540677 Change-Id: I982fcb8d723e8e2f7679434051ddc427d4fbd7be
* Dedup registration code for module types and singletonsPaul Duffin2019-12-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The registration of module types and singletons is duplicated between init() functions that register them for use in the build runtime and test context creation code that registers them for testing. This is a proof of concept for a mechanism that will allow the code to be shared. It defines a RegistrationContext interface that is implemented by both the TestContext and the new initRegistrationContext type. An instance of the the latter is available through the InitRegistrationContext variable. The intent is that the registration of the module types and singleton types will be extracted from the init() function into a separate function that takes a RegistrationContext parameter. That method is called from init() passing in the InitRegistrationContext and from a test passing in the TestContext. Something like this: func init() { RegisterBuildComponents(android.InitRegistrationContext) } func RegisterBuildComponents(ctx android.RegistrationContext) { ctx.RegisterModuleType(....) .... } A test would do something like this: ctx := android.NewTestContext() RegisterBuildComponents(ctx) Test: m nothing Change-Id: I97173cabb6d6cf7ce98fdb5f73418438b1997b35
* Merge "Create public stub for platform's sysprop_library"Treehugger Robot2019-12-192-72/+135
|\
| * Create public stub for platform's sysprop_libraryInseob Kim2019-12-192-72/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Java modules using SystemAPI can now link against platform owned sysprop_library with public stub. This allows modules to use platform's public sysprops (which should be regarded as an API) without any hidden API usages, if using dynamic linking and boot class path. This doesn't affect any vendor or odm owned sysprop_library. Bug: 141246285 Bug: 145167888 Test: m Change-Id: I99824fb24a75cc8282211c2ad6c6296ae9fca393
* | Move filesystem into ConfigColin Cross2019-12-181-22/+17
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Move imageMutator before archMutatorColin Cross2019-12-171-7/+7
|/ | | | | | | | | | | Run the imageMutator between osMutator and archMutator so that different arch variants can be set for the different partitions. Bug: 142286466 Test: m checkbuild Change-Id: I65d05714b75aa462bf9816da60fdc2deda4de593 Merged-In: I65d05714b75aa462bf9816da60fdc2deda4de593 (cherry picked from commit 9c8f687584986f6e36ebfdbda22c3cc6c21cf02d)
* Use empty string for core image variantColin Cross2019-12-131-9/+9
| | | | | | | | | | | 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)
* Move ImageMutator after archMutatorColin Cross2019-12-061-1/+0
| | | | | | | | | | | | 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
* Fix: vendor and odm are restricted to use public platform propertiesJiyong Park2019-12-051-2/+2
| | | | | | | | | There was a mistake in the condition. Bug: N/A Test: N/A Change-Id: I07f79fdcc3c946a4b9e957e5a42b6694b5eeb251
* Merge changes I0dcc9c7b,I9bc40642Colin Cross2019-11-251-1/+1
|\ | | | | | | | | | | * changes: Move cc.imageMutator into the android package Make CreateVariations return []android.Module
| * Move cc.imageMutator into the android packageColin Cross2019-11-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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
* | Make TestContext.RegisterModuleType take an android.ModuleFactoryColin Cross2019-11-251-10/+10
|/ | | | | | | | Avoid having to pass ModuleFactoryAdaptor to every call to RegisterModuleType in a test by wrapping RegisterModuleType. Test: all soong tests Change-Id: If8847d16487de0479cc3020b728256922b3cadba
* Make CreateModule take an android.ModuleFactoryColin Cross2019-09-261-3/+3
| | | | | | | | Reduce the boilerplate required to call CreateModule by taking an android.ModuleFactory instead of a blueprint.ModuleFactory. Test: m checkbuild Change-Id: I1259d2dd3f7893b5319c333bc180727ac40f9e91
* Move sysprop gen code to sysprop moduleInseob Kim2019-09-232-27/+149
| | | | | | | | | | 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
* Add version to vendor variantsInseob Kim2019-09-181-7/+7
| | | | | | | | | | | | | | | | | | | 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
* Implement sysprop_library API stability checkInseob Kim2019-08-232-77/+241
| | | | | | | | | | | | | | | | | | | | | | | | | 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 093f0eb1331dffaab23e9252d2a4dbc6a27156f0)
* sysprop_library: Rename system scope to publicInseob Kim2019-06-111-10/+10
| | | | | | | | | | | 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
* Fix sysprop_library build err when using filegroupInseob Kim2019-06-101-0/+4
| | | | | | | | | | .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
* Clean up no_libgccYi Kong2019-06-031-1/+1
| | | | | | | | no_libgcc is no longer needed anywhere. Move all occurances to no_libcrt and remove no_libgcc. Test: build Change-Id: I6dd49db71d05d7685aa90cc837627f65e6742d6d
* Add No_dist propertySundong Ahn2019-05-151-0/+1
| | | | | | | | | 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
* Build framework.aidl in SoongColin Cross2019-04-181-0/+1
| | | | | | | | | | | | | 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
* Use LoadHook to create modules in java_sdk_libraryColin Cross2019-04-162-9/+2
| | | | | | | | | | | 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
* Stop using build/target -> build/make/target symlinkDan Willemsen2019-04-091-2/+2
| | | | | | | Instead, fully specify build/make/target/... everywhere Test: treehugger Change-Id: I07ba0e9b0604919a271afd5133070616e1f404fc
* Remove libbase dependency of sysprop_libraryInseob Kim2019-03-271-0/+20
| | | | | | | | | | | | 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
* Fix checking of empty slice propertiesInseob Kim2019-03-211-1/+5
| | | | | | | | | 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
* Add comment to api_packages propertyInseob Kim2019-03-051-1/+3
| | | | | | Bug: N/A Test: N/A Change-Id: I38791170993484cdae26edee9595a74802853176
* Add recovery_available property to sysprop moduleJiyong Park2019-02-261-3/+4
| | | | | | | | 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
* Fix: sysprop module can't be used with whole_static_libsJiyong Park2019-02-261-1/+17
| | | | | | | | | 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
* Add java/testing.go for sysprop_test.goColin Cross2019-02-161-56/+4
| | | | | | | | | 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 b19745363f3cc59ffd46c664997602f250892d4d)
* Create sysprop_library soong moduleInseob Kim2019-02-132-0/+510
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