Commit Graph

1440 Commits

Author SHA1 Message Date
Treehugger Robot
3aca762ba7 Merge changes from topic "ctx_in_ideinfo" into main am: 9cbbafe300 am: e1028aa539
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3246818

Change-Id: Id12e0cbdeba1d100d7c755fbcf4336bc1f7c0554
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-28 01:01:20 +00:00
Treehugger Robot
9cbbafe300 Merge changes from topic "ctx_in_ideinfo" into main
* changes:
  Add ctx argument to IDEInfo()
  Add configurable property support to neverallow
2024-08-28 00:49:13 +00:00
Cole Faust
b36d31d870 Add ctx argument to IDEInfo()
The IDEInfo() methods read properties. To make those properties
configurable, we need a context to evaluate them with.

Bug: 362579941
Test: m nothing --no-skip-soong-tests
Change-Id: I26d4b7084439b3006e50b02277298f74a929e1aa
2024-08-27 16:04:28 -07:00
Treehugger Robot
dc9fe3495d Merge "Add a property to rust_ffi targets to exclude them from APEXes." into main am: a5762dd78b am: 8617c2d1bc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3236101

Change-Id: I152db50a2663efbc644edeadc41873644eb591ce
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-27 20:31:13 +00:00
Ashutosh Agarwal
46e4fad202 Add a property to rust_ffi targets to exclude them from APEXes.
This is a temporary measure until stubs are properly supported by rust_ffi targets.

Bug: 361441210
Bug: 362509506
Change-Id: Ieabd4e3abf442de660f39ec6c5776f5832b25e14
Test: manual
2024-08-27 17:13:12 +00:00
Spandan Das
2dc873402e Merge "Move installation rules of dexpreopt'd apex systemserver jars to soong" into main am: 18c2607bde am: 3f90d0bfe6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3237119

Change-Id: I3ee21598635a4c6628e47357ff06a54dceaeda23
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-26 22:45:33 +00:00
Spandan Das
18c2607bde Merge "Move installation rules of dexpreopt'd apex systemserver jars to soong" into main 2024-08-26 22:27:57 +00:00
Spandan Das
746161db0c Move installation rules of dexpreopt'd apex systemserver jars to soong
This will eventually allow us to build devices by skipping `katiBuild`
and moving straight to `katiPackaging`.

Implementation details
- Replace ctx.PackageFile with ctx.InstallFile. These makes these rules
  available to both make and soong packaging systems. This will be done
inside d.dexpreopt function
- Add InstallDepNeeded on the dependency tags in this chain
(apex --> sscp_fragment --> (java_library|java_sdk_library)). This is
necessary for the soong packaging system.
- Remove `LOCAL_SOONG_INSTALLED_MODULE=""`. A non-empty string ensures
  that kati honors the installation rules generated by soong.

Bug: 355509400
Test: lunch aosp_cf_x86_64_phone-trunk_staging-userdebug (mainline source)
Test: lunch cf_x86_64_only_phone-ap3a-userdebug (mainline prebuilts)
(no diff in system_intermediates/file_list.txt in both cases)

Change-Id: I190a919e9480e7d9981a6b9b96a50d9c33ceea02
2024-08-26 20:58:10 +00:00
Cole Faust
9a8df16ac3 Merge "Make native_shared_libs configurable" into main am: 5fdb54d439 am: c6c90e61a9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3233522

Change-Id: I1c7d71b2b5d5e6000acbefd7dc2f2a187b83ed25
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-20 23:12:51 +00:00
Treehugger Robot
40c2548b66 Merge "apex: apex_available with prefix" into main am: d4daa43150 am: 7af3d43dfb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3223005

Change-Id: I5aecf775722fd2fdd209adb9d1e6a492d544032b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-20 21:46:49 +00:00
Cole Faust
ac92f3e3f4 Make native_shared_libs configurable
So that you can use selects with it.

This cl also creates a ResolvedApexNativeDependencies to represent
a merged and evaluated set of ApexNativeDependencies. Previously other
properties added their own "resolved" versions individually, but I
think it's better design for the property structs to remain unchanged,
so I created a new non-property struct to contain the resolved values.
Immutable property structs is one of the things we want to add for
performance (removing property struct copies).

