Commit Graph

81732 Commits

Author SHA1 Message Date
Ryan Prichard
4e2594e20a Merge changes I34385c48,I1e48947c into main am: 45ac47edab
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2983535

Change-Id: I223f80828e80829d151fa9dd599ac0ecfee9858b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-29 20:58:14 +00:00
Treehugger Robot
33f110f428 Merge "Remove --multitree-build" into main am: 7c8cf91ff8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2982507

Change-Id: I86c17fc27621ce32ebf555ba4c2222b1ad4c0dec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-29 20:57:56 +00:00
Ryan Prichard
45ac47edab Merge changes I34385c48,I1e48947c into main
* changes:
  disablePrebuilt: also clear sanitizer-dependent Srcs
  Define libc++ config macros to nothing
2024-02-29 20:51:48 +00:00
Colin Cross
0c5304b481 Merge "Use R.txt files from aar files directly" into main am: 4b6a3ae65c am: d2820e81aa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2980833

Change-Id: Ica62f75a236a2e8a2cb3039ecdcae73851de1f07
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-29 20:36:45 +00:00
Colin Cross
0a2c3334d9 Merge changes I8d060594,I2b6a57ae into main am: 5d55b66861 am: 8b64ad9506
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2980832

Change-Id: I3aa663741d26491ffeb10cc2fb2c97a3a83c46be
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-29 20:36:23 +00:00
Treehugger Robot
7c8cf91ff8 Merge "Remove --multitree-build" into main 2024-02-29 20:13:48 +00:00
Colin Cross
d2820e81aa Merge "Use R.txt files from aar files directly" into main am: 4b6a3ae65c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2980833

Change-Id: I2f91f88d0d347e598ddda2dbbeb67b4fc9d19da6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-29 19:33:27 +00:00
Colin Cross
8b64ad9506 Merge changes I8d060594,I2b6a57ae into main am: 5d55b66861
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2980832

Change-Id: If904b08b58a76b4d82ca3926e4d23d89ffcc588f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-29 19:33:08 +00:00
Colin Cross
4b6a3ae65c Merge "Use R.txt files from aar files directly" into main 2024-02-29 18:55:17 +00:00
Colin Cross
5d55b66861 Merge changes I8d060594,I2b6a57ae into main
* changes:
  Put extraCombinedJars after the compiled jars
  Use RSP file for long classpaths
2024-02-29 18:46:46 +00:00
Yu Liu
c82851b46d Merge "Some tweaks to the aconfig flag collection logic" into main am: 6c2cd90232 am: 4782aa50bf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2983533

Change-Id: I91948e96a5df217441135f631040e80a060197d7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-29 18:28:28 +00:00
Spandan Das
341f6c7223 Merge "Revert "Fix non-determinism in prebuilt selection"" into main am: 5354483c12 am: 1e9810748e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2984372

Change-Id: Ied7c0c39b23d6187523b31a92c0851c43349149a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-29 18:27:48 +00:00
Spandan Das
d693e1c289 Add a source_module_name to android_app am: efa146577f am: 85437f2901
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2982635

Change-Id: I208e1e0dac79ee1e865785a5374a958c487914bb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-29 18:25:59 +00:00
Stephen Hines
5f8dae514b Allow clippy::disallowed_names since it can be used for debugging
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-29 10:12:19 -08:00
Yu Liu
4782aa50bf Merge "Some tweaks to the aconfig flag collection logic" into main am: 6c2cd90232
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2983533

Change-Id: I3bc2f231c2b13fa716d01c7bbbabd96fb280ebc0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-29 18:05:53 +00:00
Spandan Das
1e9810748e Merge "Revert "Fix non-determinism in prebuilt selection"" into main am: 5354483c12
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2984372

Change-Id: I5c759faa655a3fa81f68ffbdb42dfb70ea4d22e6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-29 18:05:11 +00:00
Yu Liu
6c2cd90232 Merge "Some tweaks to the aconfig flag collection logic" into main 2024-02-29 17:55:53 +00:00
Spandan Das
5354483c12 Merge "Revert "Fix non-determinism in prebuilt selection"" into main 2024-02-29 17:49:45 +00:00
Spandan Das
85437f2901 Add a source_module_name to android_app am: efa146577f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2982635

Change-Id: I86d01156c103b3fc08f105d2890c9882f5fdeb57
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-29 17:45:16 +00:00
Devin Moore
4bb96625ba Merge "Let Release_aidl_use_unfrozen add vintf_fragments" into main 2024-02-29 17:14:40 +00:00
Spandan Das
06c64f0f12 Add the build flags for apex contribution contents
This will be used for source vs prebuilt selection of Google apps

Test: go build ./android
Bug: 326995930

Change-Id: Idb535c468534ed691431315edcf7a279024dc7f1
2024-02-29 15:36:20 +00:00
Spandan Das
efa146577f Add a source_module_name to android_app
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-29 14:33:16 +00:00
Sorin Basca
5a2e36b755 Switch to JDK 21
Bug: 313924276
Test: n
Change-Id: Ia9682181a6ce35ed0102d60bf7df1def8f876fd0
2024-02-29 11:44:09 +00:00
Spandan Das
af66212522 Revert "Fix non-determinism in prebuilt selection"
This reverts commit 2d8884a377.

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-29 08:57:08 +00:00
Spandan Das
8b5ad8d319 Fix non-determinism in prebuilt selection am: 2d8884a377 am: abd735bb6c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2978137

