summaryrefslogtreecommitdiff
path: root/android/variable.go
AgeCommit message (Collapse)Author
2020-01-28Add whole_static_libs to non-svelte configs. Christopher Ferris
This is to support enabling scudo only for non-svelte configs. Also, add exclude_static_libs to allow removing the jemalloc libs. Bug: 137795072 Test: Verified that a svelte and non-svelte config can use this method Test: to properly choose between scudo and jemalloc. Change-Id: Iec6bfe159f8491138e93dde1d225a8c874c7ce31
2020-01-28Add support for experimentally enabling RBE support on specific rules. Ramy Medhat
This CL adds RBE support to javac, r8, and d8 rules which is only enabled if respective environment variables are set. Test: an aosp_crosshatch build with and without the new variables. Change-Id: Ic82f3627944f6a5ee7b9f3228170c2709b1bfcb8
2020-01-27Add native_coverage to product variables Colin Cross
Allow native_coverage to adjust sources in product_variables. Fixes: 148088129 Test: m checkbuild Change-Id: I9c9d491cda92d69726a0d598408de2060241365b
2020-01-24Merge changes from topics "board_use_recovery_as_root_soong", "ramdisk" Yifan Hong
* changes: libatomic / libgcc_stripped: ramdisk_available Add target.ramdisk Ramdisk modules install to correct location Add ramdisk image.
2020-01-22Ramdisk modules install to correct location Yifan Hong
Install to recovery/root/first_stage_ramdisk if BOARD_USES_RECOVERY_AS_BOOT, otherwise ramdisk. In addition, append /system if not InstallInRoot(). Test: pass Bug: 147347110 Change-Id: Ie5895ac61a3d5d85f5d958a27c7980d6c79d997e
2020-01-22Merge "Add coverage flags for Clang coverage builds." Oliver Nguyen
2019-12-21Merge "Create product variant for product partition" Treehugger Robot
2019-12-20Add script for building all target arch's needed in AML (Android Mainline) Martin Stjernholm
prebuilts. This runs Soong in skip-make mode, using normal in-make mode only to query platform versions. The same ${OUT_DIR} cannot be used for both skip-make and in-make builds, because Soong generates a smaller build.ninja file in in-make builds where many build targets are expected to be provided by the mk files. Thus this script avoids using ${OUT_DIR} if it's an in-make build, defaulting instead to out-aml/. The script is based on build-ndk-prebuilts.sh, but uses a separate Soong variable Aml_abis to enable the appropriate target architectures for Mainline modules. Aml_abis is very similar to Ndk_abis, except "armeabi-v7a" is used instead of "armeabi", which is necessary to match prebuilt dependencies, e.g. for LLVM. Test: build/soong/scripts/build-aml-prebuilts.sh libart libdexfile_external (verify that libraries for arm, arm64, x86, x86_64 are built) Test: build/soong/scripts/build-aml-prebuilts.sh \ out-aml/soong/.intermediates/external/conscrypt/conscrypt-module-sdk/android_common/conscrypt-module-sdk-current.zip (verify that the zip file contains libconscrypt_jni.so's for all four arches) Test: build/soong/scripts/build-aml-prebuilts.sh com.android.art.{release,debug,testing,host} (verify that the build completes) Test: Two identical build/soong/scripts/build-aml-prebuilts.sh runs after each other (verify that the 2nd run completes both Soong and ninja steps quickly without any building) Change-Id: I35712f9f8f0b1cbb77107314c5927c6720e6c3bf
2019-12-20Create product variant for product partition Justin Yun
When PRODUCT_PRODUCT_VNDK_VERSION is set to 'current', product modules are enforced to use only VNDK libs from the system partition as BOARD_VNDK_VERSION does to vendor partition. Modules with 'vendor_available: true' create product variant as well as core and vendor variants. The product variant as an image variant is used for the modules in /product or /system/product. It must not affect the current build behavior without PRODUCT_PRODUCT_VNDK_VERSION set. Bug: 134099726 Bug: 138966004 Bug: 144534640 Test: build without PRODUCT_PRODUCT_VNDK_VERSION set Change-Id: I4d3585c110d84493e45bf76d550dc240bb26137f
2019-12-09Add coverage flags for Clang coverage builds. Oliver Nguyen
Bug: 143977934 Test: m CLANG_COVERAGE=true Test: m NATIVE_COVERAGE=true Change-Id: I5d07d336e241856961eb0bc9678fdc9d5a076802
2019-12-06Install flattened/unflattend apexes for GSI Jooyung Han
GSI targets are supposed to have both 'flattened' and 'unflattened' APEXes. By adding 'flattened' APEX as REQUIRED moduled for 'unflattened' APEX, both will be installed togetther. This is done by a new variable PRODUCT_INSTALL_EXTRA_FLATTENED_APEXES, which is set only for GSI targets. Bug: 137802149 Test: lunch aosp_arm64-userdebug && m resulting apex images under /system/apex and flattened apexes under /system/system_ext/apex Change-Id: I336e2674e427b358542e0045b2a49dfa3d84095b
2019-11-06Enforce hidden apis usage in product(soong) Jeongik Cha
Only if PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE is set, every app and java library in product cannot use hidden APIs anymore. checkSdkVersion() checks if sdk_version of app and library is narrow enough, checkLinkType() checks every library that app links agianst Bug: 132780927 Test: m Test: set PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE, and check whether build error occurs. Change-Id: Ic630503b875040f730feda4fef826ed6d71da111
2019-11-01Add support for $(TARGET_EXPERIMENTAL_MTE) in product configs. Peter Collingbourne
We are bringing up support for ARM Memory Tagging Extension in the platform, but the required patches have not yet landed in the upstream kernel. This change adds support for a product variable that products may set to true to declare support for an experimental userspace interface to MTE. Setting the variable to true causes a product configuration to be enabled which will activate code in bionic and scudo that uses the interface. This variable should not be set to true in shipping products because the userspace interface has not been finalized and is subject to change. Once the support patches have landed in the kernel, bionic and scudo will be changed to use the official interface and the variable will be removed. Bug: 135772972 Change-Id: I8ba5dea4de374eb6775edb6d4e3c0cf9cad8d760
2019-09-26Filter product variable property structs Colin Cross
For each module, take the default product variable properties and create a new type that contains only the properties that exist in the current module. This will provide better errors when attemping to set product variable properties that will never get used for a module, and fixes errors when a module attempts to use a product variable that also contains properties that don't apply to the current module. Fixes: 79249983 Test: TestProductVariables Test: m checkbuild Change-Id: I4dc24f7781b8ce798651cfc8bf3563005a92c13d
2019-08-27Allow modules to be enabled/disabled depending on whether APEXes are flattened. Roland Levillain
Allow the `enabled` Soong/Blueprint property (e.g. in `genrule` and `cc_prebuilt_binary` module definitions) to have a different value when APEX flattening is enabled. Test: m checkbuild Bug: 139277987 Change-Id: Ic586bdfac7690077445da12543154381d92cf98e Merged-In: Ic586bdfac7690077445da12543154381d92cf98e
2019-08-13Rename Soong variable `FlattenApex` as `Flatten_apex`. Roland Levillain
This is so that it can be used as a Soong/Blueprint property. Test: m Bug: 139277987 Change-Id: I8840811fde92a71e97ed100aacfc7fbb003580d0
2019-08-08Include headers and props to VNDK snapshot Inseob Kim
For all vndk snapshot libraries, header files exported by the libraries will be included to the snapshot. Android.bp will contain necessary information to link against/install vndk snapshot libraires: export_include_dirs, export_system_include_dirs, export_flags, and relative_install_path. Bug: 132818174 Test: 1) m nothing && mv out/soong/build.ninja /tmp && m nothing && diff -u -u out/soong/build.ninja /tmp/build.ninja Test: 2) VNDK_SNAPSHOT_BUILD_ARTIFACTS=true \ development/vndk/snapshot/build.sh Test: 3) development/vndk/snasphot/update.py Test: 4) see contents of Android.bp and include directories Change-Id: I791ab181545eb483242b04446afd40958bbb2b17
2019-08-01Reland "Remove product_is_iot." Elliott Hughes
This reverts commit 5089c11b1ebb42e1e87c251dfa5e8353cd236227. Change-Id: Iaedc22e63560a01ab01859982dc627569a421025 Test: treehugger
2019-08-01Revert "Remove product_is_iot." Nelson Li
This reverts commit 14fa562fbbd89fabc5806734cdaadcdd2e4a577a. Reason for revert: Broken build on 5772180 error: frameworks/av/media/utils/Android.bp:49:23: unrecognized property "product_variables.product_is_iot" Bug: 138764596 Change-Id: I37944dfb974e4180a683361f514b404f92b943e5
2019-07-30Remove product_is_iot. Elliott Hughes
Test: treehugger Change-Id: I0935f463138e1d2a364cd2a5bc8b6e977da1ec47
2019-07-17Add USE_RBE support to soong. Ramy Medhat
Test: Built aosp_arm-user with and without USE_RBE. USE_RBE uses a proxy script in place of rewrapper. Change-Id: I5bf008a940513872d70b5b215bd6209f759826ae
2019-07-15Make relative path for native_bridge binaries configurable dimitry
This change introduces NativeBridgeRelativePath and NativeBridgeSecondaryRelativePath product variables to make relative path to native_bridge binaries configurable. It also removes moves information about native bridge host architecture to Target and sets it during decodeTargetProductVariables Test: make PRODUCT-cf_x86_phone-userdebug dist Change-Id: Ie736e81eae507e1775566ce9f29135011b12af27
2019-07-09Rename product_services to system_ext Justin Yun
Bug: 134359158 Test: build and check if system_ext.img is created Change-Id: Ice3229baf97a94c24a6eea22e7d4571941d7f843
2019-06-06Rename ModuleBase receivers Colin Cross
I3b23590b8ce7c8a1ea1139411d84a53163288da7 renamed AndroidModuleBase to ModuleBase, but left the receivers called 'a'. Rename them to 'm' to match the type. Test: m checkbuild Change-Id: I0ebb738152febfd9a2a56ac0b197f19f9e01a1e7
2019-05-29Port uses-shared library verification and dexpreopting to Soong Colin Cross
Ports 09f3b97f4b488cd3a7b7d72038b173575b02c162 (Add support for preopt with uses-libraries) from Make to Soong to support verifying and preopting shared libraries. This reapplies Id25f55f07a55120bebe2a9b32c094209efc85c8b with fixes for unbundled builds and builds with ALLOW_MISSING_DEPENDENCIES=true set. Bug: 132357300 Test: app_test.go Test: m checkbuild Change-Id: I964309a68ec4ed081f3f3154879c71048ecb5455
2019-05-29Revert "Port uses-shared library verification and dexpreopting to Soong" Colin Cross
This reverts commit b66d7b1c20f7e54a5920780ba6643e971d216d31. Reason for revert: broke unbundled builds Change-Id: I96ae287885107079de4a26e6b100ad8ed66961c0
2019-05-28Port uses-shared library verification and dexpreopting to Soong Colin Cross
Ports 09f3b97f4b488cd3a7b7d72038b173575b02c162 (Add support for preopt with uses-libraries) from Make to Soong to support verifying and preopting shared libraries. Bug: 132357300 Test: app_test.go Test: m checkbuild Change-Id: Id25f55f07a55120bebe2a9b32c094209efc85c8b
2019-05-15Generate VNDK snapshot with Soong except configs Inseob Kim
This is the first commit to generate VNDK snapshot with Soong: .so files, some txt files, and notice files are captured with Soong. As ld.config.txt is currently in Android.mk and will be deprecated soon, configs files (and zipping all of artifacts) are still handled with Makefile. Bug: 131564934 Test: 1) DIST_DIR=out/dist development/vndk/snapshot/build.sh Test: 2) try installing vndk snapshot with: development/vndk/snapshot/update.py Change-Id: I8629e1e25bfc461fd495565bb4872c9af176cf92
2019-05-03Add native_bridge target to Android.bp dimitry
This allows us to build guest libraries for the native bridge for arm/arm64 architectures. Bug: http://b/77159578 Test: make Change-Id: I35520ca456105ddadd456c78a4eb1e6de39147c5
2019-04-23Build contexts files with Soong Inseob Kim
This is to migrate sepolicy Makefiles into Soong. For the first part, file_contexts, hwservice_contexts, property_contexts, and service_contexts are migrated. Build-time tests for contexts files are still in Makefile; they will also be done with Soong after porting the module sepolicy. The motivation of migrating is based on generating property_contexts dynamically: if we were to amend contexts files at build time in the future, it would be nicer to manage them in Soong. To do that, building contexts files with Soong can be very helpful. Bug: 127949646 Bug: 129377144 Test: 1) Build blueline-userdebug, flash, and boot. Test: 2) Build blueline-userdebug with TARGET_FLATTEN_APEX=true, flash, and boot. Test: 3) Build aosp_arm-userdebug. Change-Id: I49206e656564206d6f7265206361666665696e65
2019-04-18TARGET_FS_CONFIG_GEN is a list, not a single path Dan Willemsen
Bug: 130787336 Test: m oemaids_header_gen oemaids_headers passwd group Test: Set TARGET_FS_CONFIG_GEN to a list of paths Change-Id: Ic1f7d38239f3f805ca0723c24005d3e18a811870
2019-04-10Expose TargetFSConfigGen to DeviceConfig from Make Dan Willemsen
Bug: 118089258 Test: m oemaids_header_gen oemaids_headers Change-Id: I2675822ae01af9bbec70f0c0413c047f36b5e024
2019-04-09Update default soong config Dan Willemsen
BuildNumberFromFile is required to be non-empty for version injection to work. The various platform version values are needed for various Java builds. Test: treehugger Change-Id: Ifa5844794ea9e9baf0ec725dec107975cd759354
2019-04-04Implement `host_required` and `target_required` properties. Sasha Smundak
They are counterparts of LOCAL_HOST_REQUIRED_MODULES and LOCAL_TARGET_REQUIRED_MODULES respectively. Fixes: 128693436 Test: treehugger, convert cts/hostsidetests/devicepolicy/Android.bp Change-Id: Id66ffca6edffe18993ac51e8930f1d0e78178249
2019-04-04Export more config variables Colin Cross
Export some more config variables that will be used to generate robolectric's build.prop file. Bug: 122331577 Test: m checkbuild Change-Id: I39f3436ed5d5c4e730dd3e1f86c840cf6358ec87
2019-04-03Make libc_scudo always go first. Christopher Ferris
In addition, add Shared_libs to malloc_not_svelte. Bug: 123689570 Test: Verified that libc_scudo is first wherever it is added. Change-Id: Ibdc5dbd019a382630a727c270f846aa4446f8d99 Merged-In: Ibdc5dbd019a382630a727c270f846aa4446f8d99
2019-03-21Separate device and product overlays Anton Hansson
This change adds book-keeping of whether an overlay came from DEVICE_PACKAGE_OVERLAYS or PRODUCT_PACKAGE_OVERLAYS. This is later used when writing the output to soong_app_prebuilt.mk, to use either LOCAL_SOONG_[DEVICE|PRODUCT]_RRO_PACKAGES depending on the original source. This change is intended to be a noop on its own, but allows a follow-up make change to customize the location of the auto-generated RRO packages. Bug: 127758779 Test: verify noop on presubmit targets Change-Id: Ib24fe1d05be132c360dd6966f7c83968c9939f77
2019-03-21Add support for no-vendor-variant VNDK Vic Yang
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
2019-03-01Add required: to debuggable Mark Salyzyn
Permit product_varables: { debuggable: { required: ["remount"], }, }, so that we can add debug dependencies between build objects. Test: compile Bug: 122602260 Change-Id: Ibb4c5bf368f90fdb007d30b6c1da63cb9d4c6467
2019-02-20Pass DEXPREOPT_BOOT_JARS_MODULES to Make Colin Cross
Make is not setting PreoptBootJars, pass the value computed in Soong back to Make. Test: m checkbuild Change-Id: Ie3db926df9c5d6bf18db1003b95823c7566800a9
2019-02-20Make RuleBuilder methods take Paths Colin Cross
There are no more Make paths being used in Soong now that dexpreopting and hiddenapi are in Soong. Use the Path types in the inputs to RuleBuilder, and fix all users of RuleBuilder. This reapplies I886f803d9a3419a43b2cae412537645f94c5dfbf with fixes to disable preopt for Soong-only builds when the global dexpreopt.config doesn't exist. Test: all soong tests Test: m checkbuild Change-Id: I4dae9ecd5de22f062f9478ec8f0747f099cf8190
2019-02-06Move hiddenapi singleton rules to Soong Colin Cross
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
2019-02-04Add option to disable Scudo globally [Soong] Kostya Kortchinsky
This adds an option in Soong to turn off Scudo globally. Bug: 123228023 Test: enable Scudo for tombstoned, lunch marlin_svelte-eng && m -j, and make sure that Scudo is not linked in out/target/product/marlin/system/bin/tombstoned Test: enable Scudo for tombstoned, lunch marlin-userdebug && m -j, and make sure that Scudo is linked in out/target/product/marlin/system/bin/tombstoned Change-Id: I0b0992446953fc4074bde94507b66f92764c8143 Merged-In: I0b0992446953fc4074bde94507b66f92764c8143
2019-02-01Replace *[]string with []string in product variables Colin Cross
There is no need for *[]string, []string can already hold a nil value to specify "not set". Test: all soong tests Change-Id: I85a51b042c12aee1565a9287d62924feeeafd486
2019-01-25Add a prod var to override package names. Jaewoong Jung
Currently only java/app.go is affected by package name overrides. When the var is used, the corresponding module's install APK name is changed to the overriding name. Bug: 122957760 Test: app_test.go + TreeHugger Change-Id: Ie522da3d7280970d740d779cf2694560feae6180
2019-01-24Enable certificate overrides with product vars. Jaewoong Jung
Currently it is only for android_app, though it can be easily ported to apex. The make-side change will be made later, along with a real application. Bug: 122957760 Test: app_test.go Change-Id: I41f0be84f8b9f93e9518a16160e10eaa649388cd
2019-01-23Add prebuilt ABI checker support to soong Logan Chien
This commit adds prebuilt ABI checker support to soong so that `cc_prebuilt_library_shared` and `cc_prebuilt_binary` are checked. To opt out the check, add `check_elf_files: false` to your module. Bug: 119086738 Test: lunch aosp_sailfish-userdebug && CHECK_ELF_FILES=true make check-elf-files Change-Id: Idb4290c8f48aad545894a7ae718a537cbf832233
2019-01-21Replace hiddenapi-{public,private}-list.txt with a CSV file David Brazdil
`hiddenapi` is being refactored to work with a single CSV file as opposued to a multitude of text files (one per flag). This patch changes the singleton rule for listing public/private APIs from stubs to expect a CSV as an output. Bug: 119068555 Test: compiles, hiddenapi-flags.csv unchanged Change-Id: I622521d59979a6b01ecc8065a278412fedf7b9bc
2019-01-17Move hiddenapi to Soong Colin Cross
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
2019-01-17Initial Fuchsia support. Doug Horn
This change adds Fuchsia as a valid OS. Future changes will add proper toolchain support. Bug: 119831161 Test: Compile walleye. Confirm that adding `fuchsia` to the os-specific declaration of an arbitrary target does not throw a build error. Change-Id: I64eb928afb7512f3fbe32abb313b4c3efe16b169