Commit Graph

82326 Commits

Author SHA1 Message Date
Spandan Das
50801e20a3 Support min_sdk_version overrides in apexes
The use case for this are go apexes which are only installed in T and
above, even though the base AOSP apexes might be installable on < T
devices.

If provided, the overridden min_sdk_version will be
1. Used as the `min_sdk_version` in the manifest file of the
   top-level override apex binary
2. Used to build the transitive closure of its dependency with that
   min_sdk_version, i.e. with a different apex variant.

(2) requires some special handling. At ToT, the outgoing transition
value is the base apex name (e.g. com.android.foo). Since
min_sdk_version of the overridding apex can be different than the
overridden apex, the base apex name is no longer sufficient. Instead,
transition to the name of the overriding apex com.mycompany.android.foo.
If deduping is possible, transitive deps will get deduped to
`apex_<min_sdk_version>` later.

Test: added a unit test
Test: in internal, modified min_sdk_version of com.google.android.go.art
locally, built BA and Go apexes, and used `aapt2 dump badging` to verify
that BA has minSdkVersion of 31 and Go has minSdkVersion of 33

Bug: 295311875

Change-Id: Ifbe123d1517fccbc0c058042b8a6eeb3609b6787
2024-05-20 16:24:52 +00:00
Jiyong Park
e604378aed Add multilib.prefer32.deps to packaging base
The property is used to prefer the 32-bit variant of a dep over the
64-bit variant. If 64-bit variant is the only available one, it is
depended on.

This will be used to include 32-bit preferred modules like drmserver and
mediaserver in filesystem modules.

Bug: N/A
Test: go test ./... under soong/android

Change-Id: Ic7185eb2044c9987f8d1e9b6cf7f0dbd235cf04c
2024-05-20 16:47:44 +09:00
Yi Kong
9b9d29b845 Turn off relaxed-template-template-args as a workaround
ToT switched on "relaxed-template-template-args" by default. This does
not work with our outdated libc++. Turn it off until we have the new
libc++.

Test: build with Kokoro ToT Clang (build 2417)
Bug: 341084395
Bug: 332594828
Change-Id: I994c476c1f7b4abd81e5ae0bde4e1f9afd1aa920
2024-05-20 02:48:42 +09:00
Joe Onorato
5bcd43ed50 Make refreshmod a script instead of a shell function
Bug: 340648588
Test: refreshmod
Change-Id: I757fc442fb8161d99ddbcbc9ecb4d3d501c6a727
2024-05-18 07:57:01 -07:00
Joe Onorato
9a0a2fcb11 Convert envsetup.sh shell functions to scripts.
Bug: 340648588
Test: Run them
Change-Id: I19303ac08bd98619f0a8ee4ee5efb6d735538578
2024-05-18 07:56:54 -07:00
Treehugger Robot
ad3f5045dc Merge "deps in the packaging modules supports select" into main am: bd6b1fcab4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3093680

Change-Id: I52e1761924e73aff22197c426641c691d41770d2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-18 04:09:36 +00:00
Treehugger Robot
bd6b1fcab4 Merge "deps in the packaging modules supports select" into main 2024-05-18 03:47:33 +00:00
Jiyong Park
023c76dead Merge "Select supports product_variable("debuggable")" into main am: 93a7a6dfe4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3093679

Change-Id: I310662a25241f2d6fb74c6a231bfd51fd0b75449
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-18 00:03:18 +00:00
Jiyong Park
105e11ca12 deps in the packaging modules supports select
deps: ["foo"] + select(product_variable("debuggable") {
    true: ["bar"],
    default: [],
}),

returns ["foo", "bar"] on debuggable builds, and ["foo"] on user builds.

Bug: N/A
Test: go test ./...
Change-Id: I31ca22e69e3316e4007a36ae13c04c7e5c445907
2024-05-18 08:44:58 +09:00
Jiyong Park
93a7a6dfe4 Merge "Select supports product_variable("debuggable")" into main 2024-05-17 23:40:14 +00:00
Yu Shan
ac1562ed60 Merge changes from topic "revert-3088867-QEHDREAABY" into main am: 4978080b1d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3094658

Change-Id: I2b51df4e0ec83d6c00d2e48d9e6e2fe9c10507fa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-17 23:12:48 +00:00
Yu Shan
4978080b1d Merge changes from topic "revert-3088867-QEHDREAABY" into main
* changes:
  Revert "Install jni symlinks in Soong"
  Revert "APK-in-APEX should set use_embedded_native_libs: true"
  Revert "Add make java.dependencyTag installable or not"
  Revert "Refactor how jni_libs dependencies are added"
2024-05-17 22:55:51 +00:00
Spandan Das
c2452d90ad Merge "Disable monolithic hiddenapi flags generation for non java devices." into main am: d700486907
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3089366

