aboutsummaryrefslogtreecommitdiffstats
path: root/Android.bp
Commit message (Collapse)AuthorAgeFilesLines
* Move proto compilation to RuleBuilderColin Cross2019-04-021-0/+1
| | | | | | | | | | | | | | Using blueprint.Rule for protoc commands was causing code duplication because there was no good way to run the same protoc for cc, java and python but then run custom source packaging steps for java and python. Move most of the code into a common function that returns a RuleBuilder, and then let java and python add their own commands at the end of the rule. Bug: 70706119 Test: All Soong tests Test: m checkbuild Change-Id: Ic692136775d273bcc4f4de99620ab4878667c83a
* Add override_android_app module type.Jaewoong Jung2019-03-211-0/+1
| | | | | | | | | | | This is a new implementation of overriding module types that makes use of local variants. With this, product owners can use PRODUCT_PACKAGES to decide which override module to include in their products. Bug: 122957760 Bug: 123640028 Test: app_test.go Change-Id: Ie65e97f615d006b6e9475193b6017ea9d97e8e97
* Add support for no-vendor-variant VNDKVic Yang2019-03-211-0/+1
| | | | | | | | | | | | | | | | | | When no-vendor-variant VNDK is enabled, the vendor variant of VNDK libraries are not installed. Since not all VNDK libraries will be ready for this, we keep a list of library names in cc/vndk.go to indicate which libraries must have their vendor variants always installed regardless of whether no-vendor-variant VNDK is enabled. Also add --remove-build-id option to the strip script to facilitate the check of functional identity of the two variants. Bug: 119423884 Test: Add a dummy VNDK library and build with TARGET_VNDK_USE_CORE_VARIANT := true, with the corresponding build/make change. Change-Id: Ieb1589488690e1cef1e310669a8b47a8b8759dac
* Add path properties mutatorColin Cross2019-03-071-0/+2
| | | | | | | | | | | | Add a mutator pass after DepsMutator that visits every property struct in every module looking for properties that have a tag `android:"path"`, and automatically add a SourceDepTag dependency on any module references (":module-name") found. Uses a cache to store the mapping of property struct type to locations of properties with the tag. Test: android/path_properties_test.go Change-Id: I38c0497843dde4890e9342c3a6f0b402c0720742
* Add modules for converting java modules between host and deviceColin Cross2019-03-051-0/+2
| | | | | | | | | | | java_device_for_host and java_host_for_device allow treating a device module as a host module and vice versa. They will be useful for converting layoutlib and robolectric to Soong, as these modules run device java code on the host. Bug: 117920228 Test: device_host_converter_test.go Change-Id: Ia9a371fb41a97bc16338097f3ce8b40099744167
* Add dexpreopt_bootjars_test.goColin Cross2019-03-051-0/+1
| | | | | | | Add a test that exercises the dexpreopt_bootjars.go singleton. Test: dexpreopt_bootjars_test.go Change-Id: I01d4f6e22f6ff7b809af043391d7b6209dcb8675
* Add support for including py_binary and *_go_binary in apexsAlex Light2019-03-011-0/+1
| | | | | | | | | | | | These additional binary types are useful for some apexs. Add the ability to include them. Due to the nature of the resulting artifacts only py binaries with embedded launchers and host go binaries are supported. Test: m com.android.support.apexer Bug: 119332365 Bug: 119332362 Change-Id: I27c253d3647cf7bbe15896610d7a74a5f93e8bec
* Revert "Add override_module."Jaewoong Jung2019-02-281-1/+0
| | | | | | | | This reverts commit aa65e17016152d0d73cd10ab3987bc3bd5c2ef91. Reason for revert: Not compatible with PRODUCT_PACKAGES, and so has very limited use. Change-Id: Ib141d3984a6f12bb50989e66037494c466b066f1
* Add override_module.Jaewoong Jung2019-02-271-0/+1
| | | | | | | | | | | This new module type replaces the inherit-package function in make by allowing developers to override the name, the certificate, and the manifest package name of an android_app module. Bug: 122957760 Fixes: 123640028 Test: app_test.go + BrowserGoogle Change-Id: Iefe447e7078b25039233221361ef95c83a29973a
* Refactor dexpreopt_bootjars.go to prepare for multiple boot imagesColin Cross2019-02-201-0/+1
| | | | | | | | | Refactor dexpreopt_bootjars.go so that buildBootImage can be called with a bootImageConfig to create rules to build the boot image in preparation for building multiple boot images. Test: m checkbuild Change-Id: I7ba40a0988c8acbd6c1ee4e36f4bbb34fb4e2d24
* Implement vts_config moduleSasha Smundak2019-02-191-0/+2
| | | | | | | Test: internal (see android/vts_config_test.go) + run 'm vts' and check that host/linux-x86/vts/android-vts.zip remians the same Change-Id: I0249a974a240e7669c3b9378c17739df8e120873 Fixes: 122617100
* Add java/testing.go for sysprop_test.goColin Cross2019-02-161-0/+1
| | | | | | | | | 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)
* Move dexpreopting of boot jars into SoongColin Cross2019-02-151-0/+1
| | | | | | | | Implement the dexpreopting of boot jars in singleton rules in Soong. Test: m checkbuild Change-Id: Ic02ce941fa5e238b839b3eb4c06a3e10c62d98ff
* Create sysprop_library soong moduleInseob Kim2019-02-131-0/+22
| | | | | | | | | | | | | | | | | | | | | | 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
* Move hiddenapi singleton rules to SoongColin Cross2019-02-061-0/+1
| | | | | | | | | | Move the rules that build hiddenapi-stubs-flags.txt, hiddenapi-flags.csv and hiddenapi-greylist.csv into Soong. Bug: 123645297 Test: m checkbuild Test: m UNSAFE_DISABLE_HIDDEN_API_FLAGS=true Change-Id: I90bf58710f6153ee8565994f799d3ec5699bc7fa
* Prepare for a type-safe OnceKeyColin Cross2019-02-061-0/+1
| | | | | | | | | Add an opaque OnceKey type and use it for all calls to Once in build/soong. A future patch will convert the arguments to Once* to OnceKey once users outside build/soong have been updated. Test: onceper_test.go Change-Id: Ifcb338e6e603e804e507203c9508d30ffb2df966
* Move dexpreopt.Script to android.RuleBuilderColin Cross2019-02-051-0/+2
| | | | | | | | Move dexpreopt.Script to android.RuleBuilder so that the builder style can be used in more places. Also add tests for it. Test: rule_builder_test.go Change-Id: I92a963bd112bf033b08899e930094b908acfcdfd
* Add sh_binary[_host] for shell script that should be installed as executableDan Willemsen2019-01-281-0/+1
| | | | | | | | | We've been putting these in cc_prebuilt_binary, but that's not really correct. It also tries adding '.exe' to the end of windows executables, which isn't desirable for bat files. Test: Use sh_binary_host Change-Id: Idd5418dceb81ac55b766c987fbb69a810aeb8a3b
* Optimize filterArchStruct when nothing is filteredColin Cross2019-01-251-0/+1
| | | | | | | | | | Runtime-created struct types have limit on the name of the type, which is the full text of the fields in the struct. Avoid creating runtime struct types when filtering produces an identical struct. Also add tests and godoc for filterArchStruct. Test: arch_test.go Change-Id: If7eb27ea9e72073d5252e93f2110b08889ed76b1
* Support building for Fuchsia.Doug Horn2019-01-241-0/+2
| | | | | | | | | | | | This CL adds configs for the arm64 and x64 fuchsia device targets, sets up the necessary linker flags, and disables some functionality that is not currently supported on Fuchsia. Bug: 119831161 Test: Compile walleye, internal validation against fuchsia_arm64-eng and fuchsia_x86_64-eng. Change-Id: I2881b99d2e3a1995e2d8c00a2d86ee101a972c94
* Replace annotation_processors with pluginsColin Cross2019-01-231-0/+2
| | | | | | | | | | | | | | | | | Follow bazel's modules for annotation processors by introducing a java_plugin module type that can contain extra metadata about the annotation processor, the processor class and a flag to specify if the annotation processor is compatible with the turbine optimization. Deprecate the annotation_processors property, which took a list of java_library_host modules, in favor of the plugins property, which takes a list of java_plugin modules. The annotation_processors property will be removed once all uses have been replaced with plugins. Bug: 77284273 Test: plugin_test.go Test: m caliper Change-Id: I37c1e80eba71ae2d6a06199fb102194a51994989
* Move kotlin to it's own fileColin Cross2019-01-221-0/+2
| | | | | | | | | kapt is going to make kotlin a little more complicated, move the rules and tests to their own files. Bug: 122251693 Test: m checkbuild Change-Id: Ieed78b97995ced210b710bd50c357514cc8e3bc6
* Move hiddenapi to SoongColin Cross2019-01-171-0/+1
| | | | | | | | | | | | | Perform hiddenapi CSV generation and dex encoding for Soong modules in Soong. This fixes an issue where dexpreopting was happening on a different jar than was being installed. Bug: 122856783 Test: m checkbuild Test: no change out/target/common/obj/PACKAGING/hiddenapi-flags.csv Test: only ordering change to out/target/common/obj/PACKAGING/hiddenapi-greylist.csv Test: cts/tests/signature/runSignatureTests.sh Change-Id: I4fc481efc29e73cb2bdaacf672e86d5f6f0075ae
* Autogen python test config.yelinhsieh2019-01-141-0/+1
| | | | | | | | | | | | | Feature request from developer, autogen python test config. Bug:118442443 Test: $source build/envsetup.sh ; lunch $sed -i '/test_config/d' tools/acloud/Android.bp $make acloud_test $[ -f $ANDROID_HOST_OUT_TESTCASES/acloud_test/acloud_test.config ] && echo "Found" || echo "Not found" Change-Id: I196230581b456afe03e67f9cd84c028d18ba08d9
* Split out sdk.go from java.goColin Cross2019-01-101-0/+2
| | | | | | | | Split out SDK handling functions from java.go to sdk.go and tests from java_test.go to sdk.go. Test: sdk_test.go Change-Id: I83ef48cbe5230572c1d4ecc0e89021d2f7c71b76
* Add dexpreopt enabled testsColin Cross2019-01-051-0/+1
| | | | | | | Add tests that verify when dexpreopt is enabled or disabled. Test: dexpreopt_test.go Change-Id: Ideba9c0dac30eb31e7ae29e46d1d1590202b8369
* Dexpreopt soong modules inside soongColin Cross2018-12-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | Port the dexpreopt logic from Make to the dexpreopt package in Soong, and use it to dexpreopt Soong modules. The same package is also compiled into the dexpreopt_gen binary to generate dexpreopt scripts for Make modules. This relands Ib67e2febf9ed921f06e8a86b9ec945c80dff35eb and I462182638bd57b1367b5bfb0718e975c11ae66f7, along with multiple fixes to depsfile generation in dexpreopt_gen that caused .odex files for modules in defined make to be missing dependencies on boot.art, and a fix to not dexpreopt and strip tests. Bug: 119412419 Bug: 120273280 Test: no differences to dexpreopt outputs on aosp_sailfish system/, only expected changes to dexpreopt outputs on system_other (.vdex files for privileged Soong modules no longer incorrectly contain .dex contents). Test: OUT_DIR=$PWD/out m Test: NINJA_ARGS="-t deps out/target/product/sailfish/obj/APPS/Contacts_intermediates/dexpreopt.zip" m Change-Id: I6bb2c971cee65d2338839753aa0d84939f335b1b
* Revert "Dexpreopt soong modules inside soong"Colin Cross2018-12-141-2/+0
| | | | | | | This reverts commit 29ff88741e710b05743dcf347484c31311e81cda. Test: none Bug: 119412419
* Dexpreopt soong modules inside soongColin Cross2018-12-131-0/+2
| | | | | | | | | | | | | | | Port the dexpreopt logic from Make to the dexpreopt package in Soong, and use it to dexpreopt Soong modules. The same package is also compiled into the dexpreopt_gen binary to generate dexpreopt scripts for Make modules. Bug: 119412419 Bug: 120273280 Test: no differences to dexpreopt outputs on aosp_sailfish system/, only expected changes to dexpreopt outputs on system_other (.vdex files for privileged Soong modules no longer incorrectly contain .dex contents). Change-Id: Ib67e2febf9ed921f06e8a86b9ec945c80dff35eb
* Stubs variant is used when building for APEXJiyong Park2018-12-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a native module is built for an APEX and is depending on a native library having stubs (i.e. stubs.versions property is set), the stubs variant is used unless the dependent lib is directly included in the same APEX with the depending module. Example: apex { name: "myapex", native_shared_libs: ["libX", "libY"], } cc_library { name: "libX", shared_libs: ["libY", "libZ"], } cc_library { name: "libY", stubs: { versions: ["1", "2"], }, } cc_library { name: "libZ", stubs: { versions: ["1", "2"], }, } In this case, libX is linking to the impl variant of libY (that provides private APIs) while libY is linking to the version 2 stubs of libZ. This is because libY is directly included in the same apex via native_shared_libs property, but libZ isn't. Bug: 112672359 Test: apex_test added Change-Id: If9871b70dc74a06bd828dd4cd1aeebd2e68b837c
* Add filegroup support to notice property.Jaewoong Jung2018-11-271-1/+1
| | | | | | | | | | | Also, replace all notice file references with the parent directory pattern(../) with filegroups. This new version has ALLOW_MISSING_DEPENDENCIES support, so shouldn't break branches that don't contain the libwinpthread project. Bug: 118899640 Test: Manual build + forrest runs on previously failed branches. Change-Id: I13e70e8dab547f82c1c8f15eccc7ae116e480ad5
* Add support for AArch64 XOM binaries.Ivan Lozano2018-11-211-0/+1
| | | | | | | | | | Adds build system support for generating AArch64 binaries with execute-only memory layouts via a new xom module property. Also adds support for an ENABLE_XOM build flag for global builds. Bug: 77958880 Test: make -j ENABLE_XOM=true Change-Id: Ia2ea981498dd12941aaf5ca807648ae37527e3ee
* Revert "Add filegroup support to notice property."Jaewoong Jung2018-11-191-1/+1
| | | | | | | | This reverts commit ff7a1a47d90ea962af8241952f29019fd45d7692. Reason for revert: Broke ART buildbot Change-Id: I005ccfcc2c36bbcb274cb2a069fc701168faacd2
* Add filegroup support to notice property.Jaewoong Jung2018-11-161-1/+1
| | | | | | | | | Also, replace all notice file references with the parent directory pattern(../) with filegroups. Bug: 118899640 Test: Manual build Change-Id: I841345d747f41a3bb5beea66ad87a979734c39a4
* Revert "Revert "Revert "Revert "Export static libraries.""""Jaewoong Jung2018-11-161-0/+1
| | | | | | | | This reverts commit 555c1142838937c63b7cfd5a4a757c7d39d4422f. Reason for revert: The namespace issue in the pi-dev-plus-aosp-without-vendor branch is now fixed. Change-Id: I26ed591447797a8ee505f43bdd209162418b6c5e
* Revert "Revert "Revert "Export static libraries."""Jaewoong Jung2018-11-091-1/+0
| | | | | | | | This reverts commit eb05c2a633ba6ceafcd7fd4dfd7382127dc86fec. Reason for revert: Yet another broken build. Change-Id: I4198f2dd5c7848365d71d03f6dbd598998fb9bd8
* Revert "Revert "Export static libraries.""Jaewoong Jung2018-11-091-0/+1
| | | | | | | | This reverts commit 3affc07ca03b6e86a01658020e273ba77cc8114d. Reason for revert: The notice dependency bug is now fixed. Change-Id: I5424ade9d742fbe190651097c04914a29db6dfa0
* Revert "Export static libraries."Jaewoong Jung2018-11-061-1/+0
| | | | | | | | This reverts commit 9d5ca159dc2bc56948f011745122bfba172d492d. Reason for revert: This broke few builds. Change-Id: Id9c4d7c145602a55ae07bb177f2c236e16f4fb63
* Export static libraries.Jaewoong Jung2018-11-051-0/+1
| | | | | | | | | | Export static libraries through LOCAL_STATIC_LIBRARIES and LOCAL_WHOLE_STATIC_LIBRARIES. This enables dependency-based NOTICE file generation. Also, add a notice property in the libwinpthread module. Bug: 36073965 Test: cc_test.go Change-Id: If1ca1f9159e80cf8fbe71df7a13ca5d6a1f63b40
* Revert "Export static libraries."Jaewoong Jung2018-11-021-1/+0
| | | | | | | | This reverts commit 5d19e1de88b7ae9e0e9b74212881e11df57a3833. Reason for revert: Broke aosp-build-tools/darwin_mac Change-Id: I1af36848fb5a00849aec69941ddef33769b1b536
* Export static libraries.Jaewoong Jung2018-11-011-0/+1
| | | | | | | | | | Export static libraries through LOCAL_STATIC_LIBRARIES and LOCAL_WHOLE_STATIC_LIBRARIES. This enables dependency-based NOTICE file generation. Also, add a notice property in the libwinpthread module. Bug: 36073965 Test: cc_test.go Change-Id: Ic63ca523b40acac82bbe876f7aa40ecd495907c5
* Add filename property to prebuilt_etcJiyong Park2018-10-261-0/+1
| | | | | | | | | | | 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
* Allow cc_genrule srcs to vary by architectureColin Cross2018-10-231-0/+1
| | | | | | | | Add arch_variant to the genrule srcs property so that cc_genrule modules can vary the srcs and outs by architecture. Test: cc/genrule_test.go Change-Id: Idb17013e137d7ca21ca4cfc3e4c1fa7d89977043
* Rework how linux_bionic is built with LLDDan Willemsen2018-10-221-3/+3
| | | | | | | | | | | | In order to simplify the wrapper function, and stop using a linker script, generate a set of flags to pass to LLD. Then run host_bionic_inject on the linked binary in order to verify the embedding, and give the wrapper function the address of the original entry point (_start). Bug: 31559095 Test: build host bionic with prebuilts/build-tools/build-prebuilts.sh Change-Id: I53e326050e0f9caa562c6cf6f76c4d0337bb6faf
* APEX can be signed with different keysJiyong Park2018-10-161-0/+1
| | | | | | | | | | | | | | A new module type 'apex_key' is defined to specify public and private key pair for APEXs. An APEX can refer to the module via the property 'key'. When building the APEX, the private key from the key module is used to sign it. In addition, the public key from the key module is automatically installed to /system/etc/security/apex. Bug: 115721587 Test: m apex.test; m /apex/com.android.example.apex@1 exists Change-Id: I82666db095bd7a09f6c1b9cbea2db57ebc076cbf
* Add apex variantsJiyong Park2018-10-111-0/+16
| | | | | | | | | | | | | | | | | | | | | | | Now, APEX-aware modules (the ones implementing android.ApexModule interface) are created with multiple variants for each APEX that they are included. For example, if a module is included (either directly or indirectly - via static linking) to two APEXs, the module is built separately for the two APEXs (and of course separately for platform). This is a first step to limit the symbol visibility to the modules built for APEXs; platform private symbols and libs shouldn't be allowed for them. In addition, the build system now tracks transitive dependencies of the modules in APEXs. For example, if native_shared_lib_modules:["libFoo"] then libFoo and its dependencies are all automatically included to the APEX. Bug: 112672359 Test: m apex.test; the built apex has additional libs (such as liblog, libc++, ...) that are dependencies of the ones specified in Android.bp Change-Id: Id9e3fc486dd4e7e36f8b6799dfb041868c5198d5
* Add ApexModule interface for APEX-aware modulesJiyong Park2018-10-111-0/+1
| | | | | | | | | | | | | | | | | | | | ApexModule is the interface for APEX-aware modules. The module type apex uses the interface to get APEX-specific information from other modules, such as the list of APEXs that a module should be built for. A module that is included in an APEX will be built specificaly for the APEX. This is especially required for shared libraries; we shouldn't just copy the artifacts built for platform, because they may be linking against private (=unstable) symbols that are not available to APEXs which are basically unbundled. This CL, as a first step, makes cc.Module an APEX-aware module type. Bug: 112672359 Test: m apex.test; the built apex has all the direct and transitive shared lib dependencies of the libs and executables listed in Android.bp Change-Id: I21f6a586654779984f0f5154b2a08b2adbf2168b
* Add support for JNI libraries to android_app modulesColin Cross2018-10-081-0/+1
| | | | | | | | | | | Make android_app modules a MultiTargets module, which means the common variant will have a list of Targets that it needs to handle. Collect JNI libraries for each Target, and package them into or alongside the APK. Bug: 80095087 Test: app_test.go Change-Id: Iabd3921e1d4c4b4cfcc7e131a0b0d9ab83b0ebbb
* Stop using GCC in toolchain_libraryDan Willemsen2018-10-071-3/+39
| | | | | | | | | Instead, hardcode the ~dozen paths into build/soong/Android.bp, which will unblock removing more GCC support. Bug: 114286031 Test: m Change-Id: I2508432e00b1469141f01e667f3c6a2fe30cd805
* Add tests for genrule command expansionColin Cross2018-10-051-0/+3
| | | | | | | Add tests for expanding variables in a genrule cmd property. Test: genrule_test.go Change-Id: I8288b8616d518bb5f24a892c4e59f68d95055d0a