Commit graph

83954 commits

Author SHA1 Message Date
Wei Li
8778d26c9d Add following directories to Android.mk denylist to block new Android.mk files.
bionic/
development/
device/sample/
prebuilts/
sdk/
test/
trusty/

Bug: 318428689
Change-Id: I327bf354df064a5249edc3e9c846199cde0ce00b
Test: CIs
2024-06-12 21:13:24 +00:00
Jihoon Kang
ce320f86a0 Pass --non-updatable-system flag to aapt2 when versionCode is unspecified
This change modifies the flags passed to aapt2 when generating the APKs.
Currently, the version code of the platform sdk version is passed to
aapt2 when the bp module definition does not explicitly specify the
`--version-code` flag in "aaptflags" parameter. This change modifies
such behavior so that the newly introduced `--non-updatable-system` flag
is passed instead of implicitly passing the `--version-code`.

If "versionCode" is explicitly specified in the app manifest, the
`--non-updatable-system` flag is overriden and is a no-op. This way, the
build continues to stay agnostic to the content of the manifest files.

This flag is not passed for build actions of android_test modules, as
test targets do not set `versionCode`.

Test: m nothing --no-skip-soong-tests &&  manually inspect aapt2 build rules
Bug: 311724570
Change-Id: Ie3e50506d90da1d28b8039e29d76859b1927b5e2
2024-06-12 21:06:36 +00:00
Spandan Das
655a7310d3 Merge "Fix missing missing (min|max)_sdk_version in bootclasspath.pb" into main am: a551b011d0 am: 7e14b86de1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3128893

Change-Id: I014d3aa9cd2723281a821480ab903ad50d656ed2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-12 19:08:04 +00:00
Spandan Das
7e14b86de1 Merge "Fix missing missing (min|max)_sdk_version in bootclasspath.pb" into main am: a551b011d0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3128893

Change-Id: I53df669f35a362252af9825b9f9b37ed09b0e982
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-12 18:52:33 +00:00
Spandan Das
fcea0a8cc4 Add unit test to verify contents of bootclasspath.pb.textproto
The unit test is useful for verifying that
min_sdk_version/max_sdk_version information is populated correctly.
Followup to https://r.android.com/3128893

Bug: 345621958
Test: go test ./apex
Change-Id: Id7696a8cefaab6d0b7f38b65a33e326152ac12d3
2024-06-12 18:22:46 +00:00
Spandan Das
a551b011d0 Merge "Fix missing missing (min|max)_sdk_version in bootclasspath.pb" into main 2024-06-12 18:21:33 +00:00
Spandan Das
306804fe41 Fix missing missing (min|max)_sdk_version in bootclasspath.pb
bootclasspath.pb.textproto of an apex contains
min_sdk_version/max_sdk_version information of its exported libraries.
It is populated using the stateful minSdkVersion/maxSdkVersion
properties of the SdkLibrary module. These were previously indirectly
populated by invoking `module.Library.GenerateAndroidBuildActions(ctx)`,
which has been removed https://r.android.com/3079425.

This CL updates the implementation to use `MinSdkVersion(ctx)` and
`MaxSdkVersion(ctx)` to get the appropriate values directly and not rely
on GenerateAndroidBuildActions.

Bug: 345621958
Test: cat out/soong/.intermediates/packages/providers/MediaProvider/apex/com.android.mediaprovider-bootclasspath-fragment/android_common_apex30/c49cac19acc21350e0f3590de64d2f7f/bootclasspath.pb.textproto
jars {
path: "/apex/com.android.mediaprovider/javalib/framework-mediaprovider.jar"
classpath: BOOTCLASSPATH
min_sdk_version: "30"
max_sdk_version: ""
}
jars {
path: "/apex/com.android.mediaprovider/javalib/framework-pdf.jar"
classpath: BOOTCLASSPATH
min_sdk_version: "30"
max_sdk_version: ""
}
jars {
path: "/apex/com.android.mediaprovider/javalib/framework-pdf-v.jar"
classpath: BOOTCLASSPATH
min_sdk_version: "34"
max_sdk_version: ""
}
// min_sdk_version values were empty previously

Change-Id: Ia547747b16d255c1a093deee96a1abb61fd47dff
2024-06-12 17:12:56 +00:00
Tomasz Wasilczyk
282d938e5f Merge "Enable cmake testing" into main am: ff18ea26f8 am: a5db0203c4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3123791

Change-Id: Ic6f8bfc6aa345d9f21635fecaa4e00f3c980308a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-12 16:19:20 +00:00
Tomasz Wasilczyk
a5db0203c4 Merge "Enable cmake testing" into main am: ff18ea26f8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3123791

Change-Id: Iffdb6bc3bf26d234b331f390a4a8fdccfaa126f8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-12 15:56:09 +00:00
Tomasz Wasilczyk
ff18ea26f8 Merge "Enable cmake testing" into main 2024-06-12 15:37:06 +00:00
Treehugger Robot
fca198efad Merge "build_flag: when printing all flags, sort them." into main am: 0499f2c687 am: 423e5d1c3f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3126513

