Commit Graph

80805 Commits

Author SHA1 Message Date
Jihoon Kang
f10ad16f31 Merge "Fix api versions xml file handling in droidstubs" into main am: c240996829
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2929610

Change-Id: I336764a515a61ac7565e85760bfb56d7c2253824
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-02 03:25:45 +00:00
Jihoon Kang
c240996829 Merge "Fix api versions xml file handling in droidstubs" into main 2024-02-02 02:31:17 +00:00
Treehugger Robot
4db5f221cc Merge "Build VNDK with VNDK prebuilts without BOARD_VNDK_VERSION" into main am: b370adbdcc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2938002

Change-Id: If5ff548de032bbbda511c344d7aefc4fa3bb682c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-02 01:57:56 +00:00
Treehugger Robot
b370adbdcc Merge "Build VNDK with VNDK prebuilts without BOARD_VNDK_VERSION" into main 2024-02-02 01:06:37 +00:00
Jihoon Kang
d9a0694ac3 Fix api versions xml file handling in droidstubs
Api levels annotations flags should respect the stubs type, but the
everything api versions xml file was being passed to the metalava
invocation for both everything and exportable metalava invocation.

This change fixes such issue by setting api versions xml file (passed to
metalava as --apply-api-levels argument) to respect the stubs type.

Test: m nothing --no-skip-soong-tests
Bug: 319162970
Change-Id: If7155b3701b32fb4cd81dc918648b449de090201
2024-02-02 00:36:04 +00:00
Anas Sulaiman
ab3d01f936 Merge "Fix non-deterministic python compilation" into main am: c219740e40
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2941608

Change-Id: I5de7d67e629872978d0ef197547cdc0114c00770
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-01 23:07:19 +00:00
Anas Sulaiman
c219740e40 Merge "Fix non-deterministic python compilation" into main 2024-02-01 22:30:18 +00:00
Kalesh Singh
dc0e1130ac soong: Add crt_pad_segment to .so's am: f4ffe0a026
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2933932

Change-Id: I0b5580c9c2fa0a1f00ab5a617a7c45a29c8d9a5d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-01 21:39:55 +00:00
Anas Sulaiman
55b7ba0645 Fix non-deterministic python compilation
Timestamps in pyc files and zip archives were causing cache misses in RBE.

Bug: b/322788229
Test: Ran a few local builds and verified improved cache hit rate for metalava actions.
Change-Id: I9375694d26a107f5c0c43bbd685bd8e86349d187
2024-02-01 19:41:31 +00:00
Kalesh Singh
f4ffe0a026 soong: Add crt_pad_segment to .so's
crt_pad_segment adds a NOTE to the ELF which is used by the binoic
loader to determine whether it should pad segments when mapping them
into the virtual address space, such that there are no gaps between
mappings of consecutive segments. This avoids an increase in
unreclaimable kernel slab memory usage for VMAs on devices where the
runtime-page-size > elf-segment-p_align.

Since -fandroid-pad-segment [1] respects -nostdlib used in android
platform builds, soong must link in crt_pad_segment to platform shared
libraries.

For simplicity, link crt_pad_segment everywhere that crtend_so is
applicable, ignoring nocrt property, as there is no other reason
to track these separately.

Example:

❯ readelf -WS /system/lib64/libc++.so [Output simplified]

...
Section Headers:
  [Nr] Name              Type            Address          Off    Size   ES Flg Lk Inf Al
...
  [ 2] .note.android.pad_segment NOTE            0000000000000288 000288 000018 00   A  0   0  4
...

[1] https://github.com/llvm/llvm-project/pull/77244

Bug: 316403210
Test: readelf -WS <lib>.so
Change-Id: Icc06611376cfd5ee4de7281b4134f9f8ffe7ca60
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
2024-01-31 19:42:31 -08:00
Kiyoung Kim
0fcadd89e2 Build VNDK with VNDK prebuilts without BOARD_VNDK_VERSION
Current VNDK prebuilts are disabled if BOARD_VNDK_VERSION is not set,
but VNDK prebuilts should be enabled even BOARD_VNDK_VERSION is not set
because VNDK APEXes should be available from VNDK deprecation. This
change removes some restrictions on VNDK prebuilts to enable those from
VNDK deprecation.