Change-Id: I460c2a2fbc0b083f95117265eb1addde08d67c8a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-29 07:54:03 +00:00
Spandan Das
abd735bb6c Fix non-determinism in prebuilt selection am: 2d8884a377
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2978137

Change-Id: I4a4d775e19657dbd33ddd2017c40c8651315db3d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-29 07:13:36 +00:00
Spandan Das
2d8884a377 Fix non-determinism in prebuilt selection
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-29 06:34:49 +00:00
Colin Cross
2150160d8f Copy imported APKs to output filename
android_app_import and android_test_import modules with processed: true
and skip_preprocessed_apk_checks are used directly from the source tree.
If the source file name doesn t match the module name and the file is
used as test data it can result in the wrong filename being used.  Copy
the source file to an output file with the correct name first.

Bug: 290376750
Test: m CtsAppSecurityHostTestCases
(cherry picked from https://android-review.googlesource.com/q/commit:5780d57a7116643c6d9eac735982ac44bd6b0189)
Merged-In: I4a6dd1c5e48db7085ea41035def31f0844948a46
Change-Id: I4a6dd1c5e48db7085ea41035def31f0844948a46
2024-02-29 04:15:27 +00:00
Ryan Prichard
21e2c10cd2 disablePrebuilt: also clear sanitizer-dependent Srcs
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-28 19:14:59 -08:00
Ryan Prichard
718cf5bf19 Define libc++ config macros to nothing
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-28 19:14:24 -08:00
Inseob Kim
fa38c8c032 Merge "Sort jarjar rename keys before using" into main am: 688f824e1a am: 224ac62ba8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2981731

Change-Id: I6e5a5fa9b8cd1bb49a0d90b9996838b4cf3669aa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-29 02:26:40 +00:00
Inseob Kim
224ac62ba8 Merge "Sort jarjar rename keys before using" into main am: 688f824e1a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2981731

Change-Id: I18ade8539893ac793663217f47c786e76f5a2aff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-29 01:44:15 +00:00
Inseob Kim
688f824e1a Merge "Sort jarjar rename keys before using" into main 2024-02-29 01:04:40 +00:00
Cole Faust
331b27f511 Remove --multitree-build
Multitree has been discontinued.

Test: m nothing --no-skip-soong-tests
Change-Id: Ie4d96a11279bf0f20a5e1a49837d9df4b24b1662
2024-02-28 15:35:49 -08:00
Jihoon Kang
693ba5cfbf Merge "Enable non-"everything" stubs generation in java_api_library" into main am: 641bd9daee am: 04338c8ae2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2977092

Change-Id: I8297262de0e3260b8af19e683e1b46876de71a59
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-28 23:32:21 +00:00
Jihoon Kang
04338c8ae2 Merge "Enable non-"everything" stubs generation in java_api_library" into main am: 641bd9daee
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2977092

Change-Id: I91772243047e96a6144134694f2038878ed7b0ea
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-28 22:50:53 +00:00
Jihoon Kang
641bd9daee Merge "Enable non-"everything" stubs generation in java_api_library" into main 2024-02-28 22:38:52 +00:00
Yu Liu
ab31c828d7 Some tweaks to the aconfig flag collection logic
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-28 22:21:31 +00:00
Aditya Kumar
c4538a09ef Merge "Update unaligned-vector-mem to -munaligned-access" into main am: 592b54c443 am: b54effc612
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2977952

Change-Id: Icd6b27f8139e010bb35278fdf4ebf8fad18bac04
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-28 20:57:34 +00:00
Aditya Kumar
b54effc612 Merge "Update unaligned-vector-mem to -munaligned-access" into main am: 592b54c443
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2977952

Change-Id: I5001c1465f48c0a9647026864fff6b655d717077
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-28 20:15:53 +00:00
Colin Cross
bb77d8e948 Use R.txt files from aar files directly
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-28 11:54:48 -08:00
Colin Cross
fd620b2b44 Put extraCombinedJars after the compiled jars
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-28 11:54:48 -08:00
Colin Cross
c52d523327 Use RSP file for long classpaths
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-28 11:54:48 -08:00
Aditya Kumar
592b54c443 Merge "Update unaligned-vector-mem to -munaligned-access" into main 2024-02-28 19:35:39 +00:00
Spandan Das
081276daeb Merge "Use BaseModuleName of dep when writing to make" into main am: 4dc449593a am: be455487bf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2978136

Change-Id: I691e0b4fbfa7a104bced1d7b6fafc93b5dff9dbd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-28 19:34:16 +00:00
Spandan Das
be455487bf Merge "Use BaseModuleName of dep when writing to make" into main am: 4dc449593a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2978136

Change-Id: I089b921d4c953aca8dce8dc72882da1d0778b98a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-28 18:54:56 +00:00
Spandan Das
4dc449593a Merge "Use BaseModuleName of dep when writing to make" into main 2024-02-28 18:03:41 +00:00
Spandan Das
3faa792093 Use BaseModuleName of dep when writing to make
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-28 18:03:00 +00:00
Jihoon Kang
5d701272e4 Enable non-"everything" stubs generation in java_api_library
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-28 07:55:32 +00:00
AdityaK
2c90a92d77 Update unaligned-vector-mem to -munaligned-access
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-28 06:14:57 +00:00