Bug: 342006386
Test: Presubmits
Change-Id: Ibf222c4a7c01df7d5ccc5a85b2e3c9b3f9243b9a
2024-08-20 13:26:52 -07:00
Jooyung Han
9a419e28f5 apex: apex_available with prefix
We now support prefix form (com.foo.*) in apex_available list.

Bug: 360265761
Test: m --no-skip-soong-tests
Change-Id: I50ab884651dd6321950cfd4563b59ef3ed0f07fd
2024-08-20 10:50:04 +09:00
Kiyoung Kim
e43049d38a Merge "Introduce vintf_fragment module type" into main am: dd00f2de3c am: a1d5004a0f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3213372

Change-Id: I9cd4a450e7e56268bee2177f687f79271ccdcd14
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-16 00:59:21 +00:00
Kiyoung Kim
faf6af31cd Introduce vintf_fragment module type
Introduce a new vintf_fragment module type which handles vintf_fragment
files within Soong. This will help process to move vintf_fragment
handling logic from KATI to Soong. This change also introduces
vintf_fragment_modules property to mark dependency with vintf_fragment
modules.

Bug: 322089980
Test: m nothing --no-skip-soong-tests passed
Change-Id: I49607f42aeee3ded0ba7b078b903dc35f5d61637
2024-08-14 10:34:41 +09:00
Treehugger Robot
21207540b8 Merge "Cleanup configurable getter usages" into main am: c6f1fe0861 am: d1fb3378ca
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3198402

Change-Id: Ic646cc1686db7b39f74f26badf5dc1a6b6602689
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-29 21:35:41 +00:00
Cole Faust
bf1d92ad20 Cleanup configurable getter usages
You don't have to call module.ConfigurableEvaluator(ctx) if ctx is
already a ModuleContext, you only need to do that for more restricted
contexts like SingletonContext.

Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I7612290d43dae7decfae283a341882d9016c98a3
2024-07-29 12:24:25 -07:00
Treehugger Robot
a982857a81 Merge changes from topic "avf_apex_android_bp_select" into main am: 6899b7ed22 am: ccae8282a5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3189226

Change-Id: I29bb1619b0cee82af9bdfadcc7b4ecd338cebd1f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-25 02:43:13 +00:00
Inseob Kim
40b64b4096 Make some apex properties configurable am: b114234f6b am: 5402171253
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3189224

Change-Id: I6087622d56958fe1b61f5492f03b6b5eeb6c65b1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-25 02:43:08 +00:00
Inseob Kim
d23e0d3244 Make more apex properties configurable
This allows using select statements with these.

* apps
* binaries
* prebuilts

Bug: 354824866
Test: m --no-skip-soong-tests
Change-Id: I8e28937d2fa6514b41bd189f56f9f584a60d2c80
2024-07-25 00:55:38 +00:00
Inseob Kim
b114234f6b Make some apex properties configurable
This allows using select statements with these.

* androidManifest
* canned_fs_config
* systemserverclasspath_fragments

Bug: 354824866
Test: m
Change-Id: I4c2182944ec14d99332f437c39a19ba0dc6b7731
2024-07-25 00:55:05 +00:00
Treehugger Robot
c156e5c955 Merge "Remove allowlist for updatable modules with current min_sdk_version" into main am: dd9b0c1be8 am: ff8b90d92e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3180441

Change-Id: Ibe54341384f6f36af3822fb8148e8a211bb0ddee
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-19 17:45:27 +00:00
Treehugger Robot
dd9b0c1be8 Merge "Remove allowlist for updatable modules with current min_sdk_version" into main 2024-07-19 17:04:57 +00:00
Colin Cross
bcc87ab14e Merge changes from topic "elide_empty_variants" into main am: ea1b3b78b8 am: ec6c8ca013
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3163861

Change-Id: I28cdcce6304d242b19edba8646f827f446df00f9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-18 17:50:58 +00:00
Colin Cross
ea1b3b78b8 Merge changes from topic "elide_empty_variants" into main
* changes:
  Convert sdk mutator to TransitionMutator
  Convert link mutator to TransitionMutator
  Convert version mutator to TransitionMutator
  Convert python_version mutator to TransitionMutator
  Convert rust_libraries and rust_stdlinkage mutators to TransitionMutators