Bug: 316829758
Test: AOSP Cuttlefish build succeeded without BOARD_VNDK_VERSION
Change-Id: Id780811dab26f2125097c3efc5b2b4a59416b826
2024-02-01 11:20:14 +09:00
Treehugger Robot
8e58786f0d Merge "Revert "Update clang version to clang-r510928"" into main am: f166df7efd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2937811

Change-Id: I0fe4028c8b633dbe4850c04f9ffcc868420d5c48
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-31 13:57:57 +00:00
Treehugger Robot
f166df7efd Merge "Revert "Update clang version to clang-r510928"" into main 2024-01-31 13:42:54 +00:00
Pirama Arumuga Nainar
22686bab04 Revert "Update clang version to clang-r510928"
Revert submission 2804373-clang_r510928

Bug: http://b/301328082

Reason for revert: Broke aosp-main/aosp_x86-next-userdebug

Reverted changes: /q/submissionid:2804373-clang_r510928

Change-Id: I6802b329e8dbd9dce5a75aab76c43960765a8594
2024-01-31 06:51:49 +00:00
Aditya Kumar
f4142ef297 Merge "Update clang version to clang-r510928" into main am: 7d45ab6144
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2804373

Change-Id: I3ae7478067043eff15514eb9fda5b09aed313599
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-31 05:54:42 +00:00
Aditya Kumar
7d45ab6144 Merge "Update clang version to clang-r510928" into main 2024-01-31 05:18:44 +00:00
Treehugger Robot
60bb72a387 Merge "Use ordered interface from cmp package" into main am: 73b1b48d9b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2937805

Change-Id: I316ffda88ce0d8ec1d7e4328c72b6d31630eb551
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-31 00:22:48 +00:00
Treehugger Robot
73b1b48d9b Merge "Use ordered interface from cmp package" into main 2024-01-30 23:45:39 +00:00
AdityaK
0790ce2e56 Update clang version to clang-r510928
Bug: b/301328082
Test: N/A
Change-Id: Ied250c42c33d9e2d8bd9b9161b9028874540addb
2024-01-30 15:09:29 -08:00
Spandan Das
e0d8cb2569 Merge "Propagate profile_guided requirement of imports to top-level apex" into main am: f3c63e6743
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2929189

Change-Id: I8f2014dd08b273f0fc3f3c3bff849078abf7914f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-30 22:56:21 +00:00
Spandan Das
6a830dc530 Merge "Support mechanism to select a specific version of module sdk prebuilt" into main am: 5809f65748
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2935330

Change-Id: I300fa14f92d53d87c6fa51517974e3450bd1c836
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-30 22:56:10 +00:00
Treehugger Robot
3691588436 Merge "Disable stub validation when WITHOUT_CHECK_API=true" into main am: e288043ee7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2935430

Change-Id: Ia0a4e03608b56eef00eb1585da26213bee949e27
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-30 22:54:59 +00:00
Spandan Das
f3c63e6743 Merge "Propagate profile_guided requirement of imports to top-level apex" into main 2024-01-30 22:50:38 +00:00
Spandan Das
5809f65748 Merge "Support mechanism to select a specific version of module sdk prebuilt" into main 2024-01-30 22:43:33 +00:00
Cole Faust
efc70122af Use ordered interface from cmp package
I just learned this exists.

Test: m nothing --no-skip-soong-tests
Change-Id: Ic6f0d11c24b41b394b1760fcca9e0da53243e6d9
2024-01-30 14:42:12 -08:00
Treehugger Robot
e288043ee7 Merge "Disable stub validation when WITHOUT_CHECK_API=true" into main 2024-01-30 22:20:21 +00:00
Xin Li
14a55a9b82 Merge Android 24Q1 Release (ab/11220357)
Bug: 319669529
Merged-In: I763b033f0f5f275091db45ab62df6af48dcddc66
Change-Id: I65077e51b4a073f2628fb0995e80ad64368def26
2024-01-30 10:34:06 -08:00
Spandan Das
2ea84dd0dc Propagate profile_guided requirement of imports to top-level apex
For prebuilts, the dexpreopt rules of system server jars are now
generated from the context of the top-level prebuilt apex and not in the
context of the shim java_import modules. Since
`dex_preopt.profile_guided` property is defined in java_import, this
needs to be bubbled up to the top-level apex. This will be done using
deapxerInfo. If profile_guided of a transitive java_import is true, the deapexed .prof file will be
set as dexreopter.inputProfilePathOnHost before invoking
dexpreopter.dexpreopt. This ensures that only that java_import undergoes
profile guided dexpreopt, and not every other transitive java_import

