summaryrefslogtreecommitdiff
path: root/android/variable.go
AgeCommit message (Collapse)Author
2019-01-11Preopt: Do not strip non-image boot class path jars. Vladimir Marko
Test: Pixel 2 XL boots. Bug: 119868597 Change-Id: I7bd3b7655aecf1a8c26dd8d4d18d3eec685ece88
2019-01-10Check system certificate violation for product apks Jeongik Cha
Only if enforcement option is enable, it makes build error when there is apk located at system partition but signed with system certificate. Bug: 74699609 Test: m -j Change-Id: I23c41f2665dd97abac3e77d1c82d81ff91b894eb
2019-01-09Add PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES Jiyong Park
It is a list of <module_name>:<manifest_name> pairs. When the module name of an APK or an APEX matches with <module_name>, then its app manifest name is overridden to <manifest_name>. <module_name> and <manifest_name> can be patterns as in com.android.%:com.mycompany.android.%.release Note that, in case of APEXes, the manifest name refers to the name of the zip container. The apex manifest name (which is specified in apex_manifest.json) is not overridden. Test: m with PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES for 1) an APK in Android.mk 2) an APK in ANdroid.bp 3) an APEX and check that manifest names are modified as specified Change-Id: Ie58882d90884695e893944c43d9c8803b283e93d
2018-12-18Add a flag to allow unbundled builds to build SDKs from source Colin Cross
Mainline modules are tightly coupled to the platform, and should build against the current SDK from source and not prebuilts. Add a flag UNBUNDLED_BUILD_SDKS_FROM_SOURCE to specify that a TARGET_BUILD_APPS build should build the current SDK instead of using the prebuilts. Bug: 121194841 Bug: 121231426 Test: no change to out/build-aosp_sailfish.ninja Test: forrest unbundled build Test: forrest master apps build Test: forrest mainline modules build Change-Id: I45a40a335483dae2fe192721df9b31bdbab97ee5
2018-12-15Dexpreopt soong modules inside soong Colin Cross
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
2018-12-14Revert "Dexpreopt soong modules inside soong" Colin Cross
This reverts commit 29ff88741e710b05743dcf347484c31311e81cda. Test: none Bug: 119412419
2018-12-13Dexpreopt soong modules inside soong Colin Cross
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
2018-11-29Remove obsolete flag Anton Hansson
Last use removed in Ibefde5feaeaec8fb68cbc6ea1c019bf8b5e608bb Test: make Change-Id: Icd4273b2ab472758ce0fbc237c294960ee16685d
2018-11-28Allow NDK APIs to be marked as drafts. Dan Albert
Draft APIs are available to the platform and to CTS to allow developers to iterate on an API, but hidden from the NDK artifacts to avoid releasing the API until it is ready. Test: Mark binder_ndk headers and library as drafts, make checkbuild, build-ndk-prebuilts.sh, verify missing from NDK artifact. Bug: http://b/120091134 Change-Id: I8685e92bdaaea581e17fe98e7a2bfb9388f9f132
2018-11-21Add support for AArch64 XOM binaries. Ivan Lozano
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
2018-11-19Add product_variables.product_is_iot variables Dan Willemsen
These are enough to compile bootanimation with Soong. Test: build bootanimation on internal branch Change-Id: I8474b54ea196ab71ce178c517eb261bdc22b2e01
2018-11-14APEX can be flattened Jiyong Park
When TARGET_FLATTEN_APEX is set to true, APEXes are flattened, which means files in an APEX is not packaged into the mini file system image, but instead directly copied to the system partition. This option is for devices where kernel does not support loopback devices or the maximum number of loopback devices is too small (though the threshold is TBD as of now). This CL also fixes a bug that jars having bytecode are installed instead of those having dex. Bug: 118485880 Test: TARGET_FLATTEN_APEX=true m apex.test; tree out/target/product/.../system/apex/apex.test shows list of files in it. Test; m apex.test, then a file out/target/product/.../system/apex/apex .test.apex exists. Change-Id: I5a3d62d392d05f2779c4925388afe4f6e460059b
2018-10-26Add sanitize.address to product_variables.eng Colin Cross
statsd enables ASAN in eng builds. Test: m checkbuild Change-Id: Ie25e1be55e14043a866d881b378cdd8d38ad356e
2018-10-25Store dex files uncompressed and unstripped in privileged APKs Colin Cross
Privileged APKs need to store their dex files uncompressed so they can be verified and mapped directly out of the APK. Also track whether the module will be dexpreopted or not in order to determine if the dex file should be stripped before signing. Test: SystemUI.apk contains an uncompressed dex file Change-Id: I4dca86c7f8778595882405b34adcf2a7bae03c67
2018-10-24Move Ndk_abis from soong.config to soong.variables Colin Cross
soong.config is not cleared between builds, which can cause problems when switching between an ndk build and a platform build. Bug: 118398924 Test: OUT_DIR=out_ndk DIST_DIR=dist build/soong/scripts/build-ndk-prebuilts.sh Change-Id: Ifc03a0c25f46625375cdda5723e4a09d7d8050d5
2018-10-21Remove USE_CLANG_LLD[=false] Dan Willemsen
This should always be true now. It will be a change for side branches (build_tools, etc) that weren't setting UseClangLld in the soong.variables file. Test: treehugger Change-Id: I9fd6157fda630bf8bb939677dbcb026f02685f19
2018-10-20Stop using DIST_DIR in Soong Dan Willemsen
We're only using it to distribute files in case of failure, which isn't well supported currently, but can be handled for now by using the DIST_DIR environment variable during the command execution. This was at least one cause that we'd be re-running Soong during every build server build, as the DIST_DIR values are unique. Test: m dist Change-Id: Ibd5e6b6c46695350de80b745bfb6a6aa685033a0
2018-10-08Remove Sepolicy_split. Steven Moreland
It's not referenced anywhere anymore (or filled out). Test: m nothing (parses Android.bp files) Change-Id: I5a90bcc1ea949ee054c452eefeb2cfc2640cfaa6
2018-10-02Add DevicePrefer32BitApps to Soong Colin Cross
Bug: 80095087 Test: m checkbuild Change-Id: Ia2b2435492198ad646cbf7c59c6af59d381b20a5
2018-08-31Provide access to product_variables.malloc_svelte.cflags inside target. Sasha Smundak
Test: soong still works. Change-Id: I359f1e750e5961a21e3eeb9f1f3aa47974d7e99f
2018-07-20Add support for /product-services partition Dario Freni
am: fd05a74e06 Change-Id: Ie9e3487fb3643e7276d8517c1ec87af07240585a
2018-07-19Add support for /product-services partition Dario Freni
This is an adaptation of Icc4f8c16bc389fe20db680849f311d02df1299c3, to support modules that are installed on the /product-services partition. Bug: 80741439 Test: m -j both with and without enabling the new partition Change-Id: I72b335ad38baff5848cd3da7489343f8cf98ff16
2018-07-11Merge "Allow disabling LTO on eng" John Reck
am: 7f1c57ee33 Change-Id: I349e5e5856d6991fff465a77c5bd6ad938b2b575
2018-07-11Allow disabling LTO on eng John Reck
Test: Verified setting never to true in hwui resulted in a fast incremental build Bug: 111277863 Change-Id: Ic3da6f3adc2c97f0d5f287402c460907533a5f71
2018-06-28Merge "Add Product_is_iot to soong config." Ari Hausman-Cohen
am: ffc924b8f8 Change-Id: I336e22324d632ede1180d0c024fec60528f77cf6
2018-06-27Add Product_is_iot to soong config. Ari Hausman-Cohen
Some code needs to behave differently for Android Things systems. The Product_is_iot variable property can be used to determine if a build is for Android Things or not. Bug: 110494430 Test: aosp_angler builds Change-Id: I902b438a334786adbd515188ad35e241d82e69fe
2018-05-22Merge "Account for multiple BOARD_PLAT_PUBLIC[PRIVATE]_SEPOLICY_DIR dirs" ↵ Tri Vo
am: 542d60062f am: 01f63e2954 Change-Id: If6b1ce0b6d30c0d663b1cb644b900e77b435c998
2018-05-22Account for multiple BOARD_PLAT_PUBLIC[PRIVATE]_SEPOLICY_DIR dirs Tri Vo
After https://android-review.googlesource.com/688488 BOARD_PLAT_PUBLIC[PRIVATE]_SEPOLICY_DIR can now specify multiple directories. Bug: n/a Test: build sepolicy Change-Id: I838c76736a3f1bd8759e24739cf82fea33a531b4
2018-05-09Pass platform version name as --version-name for framework-res.apk Colin Cross
framework-res.apk should get the platform version name ("9") as --version-name, not the SDK version ("28"). It will get copied to compileSdkVersionCodename in APKs compiled against it. Bug: 78324052 Test: aapt dump badging $OUT/system/framework/framework-res.apk | grep -i version Change-Id: I34a601cb2c14f66199066e7d598862108da0b950 Merged-In: I34a601cb2c14f66199066e7d598862108da0b950 (cherry picked from commit b691e24d899f3a773da88df0eecada5918a96a2c)
2018-05-09Pass platform version name as --version-name for framework-res.apk Colin Cross
am: b691e24d89 Change-Id: I3fad46dcbc4f61aa5dbb66b4cc4a8eac1cd70e94
2018-05-09Pass platform version name as --version-name for framework-res.apk Colin Cross
framework-res.apk should get the platform version name ("9") as --version-name, not the SDK version ("28"). It will get copied to compileSdkVersionCodename in APKs compiled against it. Bug: 78324052 Test: aapt dump badging $OUT/system/framework/framework-res.apk | grep -i version Change-Id: I34a601cb2c14f66199066e7d598862108da0b950
2018-05-08Merge "Expose selinux variables to Soong." am: c5934c55c7 Tri Vo
am: 368e0ab5a2 Change-Id: I2377ca5f20e8c7c7ffb6ef856f4081b03b66fe85
2018-04-30Expose selinux variables to Soong. Tri Vo
Bug: 33691272 Test: manual Change-Id: I4a568fb25a36331afb2ca51c3d8a676c3aba09e1
2018-04-18Merge "Fix aapt2 --min-sdk-version after finalized SDK" am: 59bcf6e631 Colin Cross
am: 9d0af2e737 Change-Id: I9d43e2d829aac6273be319968c9afb37b8331570
2018-04-18Fix aapt2 --min-sdk-version after finalized SDK Colin Cross
aapt2 --min-sdk-version was using AppsDefaultVersionName(), which is OMR1 for a non-finalized SDK, but 8.1.0 after finalization. Add PlatformSdkCodename() for non-finalized SDKs, use it for DefaultAppTargetSdk(), and pass it for aapt2 --min-sdk-version. Bug: 78224641 Test: TestAppSdkVersion in app_test.go Change-Id: I622eaf92f8a940f79007c2a579536da325700b06 Merged-In: I622eaf92f8a940f79007c2a579536da325700b06 (cherry picked from commit d09b0b653b615c322266fa2a41ecf0f0066bc93d)
2018-04-18Fix aapt2 --min-sdk-version after finalized SDK Colin Cross
aapt2 --min-sdk-version was using AppsDefaultVersionName(), which is OMR1 for a non-finalized SDK, but 8.1.0 after finalization. Add PlatformSdkCodename() for non-finalized SDKs, use it for DefaultAppTargetSdk(), and pass it for aapt2 --min-sdk-version. Bug: 78224641 Test: TestAppSdkVersion in app_test.go Change-Id: I622eaf92f8a940f79007c2a579536da325700b06
2018-04-17Add VendorConfig for board-level Soong plugin configuration Dan Willemsen
This allows Soong (Go) plugins to get custom configurations set in the current product's BoardConfig.mk. I'll have some more comprehensive documentation later, but the general concept is that you'd have one namespace per plugin, defined in the BoardConfig.mk (though they would work in the product.mk files too): SOONG_CONFIG_NAMESPACES += myPlugin Within that namespace you can set key-value pairs: SOONG_CONFIG_myPlugin := key1 key2 ... ... SOONG_CONFIG_myPlugin_key1 := value ... SOONG_CONFIG_myPlugin_key2 := true Then in your plugin, you can ask for your namespace: vars := ctx.Config().VendorConfig("myPlugin") And then use them: str := vars.String("key1") if vars.Bool("key2") { ... } if vars.IsSet("key3") { ... } Warning: It's not a good idea to fail on missing inputs, since an android tree may contain plugins from multiple owners, and we may configure your modules (but not build/install them) even if they're not meant for the currently configured product. Bug: 76168832 Test: define some variables, use them Test: m blueprint_tools Change-Id: I4c38f5a4344022c6f332de279d9bbef24502e741 Merged-In: I4c38f5a4344022c6f332de279d9bbef24502e741 (cherry picked from commit 0fe7866897b177f2bf7ec934c5615a2b48e48a23)
2018-04-17Make Config.ProductVariables private Dan Willemsen
All access to these should be going through the methods on Config / DeviceConfig. Bug: 76168832 Test: m blueprint_tools Change-Id: I47512dd58fb1a1a3f25838a9b1adaed2c41af8d3 Merged-In: I47512dd58fb1a1a3f25838a9b1adaed2c41af8d3 (cherry picked from commit 45133ac184b4e8b7071e7755ec3b98e217b54607)
2018-04-13Add USE_CLANG_LLD and use_clang_lld. am: 02b4da53a7 Chih-Hung Hsieh
am: 98fda157fb Change-Id: I3fc25e6332ae02dc4736e1f77b6de52822968d80
2018-04-12Add USE_CLANG_LLD and use_clang_lld. Chih-Hung Hsieh
* USE_CLANG_LLD is unedefined in current builds. * When USE_CLANG_LLD is defined to 'true' or '1', use clang's lld instead of ld or ld.gold. * When lld is enabled: * ld-only flags are not passed to 'lld'. * location_packer is disabled. * Use new lld's --pack-dyn-relocs=android. * When lld does not work: * In Android.mk files use LOCAL_USE_CLANG_LLD := false. * In Android.bp files use use_clang_lld: false. * Only arm, arm64, x86, and x86_64_devices have LLD flags; all other hosts and targets do not call lld yet. Bug: 73768157 Test: make checkbuild and boot Change-Id: I06b8a1e868a600997a7e70fe05c299d751d23d5f
2018-04-10Add VendorConfig for board-level Soong plugin configuration am: 0fe7866897 Dan Willemsen
am: 954230537d Change-Id: I606059a27cdec3172ce38ffef2eaa5eca399f60d
2018-04-10Make Config.ProductVariables private am: 45133ac184 Dan Willemsen
am: 1a837ac9fa Change-Id: I73f7889bce4a6fe506d34623a68e337b5e290cb9
2018-04-11Add VendorConfig for board-level Soong plugin configuration Dan Willemsen
This allows Soong (Go) plugins to get custom configurations set in the current product's BoardConfig.mk. I'll have some more comprehensive documentation later, but the general concept is that you'd have one namespace per plugin, defined in the BoardConfig.mk (though they would work in the product.mk files too): SOONG_CONFIG_NAMESPACES += myPlugin Within that namespace you can set key-value pairs: SOONG_CONFIG_myPlugin := key1 key2 ... ... SOONG_CONFIG_myPlugin_key1 := value ... SOONG_CONFIG_myPlugin_key2 := true Then in your plugin, you can ask for your namespace: vars := ctx.Config().VendorConfig("myPlugin") And then use them: str := vars.String("key1") if vars.Bool("key2") { ... } if vars.IsSet("key3") { ... } Warning: It's not a good idea to fail on missing inputs, since an android tree may contain plugins from multiple owners, and we may configure your modules (but not build/install them) even if they're not meant for the currently configured product. Bug: 76168832 Test: define some variables, use them Test: m blueprint_tools Change-Id: I4c38f5a4344022c6f332de279d9bbef24502e741
2018-04-11Make Config.ProductVariables private Dan Willemsen
All access to these should be going through the methods on Config / DeviceConfig. Bug: 76168832 Test: m blueprint_tools Change-Id: I47512dd58fb1a1a3f25838a9b1adaed2c41af8d3
2018-03-26Merge "Add product_variables.Use_lmkd_stats_log." into pi-dev Rajeev Kumar
am: f65a99cee1 Change-Id: I235eb051a60b01039f4ee2b3dcb41802fa81b797
2018-03-23Add product_variables.Use_lmkd_stats_log. Rajeev Kumar
Bug: 74443701 Test: Tested manually Merged-In: I512d1a4b5e796b459a7ecdd3649ffd147bcf4cbf Change-Id: I512d1a4b5e796b459a7ecdd3649ffd147bcf4cbf (cherry picked from commit 1e6056a380a4f4cafa853412460de834cfbfb58e)
2018-03-12Remove obsolete Brillo variable am: a052599bb6 Dan Willemsen
am: 567eda6a7d Change-Id: I69edc621c71a4a5dc80595392b8914e1cca07e52
2018-03-10Remove obsolete Brillo variable Dan Willemsen
Test: none Change-Id: I6a5ce57b317f0cdae1abef15def01e6a31e18d3e
2018-02-22Droiddoc Support in Soong am: 581fd21e91 am: 2ea76706b3 Nan Zhang
am: a400bb400c Change-Id: I5c317052e5b1cba68e04720db75cb07cdd7ca0f7
2018-02-22Droiddoc Support in Soong Nan Zhang
Support Droiddoc to Soong based on core/droiddoc.mk. The non-std doclet based droiddoc compilation output is a "real" stubs.jar instead of a directory of java files and a timestamp file. The std doclet based javadoc compilation output is a "empty" stubs.jar instead of a timestamp file. The stubs.jar will be exported to out/target/common/obj/JAVA_LIBRARIES/$(LOCAL_MODULE)_intermediates/classes.jar and out/target/common/docs/$(LOCAL_MODULE)-stubs.jar A $(LOCAL_MODULE).zip file will be generated also, and is exported to out/target/common/docs/$(LOCAL_MODULE)-docs.zip if property: installable is not set to false. Bug: b/70351683 Test: unittest + convert libcore docs Android.mk to Soong manually. Change-Id: I1cffddd138a5d9d445f86a3d4a3fd4de88a2bc0f (cherry picked from commit 78188ec622cb1ee24171455867fc58ffab91562e)