Change-Id: I0319b26a7e9ebb2551f1cee32abe8968e22ac5e5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-12 03:04:09 +00:00
Treehugger Robot
423e5d1c3f Merge "build_flag: when printing all flags, sort them." into main am: 0499f2c687
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3126513

Change-Id: I8da6d562028cd761c3fbb54213dab56cfb45847e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-12 02:47:28 +00:00
Treehugger Robot
0499f2c687 Merge "build_flag: when printing all flags, sort them." into main 2024-06-12 02:21:23 +00:00
LaMont Jones
5cca1c03c3 Merge changes Ib0f26c98,Ie4e74bce into main am: 0bfb255d26 am: 6c8ea22a94
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3125695

Change-Id: Iadf235264e5eccdb4d189b7fc06e0948cfa77aac
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-12 01:09:08 +00:00
LaMont Jones
6c8ea22a94 Merge changes Ib0f26c98,Ie4e74bce into main am: 0bfb255d26
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3125695

Change-Id: If47c184a80d83e5d84b7f364cd8ffccede059ddb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-12 00:47:35 +00:00
LaMont Jones
0bfb255d26 Merge changes Ib0f26c98,Ie4e74bce into main
* changes:
  build-flag: support `set --redacted=true NAME`
  build-flag: ensure release_config declaration exists
2024-06-12 00:28:15 +00:00
Sam Saccone
aced8afc29 Merge "Only generate kythe xrefs on the primary module" into main am: 6ace4cf906 am: 695908cf6d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3126514

Change-Id: I8b5a24640daff1a5ad620a19379cb3a762b35223
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-11 23:32:59 +00:00
Zi Wang
1b8e0b1e08 [conflict] Merge "PrebuildEtcModule no longer implements OutputFiles method" into main am: 3125b75d5d am: 05ae2e9d35
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/27791354

Change-Id: Ic054c0a0c4edbeb5b8afd395b975bd731724cc18
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-11 23:32:21 +00:00
Sam Saccone
695908cf6d Merge "Only generate kythe xrefs on the primary module" into main am: 6ace4cf906
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3126514

Change-Id: Id836a095e7f3c3f22fca1ed470b832da6677fb59
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-11 23:17:50 +00:00
Android Build Coastguard Worker
2b34a190f8 Snap for 11954976 from f8df32e233 to 24Q3-release
Change-Id: Ib4faf8a67e7cacef0cfa280d90b3f316784603ca
2024-06-11 23:01:00 +00:00
Tomasz Wasilczyk
c3177e0ffc Enable cmake testing
Bug: 302718225
Test: atest binder_sdk_test
Change-Id: Id841d73d11f3b0c75f7bcd523be8ff69300a503e
2024-06-11 13:36:20 -07:00
Sam Saccone
6ace4cf906 Merge "Only generate kythe xrefs on the primary module" into main 2024-06-11 20:23:38 +00:00
mrziwang
8937176646 Use OutputFilesProvider on prebuilt_etc
In the context of incremental soong, the output files
inter-module-communication will be through OutputFilesProvider.
The OutputFileProducer interface will be deprecated.

Test: CI
Bug: 339477385
Change-Id: Ibd64f7e526f39a067ce395b32b87d3fdb117a573
2024-06-11 12:42:24 -07:00
Cole Faust
9decf834ce Only generate kythe xrefs on the primary module
Currently the kythe build is hitting the 6 hour timeout, but we're
generating kythe files for all variants. Generating them only for
the primary variant should drastically cut its runtime.

Bug: 345440993
Test: Presubmits
Change-Id: I3846b25c7f0bc22153e4f0a0cb81c5015854dd70
2024-06-11 11:50:47 -07:00
Zi Wang
05ae2e9d35 [conflict] Merge "PrebuildEtcModule no longer implements OutputFiles method" into main am: 3125b75d5d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3123797

Change-Id: I9acefd1def06cefc153514c766489b341fa86b2e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Ignore-AOSP-First: to resolve merge conflict
2024-06-11 18:18:14 +00:00
Zi Wang
3125b75d5d Merge "PrebuildEtcModule no longer implements OutputFiles method" into main 2024-06-11 16:55:22 +00:00
LaMont Jones
50cf9be45c build_flag: when printing all flags, sort them.
Bug: None
Test: manual
Change-Id: I1d3d6e9d9e56d2987e43e4a41162df4d3c39ad31
2024-06-11 09:52:05 -07:00
Pirama Arumuga Nainar
f8df32e233 Merge "Revert^8 "Upgrade to clang-r522817"" into main am: 658bd0540e am: b2fa85de8c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3122593

Change-Id: Idd424c9272bdf6e253a3d217d7724314d93cee4b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-11 16:46:01 +00:00
Pirama Arumuga Nainar
f63509c666 Merge "Revert^2 "rustc-1.78.0 Build 11910258"" into main am: 44755fa745 am: 812d8de86c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3122592

Change-Id: Ib5d98418959b60b1fddd1e08544837cd0adf034f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-11 16:45:58 +00:00
Tomasz Wasilczyk
bf19c82c05 Merge "cc_cmake_snapshot: fix cc_test and cc_benchmark" into main am: e07a19bc63 am: 273ee50904
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3107165