Test: go test ./apex -run TestPrebuiltStandaloneSystemserverclasspathFragmentContents
Test: lunch cf_x86_64_only_phone-next-userdebug && m
$ANDROID_PRODUCT_OUT/system/framework/oat/x86_64/apex@com.android.art@javalib@service-art.jar@classes.odex
Test: du -sh
$ANDROID_PRODUCT_OUT/system/framework/oat/x86_64/apex@com.android.art@javalib@service-art.jar@classes.odex
24K

Bug: 308790457
Change-Id: Ibf46ecb400b3f126b243fc8d27b08d9a1aa4cc97
2024-01-30 18:04:52 +00:00
Hsin-Yi Chen
8e5eaf617a Merge "Find LLNDK dumps in prebuilts/abi-dumps/vndk" into main am: 7acf94b221
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2928054

Change-Id: I779e7956a1e2d0581f03fe0444af704b355e63bf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-30 09:50:30 +00:00
Hsin-Yi Chen
7acf94b221 Merge "Find LLNDK dumps in prebuilts/abi-dumps/vndk" into main 2024-01-30 09:05:16 +00:00
Jihoon Kang
4f04df9f50 Disable stub validation when WITHOUT_CHECK_API=true
Even when building stubs from source, the rules for the
java_api_library modules are generated although they are not
executed. This leads to NPE, as setting `WITHOUT_CHECK_API=true`
prevents `checkCurrentApiTimestamp`, which the java_api_library modules
depend on, from being generated.

To prevent the NPE, this change prevents the `checkCurrentApiTimestamp`
from being registered as the dependency of the java_api_library modules
when `WITHOUT_CHECK_API=true` is set.

Test: BUILD_FROM_SOURCE_STUB=true WITHOUT_CHECK_API=true m nothing
Bug: 320601440
Change-Id: I4f19e30d9cd74bdc20dde0d14884fb03ff223ccb
2024-01-30 02:40:20 +00:00
Spandan Das
3cf0463a47 Support mechanism to select a specific version of module sdk prebuilt
This CL is the java_(test_)_import equivalent of aosp/2928483.

With trunk stable, we will have
multiple prebuilts of the prebuilt java .jars in
prebuilts/module_sdk/art/<v>/test-exports/, and this CL introduces a
mechanism to use apex_contributions to select a specific versioned
prebuilt when building.

Implementation details: Create a new source_module_name property to
identify the root module. rdeps referring to the root module will get
redirected if necessary. This property also
becomes the stem, if `stem` is not set explicitly.

Bug: 322175508

Test: Added a unit test
Change-Id: I2dff38acdf2002355586dbb2be8c1f98af4741f7
2024-01-30 01:59:51 +00:00
Treehugger Robot
c206b6227f Merge "Prevent defaults modules from expanding path property dependencies" into main am: 2d08b2abff
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2933573

Change-Id: I969cc97bca99f0a289ede44a2653ab05e25c788e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-30 01:53:11 +00:00
Treehugger Robot
2d08b2abff Merge "Prevent defaults modules from expanding path property dependencies" into main 2024-01-30 01:01:37 +00:00
Treehugger Robot
5fd64b9c70 Merge "Prevent disabling checks via flags property" into main am: 59739666e6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2933578

Change-Id: Ie49923115baf0fb0ffa8599621c0cad80398a9a9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-30 00:47:45 +00:00
Treehugger Robot
59739666e6 Merge "Prevent disabling checks via flags property" into main 2024-01-30 00:14:17 +00:00
Cole Faust
5d0aaf42db Prevent disabling checks via flags property
strict_updatability_linting currently only checks that updatability
checks aren't disabled via disabled_checks / warning_checks, you could
get around it using the `flags` property. Only allow controlling checks
via the *_checks properties.

