aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-03-04Snap for 11526323 from 972917d794e1f9a225fa3737cf648f4a8d044d31 to ↵simpleperf-releaseAndroid Build Coastguard Worker
simpleperf-release Change-Id: I955ce237a7a39deccc0bae534c1f9fc5ac071246
2024-03-04Support partial module variants with apex_contributionsSpandan Das
Some libraries like `libnativehelper_compat_libc++` only exist as shared library in module sdk. When prebuilt of this library is selected using apex_contritbutions, only shared linkages should be redirected to the prebuilt version. The static linkage should come from source. Test: Added a unit test Bug: 322175508 Change-Id: Ic65d376b2354b4a42c7b9ea3ed1cd80c37e2840f
2024-03-04Fix non-determinism in prebuilt selectionSpandan Das
This relands aosp/2978137 with acknowledgement of soong namespaces. If multiple versions of the prebuilt module sdk share the same soong config namespace, then PrebuiltPostDepsMutator rewrites rdeps to one of those prebuilts in a non-deterministic way. This CL uses apex_contributions to make this deterministic. Multiple prebuilts will not be allowed to have their prefer evaluate to true. If this happens, one of the prebuilts must be explicitly declared in apex_contributions. This CL also fixes the special-casing of the top-level java_sdk_library_import in ReplaceDirectDependencies. For framework-foo.v2, it will use BaseModuleName framework-foo instead of SdkLibraryName framework-foo.v2 to determine if the source module has been selected. Test: ran the previously failing cmd of b/327552112 Test: Added a unit test Test: aninja -t query out/soong/.intermediates/packages/modules/Permission/SafetyCenter/Config/safety-center-config/android_common/javac/safety-center-config.jar | grep module_sdk is empty (should not cause a regression for 323454855) Change-Id: Id484a41192085c50b7e34ad415c6e195edb0d006
2024-03-04Merge changes I177441bc,I32daefbd into mainSpandan Das
* changes: Use BaseModuleName for LOCAL_MODULE Disable source javalib dexpreopt when using prebuilt apex
2024-03-04Use BaseModuleName for LOCAL_MODULESpandan Das
This CL uses OverrideName to ensure that the LOCAL_MODULE does not contain any version information. Test: Created CaptiveLoginPortalGoogle.v2, and checked that its LOCAL_MODULE is CaptiveLoginPortalGoogle Change-Id: I177441bcd55ca538759b69aafb73d0a8b7261179
2024-03-04Disable source javalib dexpreopt when using prebuilt apexSpandan Das
The apex_contributions in next builds use prebuilt apexes with source java_sdk_library for javac. The dexpreopt rules of the source java_sdk_library are disabled via RELEASE_DEFAULT_MODULE_BUILD_FROM_SOURCE coupled with some complicated special-casing in android/prebuilt.go This special-casing breaks if we want to use prebuilts of some modules, and sources of other modules. To enable per mainline module toggelability, explicitly disable dexpreopt of source variant of java_sdk_library if we use prebuilt of the containing apex. Test: In internal, updated trunk_staging.scl's RELEASE_APEX_CONTRIBUTIONS_ADSERVICES to use prebuilt followed by m nothing Change-Id: I32daefbd38338b396d6f07b899826b2869d8f8e1
2024-03-01Merge "Allow clippy::disallowed_names since it can be used for debugging" ↵Stephen Hines
into main
2024-02-29Merge "Add the build flags for apex contribution contents" into mainTreehugger Robot
2024-02-29Merge changes I34385c48,I1e48947c into mainRyan Prichard
* changes: disablePrebuilt: also clear sanitizer-dependent Srcs Define libc++ config macros to nothing
2024-02-29Merge "Remove --multitree-build" into mainTreehugger Robot
2024-02-29Merge "Use R.txt files from aar files directly" into mainColin Cross
2024-02-29Merge changes I8d060594,I2b6a57ae into mainColin Cross
* changes: Put extraCombinedJars after the compiled jars Use RSP file for long classpaths
2024-02-29Allow clippy::disallowed_names since it can be used for debuggingStephen Hines
https://rust-lang.github.io/rust-clippy/master/index.html#/disallowed_names The current list is extremely short ("foo", "baz", "quux"), and thus this really just prevents people from temporarily using `foo` to debug code. In the spirit of improving productivity and reducing frustration, it's easier to just allow this. Bug: N/A Test: TH Change-Id: I50b65486ed2b58bfd2cf699ee3b43b936d25f2cb
2024-02-29Merge "Some tweaks to the aconfig flag collection logic" into mainYu Liu
2024-02-29Merge "Revert "Fix non-determinism in prebuilt selection"" into mainSpandan Das
2024-02-29Add the build flags for apex contribution contentsSpandan Das
This will be used for source vs prebuilt selection of Google apps Test: go build ./android Bug: 326995930 Change-Id: Idb535c468534ed691431315edcf7a279024dc7f1
2024-02-29Add a source_module_name to android_appSpandan Das
For multiple mainline prebuilts, we will have multiple versioned prebuilt apps in the tree. The soong name of these prebuilts will have a version prefix to prevent name collisions (e.g. MyGoogleApp.v2). This CL introduces a source_module_name property in android_app_imoprt. This property will be used for the following 1. Determining installation path. This should be /system/app/MyGoogleApp/MyGoogleApp.apk and not /system/app/MyGoogleApp.v2/MyGoogleApp.apk (filename prop determines the filename and not the dir name) 2. Preventing duplicate installation rules: This property will be used to create a dependency to the source app, and call HideFromMake on all the unflagged apps Test: presubmits Test: locally # Created CaptivePortalLoginGoogle.v2 and selected it using one of the RELEASE_APEX_CONTRIBUTION_* flags Bug: 326995930 Change-Id: If4ab9f9bd295117c96eb062cf3b3d2efc8bfed12
2024-02-29Revert "Fix non-determinism in prebuilt selection"Spandan Das
This reverts commit 2d8884a37757edc6b984e1e073ab5a9e4a85f778. Reason for revert: Build breakage https://groups.google.com/a/google.com/g/android-build-police-core/c/00mM-B9unVg/m/0FxBxpMbAwAJ. The validation does not check for namespace isolation which breaks libtonemap Change-Id: Ieb4d3bc4f3ade856877ebb62a567620f5a1ed08c
2024-02-29Fix non-determinism in prebuilt selectionSpandan Das
If multiple versions of the prebuilt module sdk share the same soong config namespace, then PrebuiltPostDepsMutator rewrites rdeps to one of those prebuilts in a non-deterministic way. This CL uses apex_contributions to make this deterministic. Multiple prebuilts will not be allowed to have their prefer evaluate to true. If this happens, one of the prebuilts must be explicitly declared in apex_contributions. This CL also fixes the special-casing of the top-level java_sdk_library_import in ReplaceDirectDependencies. For framework-foo.v2, it will use BaseModuleName framework-foo instead of SdkLibraryName framework-foo.v2 to determine if the source module has been selected. Test: Added a unit test Test: aninja -t query out/soong/.intermediates/packages/modules/Permission/SafetyCenter/Config/safety-center-config/android_common/javac/safety-center-config.jar | grep module_sdk is empty (should not cause a regression for 323454855) Bug: TODO Change-Id: I7191200c330c5bcb9d5532006d3c573a60db61cc
2024-02-28disablePrebuilt: also clear sanitizer-dependent SrcsRyan Prichard
The new libc++ prebuilt has HWASan and non-HWASan variants for arm64. Bug: 175635923 Test: checkout use-prebuilt-libcxx topic, build libc++demangle, verify that libc++demangle-install is not a valid build target Change-Id: I34385c48aa7ad1401e2547d65d30a14fa342e304
2024-02-28Define libc++ config macros to nothingRyan Prichard
libc++[abi] always check whether one of these macros is defined, not the value the macro is defined to. With the new libc++, there is a Windows __config_site header that automatically defines _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS and _LIBCPP_HAS_THREAD_API_WIN32 to nothing, so these definitions need to match to avoid a redefinition error. Bug: 175635923 Test: treehugger Test: m adb Change-Id: I1e48947c3b45e59804cdacd48776c7f3bd9a18c6
2024-02-29Merge "Sort jarjar rename keys before using" into mainInseob Kim
2024-02-28Remove --multitree-buildCole Faust
Multitree has been discontinued. Test: m nothing --no-skip-soong-tests Change-Id: Ie4d96a11279bf0f20a5e1a49837d9df4b24b1662
2024-02-28Merge "Enable non-"everything" stubs generation in java_api_library" into mainJihoon Kang
2024-02-28Some tweaks to the aconfig flag collection logicYu Liu
1. Output the aconfig flags pb and storage files to /etc 2. Fix a bug where aconfig flags were not collected for java_sdk_library Bug: None Test: manual and unit tests. Change-Id: I0896e91918c1b53c98ac9dc0f4a636f158200891
2024-02-28Snap for 11510257 from 592b54c443bffb7082935ac79cd18dfa953f92e3 to ↵Android Build Coastguard Worker
simpleperf-release Change-Id: Iad5befe36704d994c0954ed7ef780348049a9a9b
2024-02-28Use R.txt files from aar files directlyColin Cross
Use the R.txt files from aar imports directly instead of recreating one using aapt2 from the embedded resources. Fixes an issue with com.google.android.material where the jar was referencing com.google.android.material.R.attr.theme, aapt2 was not producing "int attr theme 0x0" in R.txt, but the aar's R.txt had it. Bug: 294256649 Test: builds Change-Id: Ibe1e5535a75eed59f3b8dbbc12eff9c07af51d37
2024-02-28Put extraCombinedJars after the compiled jarsColin Cross
extraCombinedJars contains the R.jar generated by ResourceProcessorBusyBox for apps. It needs to go before any static_libs dependencies so that the finalized R values take precedence over any non-final R values that may have been included in the dependencies. Moving after the javac and kotlinc compiled jars helps minimize differences when turning on use_resource_processor by default by using the MANIFEST.MF generated by soong_zip instead of the one generated by ResourceProcessorBusyBox, which contains a different Created-By field. Bug: 294256649 Test: m javac-check Change-Id: I8d060594404121fd36ef650ac317f0c5d5f92b23
2024-02-28Use RSP file for long classpathsColin Cross
Setting use_resource_processor: true can increase the length of the classpath enough to trigger "command line too long" errors. There are clockwork libraries with 546 transitive android_library dependencies. Write classpaths longer than 64kB to a separate file and add them to the javac and turbine command lines with the @file syntax. Bug: 294256649 Test: m checkbuild Change-Id: I2b6a57ae30de03347db3221e9c9a4b2efb490115
2024-02-28Merge "Update unaligned-vector-mem to -munaligned-access" into mainAditya Kumar
2024-02-28Merge "Use BaseModuleName of dep when writing to make" into mainSpandan Das
2024-02-28Use BaseModuleName of dep when writing to makeSpandan Das
Since BaseModuleName of the dep becomes its LOCAL_MODULE name in the generated mk file, we should also use BaseModuleName of dep for populating properties such as LOCAL_SHARED_LIBS of rdeps Test: m nothing --no-skip-soong-tests Bug: 322175508 Change-Id: I6b47112faa63f85d19b5b71e0e102cea0ab68e3b
2024-02-28Enable non-"everything" stubs generation in java_api_libraryJihoon Kang
This change adds support to generate non-"everything" (i.e. "runtime" and "exportable") stubs in java_api_library, which generates the stubs from the api signature files. Unlike droidstubs module that generates "everything", "exportable" and "runtime" stubs in a single module, java_api_library generates a single set of stubs per module, which is set by the default-"everything" property `stubs_type`. This is because java_api_library is responsible for both generation and the compilation of the stubs srcjar, and compilation of the stubs srcjar are done in separate java_library modules for from-source stubs. Utilization of this feature will be done in a follow up change that generates the "exportable" java_api_library modules in java_sdk_library. Test: m nothing --no-skip-soong-tests Bug: 318009570 Change-Id: I1051544ac3bcdb3ba1f78bfec28eba4e9fad9c2d
2024-02-28Update unaligned-vector-mem to -munaligned-accessAdityaK
Latest compiler has merged both unaligned access flags into one. TODO: This is needed until we change clang driver to enable -munaligned access by default.for Android b/327307773 Bug: 326790418 Change-Id: Ia8c29dc56104d2cffb8ac41aae6eeacccae68e61
2024-02-28Sort jarjar rename keys before usingInseob Kim
To make it deterministic Bug: 327302642 Test: compare build commands among different targets Change-Id: I890dcd67c62db58938a6e6d1c4e3fbd323c72b18
2024-02-28Merge "Add sh_binary dependencies to primary abi of the target" into mainRiya Thakur
2024-02-28Merge changes I14928b7b,Ia009df3d into mainJihoon Kang
* changes: Generate runtime stubs in droidstubs Additional cleanup prior to adding the runtime stubs
2024-02-27Add sh_binary dependencies to primary abi of the targetRiya Thakur
If compile_multilib is set to 'both' for an apex having a sh_binary dependency for which compile_multilib is not set, then the sh_binary dependency should be added for the primary ABI of the target Bug: 325628733,326985291 Test: m Change-Id: Ie9cd12d49f6854c33af3724cb8e2fc3d8b7627a0
2024-02-27Merge "Support new property "arch_dpi" for android_import" into mainTreehugger Robot
2024-02-27Generate runtime stubs in droidstubsJihoon Kang
Similar to how the exportable stubs are generated in droidstubs, this change adds the rule to generate the runtime stubs in droidstubs. Unlike the exportable stubs, which the artifacts are dist'ed during the sdk build, the runtime stubs will only used in the hiddenapi flags generation. Therefore, only the stubs are generated and no other artifacts are generated during the "runtime" metalava invocation. When `aconfig_declarations` property is not defined (i.e. no flags are enabled, thus the exportable and the runtime stubs are identical), the runtime stubs are simple copied from the exportable stubs. Note that the runtime stubs are not a dependency of `droid` as of now. The dependency of the hiddenapi flags will be replaced to the runtime stubs in the child CL. Test: m nothing --no-skip-soong-tests && m api-stubs-docs-non-updatable Bug: 319162970 Change-Id: I14928b7b5619522c4caab1dfc795bc9c7e929639
2024-02-27Additional cleanup prior to adding the runtime stubsJihoon Kang
This change performs additional cleanups in the build rules of the droidstubs module, specifically optionalizing annotationFlags(...) and apiLevelsAnnotationsFlags(...). This is required as "runtime" stubs would not generate other artifacts than the stubs, and thus `stubsArtifacts` would not be generated for "runtime". Test: m nothing Bug: 319162970 Change-Id: Ia009df3d01f49841d5041fb2dfdfa7ef8671bf18
2024-02-26Ignore prebuilt apex_contributions in coverage buildsSpandan Das
This CL unsets the prebuilt contents of a selected apex_contribution in coverage builds. The effect of this will be that mainline modules will be built from source with the following in coverage builds 1. Instrumentation turned on 2. RELEASE_ACONFIG_VALUE_SETS for that release config Test: Added a unit test Test: lunch cf_x86_64_phone-next-userdebug && EMMA_INSTRUMENT=true m nothing (with ag/26298763) Bug: 325666427 Change-Id: Ic4e1f0612072377261602842dfd303c064095035
2024-02-26Merge "Include all_aconfig_declarations in droid dist" into mainMårten Kongstad
2024-02-26Support new property "arch_dpi" for android_importHerbert Xue
Support the feature with new property combined with architecture and dpi resolution. Bug: 319381869 Test: go test -run TestAndroidAppImport_ArchVariants Change-Id: Ib43cbae8868fc35701e6666867b2325f5abbb2c7
2024-02-25bindgen: set -Wno-unknown-warning-option flag by defaultYi Kong
Test: presubmit Change-Id: Id8547c0b3263f4e3b060f8b0fce2aef8a494b1b2
2024-02-23Include all_aconfig_declarations in droid distMårten Kongstad
Include all_aconfig_declarations in the droid dist directory (identically to how it is already included in the sdk dist). For local builds, `printflags` is still the recommended way to read all_aconfig_declarations; the dist-ed files are intended as a way to inspect remote builds, such as CI builds. Bug: 324281288 Test: lunch aosp_oriole-trunk-eng && m droid dist && test -e out/dist/flags.pb && test -e out/dist/flags.textproto Change-Id: Ic29d69ab5014593a3f9213f8a5b55e0569922cc9
2024-02-23Merge changes I67893f8c,I5f29258e into mainTreehugger Robot
* changes: Ensure that filesystem module can track modules with prefer32 bpf modules can be included in filesystem modules
2024-02-22Convert the build flag RELEASE_EXPORT_RUNTIME_APIS to a product variableJihoon Kang
RELEASE_EXPORT_RUNTIME_APIS build flag is currently used to modify the filter condition for the "exportable" stubs, so that it exposes wider set of flagged apis (ENABLED && READ_ONLY vs ENABLED || READ_WRITE). This flag was originally introduced as a build flag to be enabled in specific release configurations, but instead this is used as a product variable that will be enabled in the product `sdk_with_runtime_apis`, which will be introduced in a future change. Test: m nothing --no-skip-soong-tests Bug: 326312949 Change-Id: Ieb3cee517dd6cedcca844a9eab270aedf8199d4e
2024-02-22Introduce product variable PRODUCT_HIDDEN_API_EXPORTABLE_STUBSJihoon Kang
The new product variable behaves identical to the build flag RELEASE_HIDDEN_API_EXPORTABLE_STUBS: if the variable is set to true, the hiddenapi flags are generated from the "exportable" stubs (i.e. the stubs that does not include READ_WRITE permission or DISABLE state flagged apis) instead of the "everything" stubs (i.e. the stubs that includes all flagged apis regardless of the state of the flags). If the variable is set to false, the stubs are generated from the "everything" stubs. This product variable will be utilized for `sdk_with_runtime_apis` product in the future changes. Test: m nothing Bug: 326310637 Change-Id: I8872d0b0617eb0f25da32611837ad823c77b0df7
2024-02-22Merge "Allow soong config value variables to set nested properties" into mainCole Faust