Change-Id: I031a0b1b20a615b6de0579ea35aada98bb8dbd6b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-11 16:45:25 +00:00
Pirama Arumuga Nainar
b2fa85de8c Merge "Revert^8 "Upgrade to clang-r522817"" into main am: 658bd0540e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3122593

Change-Id: Ib620d6f7dcaf6ceca09d5e554580b64020ba4d03
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-11 16:27:21 +00:00
Pirama Arumuga Nainar
812d8de86c Merge "Revert^2 "rustc-1.78.0 Build 11910258"" into main am: 44755fa745
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3122592

Change-Id: I2e327e174f5265c20217e77cb9a5e9a67e80f71f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-11 16:27:18 +00:00
Tomasz Wasilczyk
273ee50904 Merge "cc_cmake_snapshot: fix cc_test and cc_benchmark" into main am: e07a19bc63
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3107165

Change-Id: I67ae035ef0f008bd5211f6d53543dfb3ab175b3c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-11 16:26:59 +00:00
Pirama Arumuga Nainar
658bd0540e Merge "Revert^8 "Upgrade to clang-r522817"" into main 2024-06-11 16:25:58 +00:00
Pirama Arumuga Nainar
44755fa745 Merge "Revert^2 "rustc-1.78.0 Build 11910258"" into main 2024-06-11 16:25:58 +00:00
Tomasz Wasilczyk
e07a19bc63 Merge "cc_cmake_snapshot: fix cc_test and cc_benchmark" into main 2024-06-11 16:04:36 +00:00
LaMont Jones
fcb2d377ca build-flag: support set --redacted=true NAME
Simplify the process of redacting a flag.

Bug: None
Test: manual
Change-Id: Ib0f26c9846141030e1f23a389044debc9945bbbf
2024-06-11 09:04:26 -07:00
LaMont Jones
6b002a7d08 build-flag: ensure release_config declaration exists
If we are setting a flag for a release config in a map directory that
doesn't yet declare that release config, this map directory needs to
contribute to the release config.

Bug: 345278765
Test: manual
Change-Id: Ie4e74bce008c4c4fdc4bc16e3209f0d9ef9cf8a2
2024-06-11 09:04:26 -07:00
Aleks Todorov
5d2a884fe1 Merge "cc: Make export_include_dirs configurable" into main am: ef0024775f am: 02de5bbcdb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3121811

Change-Id: I39308a9e4b8d5078bdf256ab2c259b39a4d8dfb6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-11 10:34:07 +00:00
Aleks Todorov
02de5bbcdb Merge "cc: Make export_include_dirs configurable" into main am: ef0024775f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3121811

Change-Id: Ib96a58e5b518dfbce6697a9b04de8262dceb3c2b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-11 10:11:19 +00:00
Aleks Todorov
ef0024775f Merge "cc: Make export_include_dirs configurable" into main 2024-06-11 09:09:30 +00:00
Yi Kong
95cae90ef1 Merge changes from topic "optimize_for_size" into main am: cdb8501c1e am: cf31e84a70
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3117077

Change-Id: I5916fa2f21b582f651739eee92bb2d67073269f1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-11 06:25:33 +00:00
Yi Kong
644008ad11 Add "Optimize_for_size" build property am: 5786f5cf1d am: 80064849a9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3104777

Change-Id: Ie8af51993991bab5d2543dace19ffc0488dcedf6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-11 06:25:27 +00:00
Yi Kong
cf31e84a70 Merge changes from topic "optimize_for_size" into main am: cdb8501c1e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3117077

Change-Id: Iae0bf8dac76fcf99171d08e5ac4279c0ddb16586
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-11 06:11:15 +00:00
Yi Kong
80064849a9 Add "Optimize_for_size" build property am: 5786f5cf1d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3104777

Change-Id: Ieab64511ca45501f0d3798ec66f3a0ec2a7922e0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-11 06:11:11 +00:00
Yi Kong
cdb8501c1e Merge changes from topic "optimize_for_size" into main
* changes:
  Enable MLGO inliner optimization for optimize_for_size cases
  Add "Optimize_for_size" build property
2024-06-11 05:38:13 +00:00
Kiyoung Kim
09f3134b1f Merge "Remove VNDK related code from Soong" into aosp-main-future am: d605f683ef
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/27680216

Change-Id: I848b8138cbafdb79917d74207001548364779383
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-11 01:03:44 +00:00
Kiyoung Kim
d605f683ef Merge "Remove VNDK related code from Soong" into aosp-main-future 2024-06-11 00:28:41 +00:00
Zi Wang
4b29058030 Merge "Use OutputFilesProvider on sh_binary" into main am: 7524af662b am: 1d9fd2159d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3123214

Change-Id: If27e468d7d933261e71e9c1d6705f1c30ee3b145
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-10 23:06:36 +00:00
Android Build Coastguard Worker
85be7789e8 Snap for 11949167 from d7db3a3e5b to 24Q3-release
Change-Id: I308e3d1681e9ff6ac5dc14fbb73175cf3ad330f9
2024-06-10 23:00:58 +00:00