Commit Graph

8382 Commits

Author SHA1 Message Date
Treehugger Robot
f2760f4c28 Merge "Support more variables for "debuggable"." into main am: 7d45f55991
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3175361

Change-Id: I8e6eabaf338a504dec87afb82f2b7e62beab8e73
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-17 02:13:34 +00:00
Treehugger Robot
7d45f55991 Merge "Support more variables for "debuggable"." into main 2024-07-17 01:56:59 +00:00
Zi Wang
dbd49ec529 Merge "Remove OutputFileProducer" into main am: 03b228e725
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3174799

Change-Id: Ib058bd29759c588ccb9e1487472572013e2c806e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-16 16:23:01 +00:00
Zi Wang
03b228e725 Merge "Remove OutputFileProducer" into main 2024-07-16 15:58:46 +00:00
Herbert Xue
38178329e5 Support more variables for "debuggable".
Enhance bp feature to support
"product_variables.debuggable.exclude_static_libs" and
"product_variables.debuggable.jni_libs".

Bug: 325857852
Test: lunch akita-trunk_staging-userdebug && m ConnectivityMonitor
Change-Id: Iae843af2d41ec7754812a0b89a7ebc791c58e099
2024-07-16 17:29:27 +08:00
Inseob Kim
0907530205 Merge changes from topic "cf_system_root_files" into main am: 0c71fa987f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3166519

Change-Id: I1069ef320148f8f9fa615e98a10f10aaadcc28a2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-16 05:11:10 +00:00
Inseob Kim
0c71fa987f Merge changes from topic "cf_system_root_files" into main
* changes:
  Add support installing to root of filesystem image
  Add install_in_root to prebuilt_root module
2024-07-16 04:52:08 +00:00
Treehugger Robot
fd440d75e5 Merge changes I861a60e1,I01bf99fa,I9d16dfec into main am: 9678733731
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3150116

Change-Id: I3745d3347b71ef589a74366f449041b0391d64a5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-16 01:06:07 +00:00
Treehugger Robot
9678733731 Merge changes I861a60e1,I01bf99fa,I9d16dfec into main
* changes:
  Add util method HasIntersection(...)
  Implement InstallableModule for Java modules
  Collect container informations
2024-07-16 00:43:04 +00:00
Jihoon Kang
b7e1a48376 Add util method HasIntersection(...)
Introduces a util method `HasIntersection(...)`, which returns true if
the two input lists have non-empty intersection.

Test: m nothing --no-skip-soong-tests
Bug: 338660802
Change-Id: I861a60e1973c92a773c127dfc595ad7514d7972f
2024-07-15 23:46:45 +00:00
Jihoon Kang
c3d4e115af Collect container informations
This change introduces a method to collect the information of what
containers (i.e. api domain, partition, or any custom defined boundaries
of interest) the module belongs to. The method is called in
`ModuleBase.GenerateBuildActions`.

Each container objects defines the following:
- name of the container
- list of "restrictions", which are the containers that a module that
  belongs to this container is not allowed to depend on. Each
  "restrictions" also defines custom rules which allow bypassing the
  restricted dependency. Each rules are an enum that are mapped to a
  function, given that functions are not hashable and thus cannot be set
  as a value in a provider.

Note that this change is a no-op, as the container information is only
collected for modules that implement the "InstallableModule" interface,
which is not implemented by any other module types in this change. This
will be utilized in the follow-up changes.

Test: m nothing --no-skip-soong-tests
Bug: 338660802
Change-Id: I9d16dfec0dcf06da464aa49ee7b23f46f1da236a
2024-07-15 23:43:36 +00:00
mrziwang
d38e63d474 Remove OutputFileProducer
All the module types that were using OutputFileProducer
are using OutputFilesProvider now. This CL removes the
remaining OutputFileProducer code.

Test: CI
Bug: 339477385
Change-Id: I3c29785a59b907117b16ca2d0e56ef846adfb228
2024-07-15 13:50:18 -07:00
Inseob Kim
33f95a959d Add support installing to root of filesystem image
If the partition of a spec is "root", that spec will be installed to
root instead. Normally that spec will be from prebuilt_root module with
install_in_root property.

Bug: 351258461
Test: USE_SOONG_DEFINED_SYSTEM_IMAGE=true m && cvd start
Change-Id: Iaaa9c2fb8a81fe0ba4710c641e1b65c5b71ad4a4
2024-07-15 17:39:44 +09:00
Inseob Kim
be6a66d54b Add install_in_root to prebuilt_root module
This is to support installing to real root "/", not a root of partition
(e.g. "/system/").

Bug: 351258461
Test: build
Change-Id: I56993aceddfd988d2d10040f50f838b89c9bdc67
2024-07-15 17:39:09 +09:00
Zi Wang
e216ad0e63 Merge "Use OutputFilesProvider in module_test" into main am: 2dbf71fed8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3168574