2024-07-18 17:37:38 +00:00
Colin Cross
8a49a3dd76 Convert rust_libraries and rust_stdlinkage mutators to TransitionMutators
Replace rust.LibraryMutator and rust.LibstdMutator with
TransitionMutators.

Bug: 319288033
Flag: EXEMPT refactor
Test: all soong tests pass
Test: no change to build.ninja
Change-Id: Ia24a582119d39889279d7b93bac9259685153619
2024-07-17 15:50:36 -07:00
Spandan Das
32c93a3f3c Remove allowlist for updatable modules with current min_sdk_version
All existing violations have been cleaned up.

Bug: 221087384
Test: presbumits
Change-Id: Iefe318d9372d4078f21b03e0d9003609cca069ab
2024-07-17 20:31:58 +00:00
Treehugger Robot
53ad20c491 Merge "Min_sdk_version check for updatable apexes" into main am: 0adcc8c83d am: 03042b57a0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3156080

Change-Id: Ic9c99a819610af549b95f9546df39ea657b052af
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-16 19:45:38 +00:00
Treehugger Robot
0adcc8c83d Merge "Min_sdk_version check for updatable apexes" into main 2024-07-16 19:09:03 +00:00
Treehugger Robot
536fad002b Merge "Remove apex.use_vndk_as_stable" into main 2024-07-15 02:03:15 +00:00
Colin Cross
5e4ab3379b Add IsAddingDependency to IncomingTransitionContext am: e1a8555581 am: 4a6b31a65e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3141802

Change-Id: Ia16e9ef02996ce4d2b2a59383fd638d42b66a5d5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-12 00:52:08 +00:00
Colin Cross
e1a8555581 Add IsAddingDependency to IncomingTransitionContext
Add an IsAddingDependency method to IncomingTransitionContext that
returns true if IncomingTransition is called after the transition
has already won while adding a new dependency.  This will be used
as part of the transition mutators to support an apex use case where
incoming dependencies during the initial apex mutator need to be
rewritten onto the platform variant for modules that don't support
the apex, but a later call to OtherModuleDependencyVariantExists
must not rewrite the requested apex variation onto the platform
variant.

This should be used sparingly, all uses will have to be removed in
order to support creating variants on demand.

Bug: 319288033
Test: TestIsAddingDependency
Flag: EXEMPT refactor
Change-Id: Ib8e419d35ff8f7cbff9667c1cd40d05ccfacab8b
2024-07-11 16:59:34 -07:00
Colin Cross
8cd1fa9d0a Merge "Remove test_per_src" into main am: 088123934b am: d66ec63bde
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3142038

Change-Id: I0aab777c604498195d67bf8e70f338f3b373210c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-11 21:07:57 +00:00
Colin Cross
088123934b Merge "Remove test_per_src" into main 2024-07-11 20:32:23 +00:00
Jooyung Han
eafa8fb9fe Remove apex.use_vndk_as_stable
Ignore-AOSP-First: used in other branches.
Change-Id: I48367ed265410d779eb7a7c6629cee752e6f6c81
Fixes: 350644693
Test: m (no changes)
2024-07-11 06:52:21 +00:00
Jooyung Han
041fd84523 Remove apex.generate_hashtree
It's deprecated.