Bug: 322802379
Test: m nothing --no-skip-soong-tests
Change-Id: Ia311622e1409f9cc201ab55f8749f2d13fccf551
2024-01-29 14:48:23 -08:00
Colin Cross
69a680feec Prevent defaults modules from expanding path property dependencies
Defaults modules should not have dependencies added to them for
path properties, the properties will already have been squashed
into other modules that depend on the defaults modules, and the
path dependencies will be added to those modules.

Fixes: 321056451
Test: TestDefaultsPathProperties
Change-Id: I59049f94b7a0924a7b1d997d15723901b0d522ee
2024-01-29 21:21:30 +00:00
Treehugger Robot
e0e733571f Merge "Support mechanism to select a specific version of module sdk prebuilt" into main am: a8a5f64222
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2928483

Change-Id: Id85d6133491bba331bf9ea9b7608a408ccbeedb6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-29 19:46:30 +00:00
Colin Cross
1e5df81f32 Merge "Convert orderfile mutators to TransitionMutator" into main am: 04a59937d2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2925159

Change-Id: If90670f9aecf9925487583a9341fd226a43276f4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-29 19:44:47 +00:00
Treehugger Robot
a8a5f64222 Merge "Support mechanism to select a specific version of module sdk prebuilt" into main 2024-01-29 19:22:57 +00:00
Colin Cross
04a59937d2 Merge "Convert orderfile mutators to TransitionMutator" into main 2024-01-29 18:57:28 +00:00
Hsin-Yi Chen
704c12d0bb Find LLNDK dumps in prebuilts/abi-dumps/vndk
LLNDK will not be finalized at the same time as APEX and NDK. The
dumps have to be placed in a different directory. The new LLNDK dumps
will be created in "vndk" directory.

Test: lunch aosp_x86_64-next-eng ; make
Bug: 314010764
Change-Id: I0726e3eabcfdbfb94a10f01ddd6dfb971552bd50
2024-01-29 16:15:29 +08:00
Yi-Yo Chiang
64702d4fa8 Merge "cc: Vendor modules should NOT derive its "SDK" level from VNDK" into main am: c21f548fd4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2919525

Change-Id: I9bda790ba3bfe28d4c9b9fa2d4941247bc668a68
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-29 04:03:20 +00:00
Yi-Yo Chiang
c21f548fd4 Merge "cc: Vendor modules should NOT derive its "SDK" level from VNDK" into main 2024-01-29 03:14:22 +00:00
Aditya Kumar
ef9c31f8ad Merge "Disable shrink-wrap optimization for arm32 devices Bug: b/319464283 Bug: b/322359235" into main am: 03dcd93ea0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2929651

Change-Id: I1226be4112806286cd006d074fcc95db116c788b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-27 04:32:11 +00:00
Aditya Kumar
03dcd93ea0 Merge "Disable shrink-wrap optimization for arm32 devices Bug: b/319464283 Bug: b/322359235" into main 2024-01-27 03:47:22 +00:00
Spandan Das
2b6dfb554d Support mechanism to select a specific version of module sdk prebuilt
This CL is scoped to cc_* module types. With trunk stable, we will have
multiple prebuilts of the cc modules in
prebuilts/module_sdk/art/<v>/host-exports/, and this CL introduces a
mechanism to use apex_contributions to select a specific versioned
prebuilt when building.

If a soong module is selected using apex_contributions, all rdeps will
get that soong module, which includes
- rdep soong modules which might be depending on it via Android.bp
- Soong's rule builder HostToolPath API

Implementation details: Create a new source_module_name property to
identify the root module. rdeps referring to the root module will get
redirected if necessary. This property also
becomes the stem, if `stem` is not set explicitly.

Bug: 322175508

Test: Added a unit test

Change-Id: Ic8725602c81999621fcb33ce2a57fe4b9751baa8
2024-01-26 23:32:13 +00:00
Treehugger Robot
33605c3fab Merge "Fix the args used to dexpreopt system server jars in prebuilt apexes" into main am: 5a48d4fe3d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2925197

Change-Id: I6001c4ea4220141668612b41515ecfafa7f6aa47
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-26 23:07:59 +00:00
Treehugger Robot
5a48d4fe3d Merge "Fix the args used to dexpreopt system server jars in prebuilt apexes" into main 2024-01-26 21:55:59 +00:00