aboutsummaryrefslogtreecommitdiff
path: root/android
AgeCommit message (Collapse)Author
2019-05-07Implement DPI variants in android_app_import.Jaewoong Jung
Bug: 128610294 Test: app_test.go Change-Id: Ie3e558bfdb40de6b0b9df95d3b373d08a4084d7b
2019-05-03Add native_bridge target to Android.bpdimitry
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-05-01Support robolectric_testColin Cross
robolectric_test will compile a suite of tests that run in robolectric. For now it also generates a Run* rule, later that will be removed in favor of atest. Bug: 123248659 Test: m RunSettingsLibRoboTests Change-Id: I12407d0b0d639e31c1969077ba787e8985e6a506
2019-05-01Remove unnecessary core library neverallow rulesPaul Duffin
The rules that restricted access to core library targets are no longer required as they have been replaced with visibility rules. The visibility rules are safer because they check all dependencies whereas the neverallow rules that have been removed only checked dependencies in the libs property and so missed dependencies in static_libs and java_libs properties. (cherry picked from 8e8c01c3825a615940ee7f9e097130ebe43c26de) Bug: 112158820 Test: m core-tests Change-Id: I3b50b705b7cd6fcdc55d26cd71b9149b3abd2b88 Merged-In: Ibfef74db0769992266ebadf445836d2a183df3f7
2019-04-30Merge "Prebuilt APEXes are recoreded in apexkeys.txt"Treehugger Robot
2019-04-29Merge "Support opt-in ABI checks"Logan Chien
2019-04-29Prebuilt APEXes are recoreded in apexkeys.txtJiyong Park
apexkeys.txt now correctly lists prebuilt APEXes with keys specified as PRESIGNED. This change also fixes a bug that non-installable APEXes are listed in the file. Bug: 131130235 Test: m out/soong/apexkeys.txt and check that com.android.apex.cts.shim.apex is listed there with PRESIGNED keys. Merged-In: Ib6d391a82864714743a1cc59cd655bea917b5073 Change-Id: Ib6d391a82864714743a1cc59cd655bea917b5073 (cherry picked from commit a41f12a6fa05a030b426fe68dc0f5d6203a73c79)
2019-04-27Support opt-in ABI checksLogan Chien
This commit allows a module to opt in for ABI checks even when it is not an LLNDK/VNDK module. Bug: 131421213 Test: Add `header_abi_checker { enabled: true, }` to some module Change-Id: Ie09d262e651cbb44d7d0eba652f55dc1e1e52962
2019-04-26Add visibility supportPaul Duffin
Implementation uploaded for review. Includes unit tests but does not yet handle prebuilts, that will come in a future change once some more general issues with prebuilts and namespaces is resolved. See README.md#Visibility for details of what this does and how to use it. Bug: 112158820 Test: add visibility rules for core library modules, make core-tests Change-Id: I8ec980554398ad6f2d42043ce518f811a35da679
2019-04-25Merge "Build contexts files with Soong"Treehugger Robot
2019-04-23Merge "New AndroidMk authoring system based on entry map."Jaewoong Jung
2019-04-23Merge "Fix tests with cc_binary_host on mac"Treehugger Robot
2019-04-23Build contexts files with SoongInseob 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-22Fix tests with cc_binary_host on macColin Cross
cc_binary_host on mac uses ctx.Config().HostSystemTool(), which needs PATH in the test environment. Copy it from the original environment. Fixes: 129763458 Test: proto_test.go Change-Id: I41c1acdceee7c35036148256adafb471871034df
2019-04-22New AndroidMk authoring system based on entry map.Jaewoong Jung
The new system collects all Android.mk variable assignments using a map and writes them to io.Writer. Compared to the previous system, which directly writes all entries to buffers, this new system is more robust and test-friendly. Test: Built without prebuilt_etc.go change and diffed the mk output. Test: prebuilt_etc_test.go Change-Id: Idd28443d129ff70053295015e69328a8fa3eca47
2019-04-22Merge "Allow codename.fingerprint format for targetSdkVersion"Colin Cross
2019-04-19Ensure that PathsForModuleSrc works with prebuiltsJiyong Park
prebuilt_test is amended to ensure f2976304f70fe61b705300f309687317c90a84fb is not broken. PathsForModuleSrc is called to check if the file is from correct module (either from source or prebuilt module) Bug: 130627486 Test: m Change-Id: Ic5f467fbc2837727df92102530687e967cd5529f
2019-04-19Fix: PathsForModuleSrc does not work for a replaced dependencyJiyong Park
PathsForModuleSrc does not work if a source module is replaced with a prebuilt module. This is because the function uses GetDirectDepWithTag with the name of the original source module. Since the dependency is replaced and the prebuilt module has the name "prebuilt_<name>", the search always fails. Fixing this by re-implementing GetDirectDep* functions inside Soong using VisitDirectDep. Bug: 130627486 Test: m Change-Id: I68d52668283c429d5e93c7f2c81f6a8db1f24893
2019-04-18Allow codename.fingerprint format for targetSdkVersionColin Cross
Use codename.fingerprint format for targetSdkVersion if it is unset in the manifest and UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT=true. Test: manual Bug: 130541924 Change-Id: I4e3b1274cc32038b00b292dc6d67559eb320e9e4
2019-04-18TARGET_FS_CONFIG_GEN is a list, not a single pathDan 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-17Merge "Use LoadHook to create modules in java_sdk_library"Treehugger Robot
2019-04-16Merge "Allow guava to use java_host_for_device"Colin Cross
2019-04-16Use LoadHook to create modules in java_sdk_libraryColin Cross
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-15Allow guava to use java_host_for_deviceColin Cross
Guava can't compile against a device bootclasspath, it uses methods that only exist in the host bootclasspath, and then avoids calling them at runtime. Bug: 130306229 Test: m checkbuild Change-Id: I012030cb701c01ea9ff554c1b6156d0242365a4c Merged-In: I012030cb701c01ea9ff554c1b6156d0242365a4c Exempt-From-Owner-Approval: cherry pick (cherry picked from commit b5191a573d4971d0095a353d48810fae1b04fd49)
2019-04-15Convert yacc to a single RuleBuilder ruleDan Willemsen
So that <module>/gen/yacc/... is (re)created by a single rule, previous files are removed, and location.hh is in the build graph when it is produced. Test: treehugger Change-Id: I2f6e47ea07f315e10ae1cb8ad50697e7123d0285
2019-04-15Support RuleBuilder.Sbox to wrap commands in sboxDan Willemsen
This essentially allows you to declare that everything in a directory will be created by the rule, and we'll ensure that your command actually writes out all of the claimed outputs, and remove any other files that previously existed in that directory. Test: built-in tests Change-Id: I990dce2b3a0d89ebd2736ac1a0cadfb5864c6e73
2019-04-10Expose TargetFSConfigGen to DeviceConfig from MakeDan Willemsen
Bug: 118089258 Test: m oemaids_header_gen oemaids_headers Change-Id: I2675822ae01af9bbec70f0c0413c047f36b5e024
2019-04-09Stop using build/target -> build/make/target symlinkDan Willemsen
Instead, fully specify build/make/target/... everywhere Test: treehugger Change-Id: I07ba0e9b0604919a271afd5133070616e1f404fc
2019-04-09Update default soong configDan 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-07Fix missing genrule srcs and tools with ALLOW_MISSING_DEPENDENCIES=trueColin Cross
Set the location label for missing srcs and tools to avoid nonsensical errors when parsing the command. Test: genrule_test.go Test: paths_test.go Test: unbundled branch with missing framework-res module needed by robolectric genrule Change-Id: I9c1f1cd82a80f048c0e903b8e93910b1ae34b0b1
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 variablesColin 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-04Fix package path of android/soong/android pctxColin Cross
android/soong/common was renamed to android/soong/android long ago, but the pctx package path was still "android/soong/common". This required all users of rules defined in android/soong/android to import "android/soong/android" and then pctx.Import("android/soong/common"). Test: m checkbuild Change-Id: I20d096522760538f7cfc2bec3d4bfeba99b275d4
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-04-02Fix sdk_version: "system_current" when Platform_sdk_final=trueColin Cross
When PLATFORM_VERSION_CODENAME is set to REL Platform_sdk_final becomes true, which causes the return value of sdkVersionToNumber for "system_current" to a real version number instead of FutureApiLevel. This enables the check against PlatformSystemSdkVersions, which doesn't contain "current". Use the numeric value instead. Fixes: 129786845 Test: sdk_test.go Change-Id: If7cf211cc01c5fbf3e3ece3c3f604718a13d5a9b
2019-04-02Add support for protoc pluginsColin Cross
Add a proto.plugin property to allow specifying a custom protoc plugin to generate the code. Fixes: 70706119 Test: m am StreamingProtoTest Change-Id: I1ecdd346284b42bbcc8297019d98d2cd564eb94c
2019-04-02Move proto compilation to RuleBuilderColin Cross
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
2019-03-29Add depfile support to RuleBuilderColin Cross
Allow rules built with RuleBuilder to use depfiles. Ninja only supports a single depfile with single output. If there are multiple outputs in a rule, move all but the first to implicit outputs. If multiple depfiles are specified, use new support in dep_fixer to combine additional depfiles into the first depfile. Test: rule_builder_test.go Change-Id: I7dd4ba7fdf9feaf89b3dd2b7abb0e79006e06018
2019-03-29Add RuleBuilderCommand.FlagsColin Cross
Test: rule_builder_test.go Change-Id: I7887a67aaef33bc591d83fade9175da3e401529f
2019-03-29Merge "Add prebuilt_apex."Treehugger Robot
2019-03-28Add prebuilt_apex.Jaewoong Jung
Bug: 127789981 Test: apex_test.go + com.android.tzdata.apex Change-Id: I09bb0a4b2acf310c55c789569da3c9d755638232
2019-03-27Fix an override_module bug.Jaewoong Jung
proptools.PrependProperties doesn't replace a pointer when both the src and the dst have one. This prevented override_module from overriding simple value pointer properties when the base module has existing values. It turns out this was why the name property needed to be overwritten manually. Bug: 122957760 Test: app_test.go Change-Id: I3302287c31a560422548c22fade95261ddbe606a
2019-03-26Soong: Add synopsis to soong_namespace module.Patrice Arruda
Synopsis was missing to soong_namespace module. Also added documentation to imports properties. This required the namespaceProperties struct to be pulled out of the NamespaceModule struct in order for the documentation tool to extract the property documentation. Bug: b/128337482 Test: Ran the doc generation command and verified that the synopsis was added to soong_namespace and imports properties is listed too. Change-Id: I519b14629bdbc85f35fbc8fa03e78dc2ad3f655e
2019-03-22Merge "Add override_android_app module type."Jaewoong Jung
2019-03-21Add override_android_app module type.Jaewoong Jung
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
2019-03-21Tell make that sh_test is a NATIVE_TESTDan Willemsen
So that it ends up in VTS's DATA/nativetest like a cc_test, and otherwise acts like a test. Test: convert external/linux-kselftest to sh_test Change-Id: I44b7cfca45f8fe5d7fbb6eaa845a79bd70f155ef
2019-03-21Separate device and product overlaysAnton 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-21Merge "Notice support for APEX"Treehugger Robot
2019-03-21Add support for no-vendor-variant VNDKVic 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-21Notice support for APEXJiyong Park
Notice file for an APEX is created by merging notice files for the modules included in it (plus the notice file for the APEX itself if specified). Notice files having the same content are not duplicated; it is emitted only once. Bug: 128701495 Test: m (apex_test is amended) Test: m and inspect $(PRODUCT_OUT)/obj/NOTICE.txt to check there are license entries for /system/apex/*.apex files Change-Id: I169d91038291a6c71615de97cf5b03174afab5d4