Ignore-AOSP-First: internal branches use this. Will be gone.
Fixes: 184914612
Test: m
Change-Id: I14316a9a288ffc2727bb7033ebded4f4d48b1e6c
2024-07-04 13:06:17 +09:00
Jooyung Han
b19a0dd90a Remove apex.use_vndk_as_stable
Since VNDK is gone now, the property has no meaning. Will remove the
property after removing all the references(there're no-op for now).

Bug: 350644693
Test: m
Change-Id: I85637ede5534a3b993ac12656e4aba8d945fec14
2024-07-02 16:47:31 +09:00
Spandan Das
ca1d63eac3 Min_sdk_version check for updatable apexes
Updatable apexes should not min_sdk_version to `current`, since
`current` can have different meanings based on when plaform finalization
happens.

Test: m nothing --no-skip-soong-tests
Bug: 221087384
Change-Id: I04aaa4a331027b7afbf6ccdb9cbf3ae670827c9f
2024-07-02 03:16:25 +00:00
Colin Cross
3a02c7ba1a Remove test_per_src
Remove test_per_src, it never worked well and is incompatible
with all of the test infrastructure.  Uses in the platform have
been removed, generally by replacing them with individual cc_test
modules.

Test: builds
Flag: TEST_ONLY
Change-Id: I257c035da35ca8358ae9423b46453878f54efeb1
2024-06-28 10:31:05 -07:00
Dmitrii Ishcheikin
aaec2d5e93 Merge "Add imgdiag ART APEX" into main 2024-06-26 16:54:13 +00:00
Jihoon Kang
79b0eef5a1 Merge "Move vendor and product variant generation logic from cc package to android package" into main 2024-06-21 18:16:31 +00:00
Jihoon Kang
47e918450f Move vendor and product variant generation logic from cc package to android package
Although image variation generation logic has moved out of cc package to
the android package, the vendor and product partition variants
generation logic is still specific to cc package. Therefore, in order to
create a product or vendor variant, they have to specified in
`ExtraImageVariants`. In order to avoid such confusing behaviors and
enforce modules to specify product and vendor installation rules, this
change moves the vendor and product variant generation logic to
android.ImageInterface.

Test: m nothing --no-skip-soong-tests && diff contents of out/soong/Android-{product}.mk
Change-Id: I9e14f3739d9dea94167ee6a91e92b2f942055aba
2024-06-21 07:45:09 +00:00
mrziwang
e7ec89e0a9 ExportableModule no longer implements OutputFileProducer
multitree.ExportableModule no longer implements
android.OutputFileProducer

In the context of incremental soong, the output files
inter-module-communication will be through OutputFilesProvider.
The OutputFileProducer interface will be deprecated.

ApiSurface and apexBundle are included in this change.

Test: CI
Bug: 339477385
Change-Id: I9247bb2dfed270a879f8bc96c6aa06803fde0150
2024-06-20 16:19:48 +00:00
Treehugger Robot
c0cbb491d5 Merge "Use BaseApexName to generate permission file for sdk library" into main 2024-06-19 04:29:18 +00:00
Spandan Das
33bbeb243f Use BaseApexName to generate permission file for sdk library
Permissions of apex variants of shared java sdk libraries should use the
base apex name (com.android.foo) and not the override apex name
(com.mycompany.android.foo). The override apex name started being used
when separate variants were created for override apex transitive deps
(https://r.android.com/3083813)

Bug: 346486531
Test: m com.google.android.ipsec
Test: verified that
out/target/product/<product>/apex/com.google.android.ipsec/etc/permissions/android.net.ipsec.ike.xml
contains /apex/com.androiqd.ipsec/javalib/android.net.ipsec.ike.jar #
previously it contained com.google.android.ipsec

Test: https://android-build.corp.google.com/builds/abtd/run/L59900030004679761
Change-Id: I863170d78efa017bef5e4ece3b1471f74ba84b0c
2024-06-19 04:27:43 +00:00
Cole Faust
ecdb25e674 Merge "Make required a configurable property" into main 2024-06-18 18:05:41 +00:00
Cole Faust
43ddd08bd2 Make required a configurable property
So that users can use select statements with it.

Fixes: 347605145
Bug: 342006386
Test: m nothing --no-skip-soong-tests
Change-Id: Ica0ca6d1725b000b3748c0293e5a9f9b38ed87f9
2024-06-17 12:32:40 -07:00
Treehugger Robot
0adcd9aefa Merge "Call PackageFile for dexpreopt files of APEX bundles." into main am: 9034af498e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3128073

Change-Id: I40cce87cc466de96df45e05c9a6cf7b073725ec8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-13 21:49:51 +00:00
Justin Yun
613bdc5b64 Call PackageFile for dexpreopt files of APEX bundles.
Soong generates AndroidMk modules and Make installs the required
dexpreopt files for APEX bundles. This dependency is not tracked by
the soong and missing from the soong filesystem.
Call PackageFile for the dexpreopt files of APEX bundles to install
the files in the soong-built system image.

Bug: 346439786
Test: lunch aosp_cf_x86_64_phone-trunk_staging-userdebug \
      && m aosp_cf_system_x86_64
Change-Id: I6af4afe5b3183c89bf687ac779007b87e1d7e948
2024-06-13 12:37:04 +09: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
Kiyoung Kim
d605f683ef Merge "Remove VNDK related code from Soong" into aosp-main-future 2024-06-11 00:28:41 +00:00