Change-Id: I42e3931176abc2ce62c587c481cb958b3f2dfc7c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-12 21:08:15 +00:00
Zi Wang
2dbf71fed8 Merge "Use OutputFilesProvider in module_test" into main 2024-07-12 20:39:09 +00:00
mrziwang
1ea01e3c59 Use OutputFilesProvider in module_test
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: Iaf0b039b17d34e1a696f2c87df2f0db39307fc6d
2024-07-12 12:26:34 -07:00
Colin Cross
45bc64348a Don't forward apex dependencies to platform when they are added later am: 77c5e9f9d4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3163856

Change-Id: I7937f30851bc30ee28206c787a0fdca42683b340
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-12 00:22:34 +00:00
Colin Cross
4a6b31a65e Add IsAddingDependency to IncomingTransitionContext am: e1a8555581
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3141802

Change-Id: Ib8f5bfbb73b467e74063d15e8644aac8c6298276
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-12 00:22:31 +00:00
Colin Cross
77c5e9f9d4 Don't forward apex dependencies to platform when they are added later
IncomingApexTransition normally returns "" for modules that have
no apex variation so that apex variations can depend on non-apex
variations, for example for NDK libraries.

addDependencyOntoApexModulePair uses OtherModuleDependencyVariantExists
to decide whether to add a dependency on a module in an apex.  If
IncomingApexTransition returns "" then OtherModuleDependencyVariantExists
will always return true.  Return the incoming variation when addding
dependencies after the apex transition mutator has already run.

Bug: 319288033
Flag: EXEMPT bugfix
Test: all soong tests pass with later patches applied
Change-Id: Iec40c3be2ed04dca16a9fa6fa0a1c31056b536a8
2024-07-11 16:59:34 -07: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
Zi Wang
0bf506139e Merge "Update the way to get output files in license_metadata" into main am: 5ab1eb8822
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3167457

Change-Id: I9bba7c2d8d0115ad3ea869dd0fb9187368753171
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-11 19:17:17 +00:00
mrziwang
0284657412 Fix typo in outputFilesForModule error message am: 68b2594524
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3167456

Change-Id: Iac1ee7ca6f85dbbbb4df7fafd71060ddeda1f589
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-11 19:14:26 +00:00
Zi Wang
5ab1eb8822 Merge "Update the way to get output files in license_metadata" into main 2024-07-11 18:50:22 +00:00
mrziwang
01201ed2ed Update the way to get output files in license_metadata
The output files from a module is obtained from OutputFilesProvider
instead of from OutputFileProducer, which is going to be
deprecated.

Test: CI
Bug: 339477385
Change-Id: I2a5488653d9ba05c7ebd5a0b452e75fcc676c893
2024-07-11 10:21:57 -07:00
mrziwang
68b2594524 Fix typo in outputFilesForModule error message
Test: CI
Change-Id: I41f28a0412613458a0dad132006adfbc9fbbce2c
2024-07-11 09:58:30 -07:00
Zi Wang
c86a0975fe Merge "Use OutputFilesProvider on java modules" into main am: 256772f02c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3165563

Change-Id: Iad4f22396b46ac797fbfab031764166c269742f0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-11 01:52:40 +00:00
Zi Wang
256772f02c Merge "Use OutputFilesProvider on java modules" into main 2024-07-11 01:24:10 +00:00
Colin Cross
e91c19be49 Merge "Add oryon to arm64 cpu variants" into main am: 9e47dcc597
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3163726

Change-Id: I7f008226026c4486055e056aad0e53e08919dbf8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-10 19:39:48 +00:00
mrziwang
9f7b9f4a9a Use OutputFilesProvider on java modules
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: I3c9f0b766325dd490bc903dc65259c3953d34606
2024-07-10 12:18:06 -07:00
Roopesh Nataraja
826912e7d4 Add oryon to arm64 cpu variants
Bug: 350058746
Test: builds
Change-Id: I717e035165a7529629061cbfcb076b168dc031d6
2024-07-10 10:24:04 -07:00
Alyssa Ketpreechasawat
c8bbce485f Merge "Add "strip: {none: true}" for cc_prebuilt_library_shared in sdk snapshot." into main am: 07bceec1fd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3159527

Change-Id: I38ce33d6504cfe09fc0588315a74859e07525141
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-08 20:55:42 +00:00
Alyssa Ketpreechasawat
07bceec1fd Merge "Add "strip: {none: true}" for cc_prebuilt_library_shared in sdk snapshot." into main 2024-07-08 20:39:59 +00:00
Alyssa Ketpreechasawat
59ec0fac0a Add "strip: {none: true}" for cc_prebuilt_library_shared in sdk snapshot.
Prebuilt cannot be stripped in older platform. Therefore, we set
stripper to none to skip the call to strip.sh.

