- Mar 24, 2020
-
-
Dan Willemsen authored
Using a lot of boolean variables can become very verbose without adding really any new information: variables: ["a", "b", "c"], } soong_config_bool_variable { name: "a", } soong_config_bool_variable { name: "b", } soong_config_bool_variable { name: "c", } Now turns into: bool_variables: ["a", "b", "c"], } Test: built-in tests Change-Id: If5455a38433431c7ecbce1e5b32cfbb47f42602a
-
- Mar 23, 2020
-
-
Ulya Trafimovich authored
The null pointer dereference was caused by trying to get device name from a config passed to dexpreopt. For Make modules, the config is a stub that doesn't have a device name. The fix is to use build directory instead of device name (it is provided both by the full config passed to Soong modules and by the stub config passed to Make modules). Test: walleye-userdebug boots. Test: aosp_bertha_arm-userdebug builds and generates arc-services.odex. Bug: 152193534 Change-Id: I7adc173646cae6eaee188c6672629a5a942aea06 Merged-In: I7adc173646cae6eaee188c6672629a5a942aea06 (cherry picked from commit 9790f105)
-
Ulyana Trafimovich authored
-
Ulya Trafimovich authored
This reworks CL https://r.android.com/1180134 as follows: 1) Do not reorder the list of system server jars passed from Make to Soong via the product variable PRODUCT_SYSTEM_SERVER_JARS. This means that for some products the order of jars on the system server classpath may be non-optimal: a jar X that depends on Y may be dexpreopted before Y, so that all references to the classes and methods from Y wil be unresolved. Unfortunately for such products, fixing the order is not a simple matter of rearranging their PRODUCT_SYSTEM_SERVER_JARS, because the conflicts may arise when the product-specific variable gets merged with the common variable. 2) As a consequence of 1), do not add artificial dependencies between system server jars: this is now impossible, as it would create circular dependencies for those products that have non-optimal order of jars. 3) Copy dex files for system server jars to a predefined build location. This is necessary because at the time when Soong generates class loader context for k-th jar, it needs to know the paths to jars 1 .. (k-1), and it might have not processed those jars yet (so Soong can't query the paths from the modules). This approach is similar to the way Soong handles bootclasspath jars. 4) Do not exclude from dexpreopting system server jars that are not Soong modules (those that are Make modules). The previous CL excluded them because Make modules do not have ModuleContext. But it turns out that ModuleContext is not necessary, as all the information is passed via the dexpreopt config. Test: aosp_walleye-userdebug boots and there are no messages in the logcat regarding class loader context mismatch: $ adb logcat | grep 'mismatch' # empty Test: Class loader contexts in the oat files for system server jars match expectations: $ oatdump --oat-file=out/target/product/walleye/system/framework/oat/arm64/com.android.location.provider.odex 2>/dev/null | grep '^classpath' classpath = PCL[] $ oatdump --oat-file=out/target/product/walleye/system/framework/oat/arm64/services.odex 2>/dev/null | grep '^classpath' classpath = PCL[/system/framework/com.android.location.provider.jar*1989208671] $ oatdump --oat-file=out/target/product/walleye/system/framework/oat/arm64/ethernet-service.odex 2>/dev/null | grep '^classpath' classpath = PCL[/system/framework/com.android.location.provider.jar*1989208671:/system/framework/services.jar*4040443083:/system/framework/services.jar!classes2.dex*2210087472] Test: The phone boots and logcat has no scary messages related to class loader contexts: $ lunch aosp_walleye-userdebug && m $ adb reboot bootloader && fastboot flashall -w && adb wait-for-device $ adb root $ adb shell stop $ adb logcat -c $ adb shell setprop dalvik.vm.extra-opts -verbose:oat $ adb shell start $ adb logcat | egrep -io 'system_server: .*load.*/system/framework.*' system_server: Loading /system/framework/oat/arm64/com.android.location.provider.odex with executable: 0 system_server: Successfully loaded /system/framework/oat/arm64/com.android.location.provider.odex with executable: 0 system_server: Loading /system/framework/oat/arm64/services.odex with executable: 0 system_server: Successfully loaded /system/framework/oat/arm64/services.odex with executable: 0 system_server: Loading /system/framework/oat/arm64/ethernet-service.odex with executable: 0 system_server: Successfully loaded /system/framework/oat/arm64/ethernet-service.odex with executable: 0 system_server: Loading /system/framework/oat/arm64/wifi-service.odex with executable: 0 system_server: Successfully loaded /system/framework/oat/arm64/wifi-service.odex with executable: 0 system_server: Loading /system/framework/oat/arm64/com.android.location.provider.odex with executable: 1 system_server: Successfully loaded /system/framework/oat/arm64/com.android.location.provider.odex with executable: 1 system_server: Loading /system/framework/oat/arm64/services.odex with executable: 1 system_server: Successfully loaded /system/framework/oat/arm64/services.odex with executable: 1 system_server: Loading /system/framework/oat/arm64/ethernet-service.odex with executable: 1 system_server: Successfully loaded /system/framework/oat/arm64/ethernet-service.odex with executable: 1 system_server: Loading /system/framework/oat/arm64/wifi-service.odex with executable: 1 system_server: Successfully loaded /system/framework/oat/arm64/wifi-service.odex with executable: 1 system_server: Loading /system/framework/oat/arm64/com.android.location.provider.odex with executable: 1 system_server: Successfully loaded /system/framework/oat/arm64/com.android.location.provider.odex with executable: 1 Bug: 141785760 Bug: 140451054 Bug: 148944771 Bug: 147017252 Change-Id: I33c4087f8bfacd0ecb89877aa150b75360d06710 Merged-In: I33c4087f8bfacd0ecb89877aa150b75360d06710 (cherry picked from commit a4a83b0e) Exempt-From-Owner-Approval: cherry-pick.
-
Paul Duffin authored
Previously, the common value extraction code used an empty structure to get the value to use to clear a field whose value is common. This change removed the structure and used reflect.Zero(..) to get the value instead. Bug: 142935992 Test: m nothing Change-Id: Ibd5103dacb86e7754a786356c0d15ffbde7f98bf
-
Paul Duffin authored
Previously, when an sdk snapshot only supported a single os type the compile_multilib was set based on the multilib usages by the members of that variant. After the change to support multiple os types per snapshot the multilib setting was based on the multilib usages across all the members of all sdk variants. That meant that if one os type used only "64" and the other used "both" then they would both be treated as "both" leading to missing variants when the snapshot was unpacked. This change tracks the multilib usages per os type and adds a property for each one. It intentionally changes a couple of tests: 1) Either by adding compile_multilib that is missing. 2) By targeting it at a specific os type instead of host. The latter change is important to prevent the snapshot from being used on a host platform (which will match the host target section) but which is a different os type to the ones supported by the snapshot. Bug: 142935992 Test: m nothing Change-Id: I883919b644292c3d019db223bb4fd5c11b39591f
-
Paul Duffin authored
Migrates system modules and droid stubs over to use the new API for creating the snapshot modules and removes the old API. Test: m nothing Change-Id: Ia825767f1f7ee77f68cfe00f53e09e6f6bfa027f
-
Paul Duffin authored
Previously, java snapshot properties (java_library and java_test) relied on the properties not being optimized when there was a single os type and instead being added directly to the common os type properties. However, that means that the behavior is inconsistent for other member types depending on whether there was one os type or not. This change updates the java sdk member handling to support optimization. This involved: 1) Adding AidlIncludeDirs field to librarySdkMemberProperties to specify the aidl include dirs instead of extracting that from the library field. 2) Renaming jarToExport to JarToExport (in both library/testSdkMemberProperties)to allow it to be optimized. 3) Adding MemberType() and Name() methods to SdkMemberPropertiesContext to avoid having to store the former in the properties struct and retrieve the latter from the library/test fields. 4) Removing the now unused library/test fields from the properties structures. 5) Separating the processing of the jar/test config in AddToPropertySet(...) as they may be optimized separately. 6) Ditto for the jar/aidl include dirs. 7) While doing this work I noticed that although the contents of the aidl include dirs are copied into the snapshot the java_import does not make use of them. Raised bug 151933053 and added TODO to track that work. Bug: 142935992 Test: m nothing Change-Id: Iba9799e111ca5672b2133568163d8c49837ba9cd
-
Paul Duffin authored
Previously passing additional information to the implementations of AddPrebuiltModule() or the SdkMemberProperties interface would have required making changes to the API. This change added an SdkMemberContext object into which additional information can easily be added without requiring changes to existing implementations. The BuildSnapshot() method was not modified because it is deprecated and will be removed in a follow up change. It also switches the API from passing variants as android.SdkAware to android.Module. That is for a couple of reasons: 1) SdkAware is designed for managing the relationship between the module and the SDK, not for generating the output snapshot. As such there is nothing in SdkAware that is needed for generating the output snapshot. 2) Accepting android.Module instead makes it easier to use the underlying code for generating the snapshot module as well as the individual member modules. This is in preparation for a number of improvements and bug fixes in both the snapshot creation code and implementations to address found while trying to built the platform against ART prebuilts. Bug: 151937654 Test: m nothing Change-Id: Iac10f1200c0f283aa35402167eec8f9aeb65a38e
-
- Mar 21, 2020
-
-
Paul Duffin authored
-
Jooyung Han authored
-
Jooyung Han authored
This reverts commit 380fc361. Reason for revert: breaking one of internal targets Change-Id: Ica96c44078e5a7f674410828af3ba851317775dd Exempt-From-Owner-Approval: revert to fix build failure
-
Paul Duffin authored
-
Jooyung Han authored
-
Treehugger Robot authored
-
- Mar 20, 2020
-
-
Treehugger Robot authored
-
Paul Duffin authored
Ensures consistent tracking of multilib usages. Bug: 142935992 Test: m nothing Change-Id: I82ba4a53a21a0823503cb98f7edfde449b48b440
-
Paul Duffin authored
Added link type support in module creation code as cc_prebuilt_library has to provide both shared and static libraries. Had to add some calls to FirstUniquePaths() around the include dirs settings in library_sdk_member as otherwise the shared variant contains duplicate include dirs (presumably because it gets one set from its dependency on the static variant and one set of its own). That difference in include dirs causes problems in the generated cc_prebuilt_library. Test: m nothing Bug: 142918168 Change-Id: Ie7f23fc2341c83c7814cc98e3970df4f5d4c8423
-
Martin Stjernholm authored
* changes: Add SDK member support for cc_object. Add cc_prebuilt_object.
-
Ola Rozenfeld authored
-
Patrice Arruda authored
buld_error protobuf file is created the moment a build action failed. This is for external system to detect immediately what caused the build failure while monitoring the build_progress.pb file. Bug: b/150401146 Test: * m nothing * Built successfully aosp_arm-eng and checked build_error file was not created. * Modified a cpp file to cause a build failed. Ran m and build failed. Checked immediately during the build that the build_error file was created. * m clean; m and during build, checked if build_error was removed. Change-Id: I778616ae8cf242b49ad263b79c93321959112caa
-
Martin Stjernholm authored
Test: m nothing Test: Add sdk { name: "runtime-module-sdk", native_shared_libs: [ "libc", "libdl", "libm", "ld-android", ], native_objects: [ "crtbegin_dynamic", "crtbegin_static", "crtend_android", ], } to bionic/apex/Android.bp. Then: build/soong/scripts/build-aml-prebuilts.sh runtime-module-sdk Take the generated runtime-module-sdk-current.zip and unzip into a master-art tree without bionic/, edit the generated Android.bp to extend cc_prebuilt_* modules with: nocrt: true, stl: "none", system_shared_libs: [], apex_available: ["//apex_available:anyapex"], recovery_available: true, vendor_available: true, ramdisk_available: true, Then "m com.android.art.debug". This passes Soong but fails in the build step because more members are required. Bug: 148934017 Change-Id: I2ab8f6aadb1440b325697cae4a8ed761c62d15d2
-
Martin Stjernholm authored
To be used for prebuilt object support in SDK snapshots. Test: m nothing Bug: 148934017 Change-Id: I53d58100cc1d410c5cf5b7906de7ed6f7add2035
-
Ola Rozenfeld authored
Test: N/A, this only adds new variables. Change-Id: Iad09352090ec255af82e77941e6e050137f1e83b
-
- Mar 19, 2020
-
-
Treehugger Robot authored
-
Treehugger Robot authored
-
Patrice Arruda authored
For successful builds, a blank build_error proto file is created. This slows down the data processing part where it reads the build_error file and there are no errors to be processed. Bug: 142277430 Test: Did a successful build and checked if the build_error file was not available. Changed a source file to make the build failed and checked if the build_error file was available. Change-Id: I300dffe32fb7f8bf984fa20ae368bdd02bf12992
-
Patrice Arruda authored
Soong UI generates a proto file named build_progress.pb in $(OUT_DIR) output directory that contains build action numbers (how many are executing, finished and total) during the course of a build. This is for external systems that invokes the Platform Build Systems and would like to know the completion status. Bug: b/150401146 Test: Wrote a bash script that continuously read the build_progress.pb file and computed the build completed percentage while building the aosp_arm-eng target. Compared the percentage between the Soong output console and the one reported by the bash script. Change-Id: I7c7347bc8e41958093892d8e2731c4f4169937dd
-
Will McVicker authored
This makes sure that we don't keep old vendor_boot artifacts around after a clean. Signed-off-by: Will McVicker <willmcvicker@google.com> Fixes: 151957122 Bug: 151949371 Test: touch $OUT/vendor-ramdisk/test-file && make installclean Change-Id: I357929583f234212a998dceaa31506fce42e0255
-
Treehugger Robot authored
-
Treehugger Robot authored
-
Inseob Kim authored
When exporting Soong modules to Makefile, each VNDK snapshot module whose version is BOARD_VNDK_VERSION has ".vendor" suffix. So makeLibName should also return ".vendor", not the full vndk snapshot suffix like ".vndk.29.arm64.vendor". Exempt-From-Owner-Approval: cherry-pick Bug: 151274994 Test: manual build with snapshot Change-Id: I48f606f90f6c5ca55d0a5bc29bad491c38a44f47 Merged-In: I48f606f90f6c5ca55d0a5bc29bad491c38a44f47 (cherry picked from commit 7ac1fa78)
-
Bob Badour authored
-
Bob Badour authored
Empty results cause grep/egrep to return a non-zero status. Bug: 145347092 Bug: 141258651 Bug: 69058154 Bug: 143285996 Test: manual run for notice files Change-Id: I25d54ae307b97a07a98e99c54f283437718fe657
-
Yabin Cui authored
-
- Mar 18, 2020
-
-
Tim Joines authored
-
Tim Joines authored
Revert submission 1254009-vdex-symlinks Reason for revert: This causing some devices to fail to boot. See b/151836042 for details. Reverted Changes: Iced89071b:Expect vdex files in a target-independent director... Ifbceb8457:Share vdex files in the ART apex between architect... Change-Id: I5bd88f8e61d442eed921d840c90777a2750ddb16
-
Treehugger Robot authored
* changes: Extract the osTypeSpecificInfo code from module creation loop Extract archTypeSpecificInfo code from module creation loop
-
Ulyana Trafimovich authored
-
Paul Duffin authored
Extract the functionality to create an osTypeSpecificInfo struct, to optimize the properties, and add its properties to a property set into methods of the *osTypeSpecificInfo struct. This change is in preparation for adding support for link type which is another dimension within arch type which itself sits within os type. Test: m nothing Bug: 142918168 Change-Id: I025ee90e1461f7389bf4a9d056b281453068cf87
-