Change-Id: I0ddba09be3cef955d66d7788d80d94dc242e46b0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-17 21:38:27 +00:00
Spandan Das
b9c58350ca Support min_sdk_version overrides in apps
This replaces the global override of min_sdk_version (via
`APEX_GLOBAL_MIN_SDK_VERSION_OVERRIDE`) with an min_sdk_version override
that can be set by each individual soong override_app.

The use case for this are go apps which are only installed in T and
above, even though the base AOSP apexes might be installable on < T
devices.

Test: added a unit test

Bug: 295311875
Change-Id: Ie2e738a6786bb24417c675617f7c78358017c96c
2024-05-17 21:15:04 +00:00
Spandan Das
d700486907 Merge "Disable monolithic hiddenapi flags generation for non java devices." into main 2024-05-17 21:11:31 +00:00
Yu Shan
b7646e4d4f Revert "Install jni symlinks in Soong"
Revert submission 3088867

Reason for revert: On cf_auto build, we are seeing a symlink of jni lib pointing to lib64/libcarservicejni.so, which does not exist on the device.

Reverted changes: /q/submissionid:3088867
Bug: b/341335305

Change-Id: Ie4ff26fe47e1a0ab5e97b185c61cb94473cc5fb8
2024-05-17 13:37:37 -07:00
Yu Shan
d5e435d749 Revert "APK-in-APEX should set use_embedded_native_libs: true"
Revert submission 3088867

Reason for revert: On cf_auto build, we are seeing a symlink of jni lib pointing to lib64/libcarservicejni.so, which does not exist on the device.

Reverted changes: /q/submissionid:3088867
Bug: b/341335305

Change-Id: I3064caef0cb55d1594951835a1173c667f58e607
2024-05-17 13:37:30 -07:00
Yu Shan
f14b5ba863 Revert "Add make java.dependencyTag installable or not"
Revert submission 3088867

Reason for revert: On cf_auto build, we are seeing a symlink of jni lib pointing to lib64/libcarservicejni.so, which does not exist on the device.

Reverted changes: /q/submissionid:3088867
Bug: b/341335305

Change-Id: I60052dbb004df58fdfaf93be6089769ab2a670fc
2024-05-17 13:37:20 -07:00
Yu Shan
562d9054e5 Revert "Refactor how jni_libs dependencies are added"
Revert submission 3088867

Reason for revert: On cf_auto build, we are seeing a symlink of jni lib pointing to lib64/libcarservicejni.so, which does not exist on the device.

Reverted changes: /q/submissionid:3088867
Bug: b/341335305

Change-Id: Ibda68b268e74ffca1840faae01a2f3fe2e00be30
2024-05-17 13:37:07 -07:00
Priyanka Advani
0b4f1a337a Merge "Revert "Enable -Wfortify-source"" into main am: 99d9068bfc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3093509

Change-Id: Id15663d74cbda38d318bce7d3af820bec25ff8c6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-17 20:24:45 +00:00
Priyanka Advani
99d9068bfc Merge "Revert "Enable -Wfortify-source"" into main 2024-05-17 20:07:50 +00:00
Priyanka Advani
89ed157a2f Revert "Enable -Wfortify-source"
This reverts commit 4412723f63.

Reason for revert: Droidmonitor triggered revert due to build breakage in b/341339765. 

Change-Id: Id2880f6c0e38504f1adace5e4dab3fd7f6b9b792
2024-05-17 19:42:55 +00:00
Aditya Kumar
222a727b66 Merge "Enable -Wfortify-source" into main am: 6c9f524953
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3080156

Change-Id: I3c123780d38864895de16cfa412d5170ad519929
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-17 19:21:54 +00:00
Aditya Kumar
6c9f524953 Merge "Enable -Wfortify-source" into main 2024-05-17 18:58:08 +00:00
Ivan Lozano
b86eaab1d9 Merge "rust: Add an option to disable LTO for Rust" into main am: 9b2422d890
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3087691

Change-Id: Ia8b5a6f0ccb636af735246708b7cf097ee4305bf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-17 17:59:21 +00:00
Ivan Lozano
9b2422d890 Merge "rust: Add an option to disable LTO for Rust" into main 2024-05-17 17:44:48 +00:00
Colin Cross
c8c1e89360 Merge "Reapply "Convert overrides to a TransitionMutator"" into main am: 229b0098bd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3086645

Change-Id: I9e65bb0863edf0f96457126f707fe77a0a4ac59e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-17 15:14:28 +00:00
Colin Cross
229b0098bd Merge "Reapply "Convert overrides to a TransitionMutator"" into main 2024-05-17 14:56:18 +00:00
Ivan Lozano
ab58647b2e rust: Add an option to disable LTO for Rust
This adds an option to disable LTO when building a Rust module. This is
mostly intended to speedu p local prototyping, and LTO should not
normally be disabled for production builds.

Bug: 339628497
Test: m blueprint_tests && m rust
Change-Id: I21d5d4513a259a56f101ce8906e2bef7404e4efb
2024-05-17 10:11:57 -04:00
Ivan Lozano
5345113a86 Merge changes from topic "rust-made-to-order-staticlibs" into main am: e8fcd37775
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3080891