Bug: 350050115
Test: SOONG_SDK_SNAPSHOT_TARGET_BUILD_RELEASE=Tiramisu m art-module-sdk
Test: Create module sdk from this and drop into tm-dev
Change-Id: I911ce24ca18435f95395c43fc5e73110a50b3067
2024-07-05 16:12:17 +00:00
Treehugger Robot
c8c78e961e Merge "Define otacerts_zip module in soong" into main am: 2fb3964e21
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3160437

Change-Id: I8523694c1a3faefc4bb5b1aee5a096220a068c9c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-04 23:17:22 +00:00
Justin Yun
635e788274 Define otacerts_zip module in soong
To move the otacerts module from make to soong, define a new module
type otacerts_zip module. This module collects key files from
PRODUCT_DEFAULT_DEV_CERTIFICATE and PRODUCT_EXTRA_OTA_KEYS
(PRODUCT_EXTRA_RECOVERY_KEYS for recovery) to install the zipped file
in etc.
otacerts_zip module is available to recovery to install the
otacerts.zip file in the recovery partition.

Bug: 335364209
Test: Define "PRODUCT_DEFAULT_DEV_CERTIFICATE := \
                 build/make/target/product/security/testkey" and
      m aosp_cf_system_x86_64
Change-Id: Ib5b671e9caef0403c6d9d69bfab29be248d7086c
2024-07-04 15:56:36 +09:00
Zi Wang
8e35f0164d Merge "Use OutputFilesProvider on some android test modules" into main am: 5aec0afe5e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3155936

Change-Id: I553b96620f337359084b3156fbde6b53a3b40f0b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-02 19:07:26 +00:00
Zi Wang
5aec0afe5e Merge "Use OutputFilesProvider on some android test modules" into main 2024-07-02 18:50:45 +00:00
Zi Wang
33192d0efc Merge "Use OutputFilesProvider on buildinfo_prop" into main am: 61f267504c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3155341

Change-Id: I8b5507b583bcb01c5d2d25107c32209b07a52f81
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-01 22:07:27 +00:00
mrziwang
01715cac38 Use OutputFilesProvider on some android test modules
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: I036323d390ec0a60911deba271a79f37c9c51fda
2024-07-01 11:50:18 -07:00
mrziwang
9429e03996 Use OutputFilesProvider on buildinfo_prop
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: I0875ed4be72954187722276b10949a2ad4e66dcf
2024-07-01 11:42:28 -07:00
Treehugger Robot
c7bccf7e27 Merge "Revert "Cleanup old code"" into main am: 6a66b08bad
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3152679

Change-Id: Ic8d7a9bbb7304c06c844834bfc8beeffddad1bd2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-28 16:27:57 +00:00
Treehugger Robot
6a66b08bad Merge "Revert "Cleanup old code"" into main 2024-06-28 16:09:47 +00:00
LaMont Jones
d4a6cc6d52 Revert "Cleanup old code"
This reverts commit 51ab5b6d50.

Reason for revert: Revert while investigating b/349713034

Bug: 349713034
Change-Id: I4e0304225364c7c535a04108b65953a32742c1da
2024-06-28 14:31:35 +00:00
Treehugger Robot
5d2e60c5a0 Merge "Add tests for selects with bindings" into main am: ab352c516a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3141986

Change-Id: Idd5f5175f9281860d3395acf21f6e2b32b3cac6b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-28 06:42:53 +00:00
Treehugger Robot
ab352c516a Merge "Add tests for selects with bindings" into main 2024-06-28 06:12:36 +00:00
Zi Wang
20b734dd1f Merge "Revert "Use OutputFilesProvider on buildinfo_prop and some android test modules"" into main am: 5bb430f9ce
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3151046

Change-Id: I5a67fe1122196964439e0721412a749dd733fa3f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-27 22:47:05 +00:00
Cole Faust
b7bd9a17ec Merge "Update selects_test for selects with deferred expressions" into main 2024-06-27 22:33:08 +00:00
Zi Wang
9b21596db4 Revert "Use OutputFilesProvider on buildinfo_prop and some android test modules"
This reverts commit 89e4ff60d3.

Reason for revert: build breakage on aosp-main/mainline_modules_sdks-trunk_staging-userdebug

Change-Id: I5ddac59f66a0e7a96fab39647d406499e3875f6a
2024-06-27 21:51:33 +00:00
Zi Wang
9189fc4a54 Merge "Use OutputFilesProvider on buildinfo_prop and some android test modules" into main am: 7be3cbcac5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3151138

Change-Id: I0005f933bad281007f30909bb0074048b084acc8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-27 21:46:56 +00:00