Change-Id: I250889f5be7ffc0b118797c804c0d7b8f06f66c3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-17 13:00:36 +00:00
Ivan Lozano
e8fcd37775 Merge changes from topic "rust-made-to-order-staticlibs" into main
* changes:
  rust: made-to-order rust staticlibs
  rust: refactored transformSrctoCrate
2024-05-17 12:40:36 +00:00
Jiyong Park
e325075163 Select supports product_variable("debuggable")
Bug: N/A
Test: run soong test with the next change
Change-Id: Id7a83961dc9f47191135219f0cea2c02b64a1666
2024-05-17 16:09:32 +09:00
Jiyong Park
1c7939a0c9 Merge "filesystem modules gathers first target only" into main am: 4332f7bf9e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3091206

Change-Id: I8dff2a1e410bf135879b5a46945453f81176d41a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-17 07:07:11 +00:00
Jiyong Park
4332f7bf9e Merge "filesystem modules gathers first target only" into main 2024-05-17 06:52:00 +00:00
Yi Kong
67ced9c270 Merge "Revert^5 "Upgrade to clang-r522817"" into main am: 728e9178bd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3092263

Change-Id: I30d1b08f49227c31cd1103b65c59790a8b521189
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-17 03:21:53 +00:00
Yi Kong
728e9178bd Merge "Revert^5 "Upgrade to clang-r522817"" into main 2024-05-17 03:06:24 +00:00
Jiyong Park
fcff59eabc Merge changes I1bc9ceb8,I9b1c7809,I836171aa,I0930cb1e into main am: 4e8ab4e103
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3088867

Change-Id: Ice027db615ec6abf4cb9889e9d23d23f59116389
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-17 02:58:04 +00:00
Jiyong Park
4e8ab4e103 Merge changes I1bc9ceb8,I9b1c7809,I836171aa,I0930cb1e into main
* changes:
  Refactor how jni_libs dependencies are added
  Add make java.dependencyTag installable or not
  APK-in-APEX should set use_embedded_native_libs: true
  Install jni symlinks in Soong
2024-05-17 02:44:31 +00:00
LaMont Jones
b44b31915a Merge "rename workflow enum for lint" into main am: 6afa342b2e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3092264

Change-Id: I00158217692c5f393d75da0ef1c63063358fff63
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-17 00:59:48 +00:00
LaMont Jones
cb6c212aa4 Merge "export list of files used by the release config" into main am: 97dd1c0f09
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3092261

Change-Id: I3227a0cf81babc31e665e152a5bd60c7cbf14e39
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-17 00:59:20 +00:00
LaMont Jones
6afa342b2e Merge "rename workflow enum for lint" into main 2024-05-17 00:49:21 +00:00
LaMont Jones
97dd1c0f09 Merge "export list of files used by the release config" into main 2024-05-17 00:40:54 +00:00
Cole Faust
bad5697e7d Merge "Add support for prebuilt_overlay module type in soong" into main am: e9478ea842
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3090487

Change-Id: I773162db886e1569a63a8fdfa71fb6024f9a76ca
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-17 00:27:55 +00:00
Cole Faust
e9478ea842 Merge "Add support for prebuilt_overlay module type in soong" into main 2024-05-17 00:21:04 +00:00
Spandan Das
52c8d9524d Merge "Align boot jar exclusion with apex_contributions" into main am: 42e1fc8d1e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3073624

Change-Id: I391b1b97153fd198ffab84cf2be3597763942bd0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-16 23:58:48 +00:00
Spandan Das
42e1fc8d1e Merge "Align boot jar exclusion with apex_contributions" into main 2024-05-16 23:57:13 +00:00
LaMont Jones
2efc8e2e82 rename workflow enum for lint
Bug: 339672075
Test: manual
Change-Id: I55f7fff9f1f367e13566fc23fb5379f6732a8e8d
2024-05-16 16:08:56 -07:00
LaMont Jones
693c703ab3 export list of files used by the release config
Also use a different name for the output.

Bug: 341117082
Bug: 328495189
Bug: 339707888
Test: manual, TH
Change-Id: Ib98d487f57cf8b55dff61a7969139a6e199fee90
2024-05-16 15:47:01 -07:00
Priyanka Advani
55d4abde48 Revert^5 "Upgrade to clang-r522817"
This reverts commit 0135499554.

Reason for revert: Droidmonitor triggered revert due to b/341148479 and b/341138217. Will be verifying through ABTD before submission.

Change-Id: I22e069178dfda0b1791bd77c908afff8cb87bf26
2024-05-16 22:00:02 +00:00
Yi Kong
55e202cc20 Merge "Revert^4 "Upgrade to clang-r522817"" into main am: aac481527e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3074031

Change-Id: I52bcfba7c9b916d8fc4486352076d90592460dab
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-16 18:21:10 +00:00