Commit Graph

851 Commits

Author SHA1 Message Date
Christopher Parsons
741272b2b8 Merge changes I5c7f1fc1,I6015581c into main am: 0b5a877f21 am: 9994462ccb am: 1dd1c7712e am: b4d89edb56 am: e2926e7c24
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2774749

Change-Id: I77fb97ee04206b30f1c343b471a6af2f1cb5b4a1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-05 21:13:47 +00:00
Alyssa Ketpreechasawat
238d1be1da Revert "Added new framework-pdf jar inside MediaProvider module"
Revert submission 2759049-framework-pdf

Reason for revert: it blocks us from enabling prebuilts in next target in main (go/stale-mainline-prebuilts for more info)

Reverted changes: /q/submissionid:2759049-framework-pdf

Change-Id: I7e6d002643d0a3c08cc868d827c60a6ed7e8712d
2023-10-05 16:09:32 +00:00
Jingwen Chen
8c49fc7cac Fix comment for Bp2buildDepsMutator config.
Test: presubmit
Change-Id: I5c7f1fc188eb37d3a457f9d4e2365d89ce2190e9
2023-10-05 10:07:52 +00:00
Christopher Parsons
55138d541d Merge "create, but dont register, bp2build_deps mutator" into main am: 29c559b785 am: a07eedf390 am: 413fa13863 am: 5a9bfd78c1 am: 185d978646
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2768645

Change-Id: Ib29d0e40be7ff8b3dd70f98550d600b79af0a905
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-05 00:27:32 +00:00
Christopher Parsons
29c559b785 Merge "create, but dont register, bp2build_deps mutator" into main 2023-10-04 21:38:49 +00:00
Justin Yun
70cc2d5681 Merge "Generate product variants by default" into main am: ce12ea8f95 am: dead374d4d am: 955b380660 am: 3b5053ee1f am: 80a0b71ece
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2762829

Change-Id: I42d3ce7a0ead8bb799dbda7d07040dae870e6998
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-04 09:27:43 +00:00
Justin Yun
ce12ea8f95 Merge "Generate product variants by default" into main 2023-10-04 06:29:31 +00:00
Jihoon Kang
7ac61080b7 Merge changes from topic "expose_flagged_api_revert" into main am: a7e5e29ec1 am: 3d1cecda28 am: 40386ed37e am: f9503e962b am: 2e660fdb2c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2769001

Change-Id: I13de5bcfee96d188c68442bda12a7fee6f737aa6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-03 20:07:40 +00:00
Jihoon Kang
a7e5e29ec1 Merge changes from topic "expose_flagged_api_revert" into main
* changes:
  Revert^2 "Add flagged api hide conditional to droidstubs"
  Revert^2 "Add soong config variable Release_expose_flagged_api"
2023-10-03 17:55:16 +00:00
Jihoon Kang
c831389625 Revert^2 "Add flagged api hide conditional to droidstubs"
This reverts commit 1180919dda.

Test: go test ./java && m TARGET_PRODUCT=sdk TESTING_TARGET_RELEASE_NEXT=true nothing and inspect ninja command for generating stubs and verify the flag is included && m TARGET_PRODUCT=sdk TARGET_RELEASE=trunk_food nothing and inspect ninja command for generating stubs and verify the flag is not included
Bug: 299570421
Change-Id: I4967376c0236bad729398af80fa59b48dbab5f21
2023-10-03 01:04:00 +00:00
Jihoon Kang
f3aa3225b6 Revert^2 "Add soong config variable Release_expose_flagged_api"
This reverts commit 5548bf3053.

Test: m nothing
Bug: 299570421
Change-Id: I9f70648fb6657bbf4f5681cd6d40517d70a8fefb
2023-10-03 01:00:42 +00:00
Chris Parsons
5f1b3c7ad8 create, but dont register, bp2build_deps mutator
This is the bulk of the "allowlist v2" feature. It will disable bp2build
generation for modules which have transitive dependencies without a
bazel build definition.

This CL includes this mutator, but doesn't register it as a bp2build
mutator (outside of a few unit tests). This allows us to easily iterate
on completion of this feature and ensure there are no launch blockers
before we finalize the change in AOSP.

Bug: 285631638
Test: Unit tests
Change-Id: Ifb0a079c409ca19b02cafa3fab2efa0d3deebc50
2023-10-03 00:16:30 +00:00
Mark White
b15dd000a9 Merge "Added new framework-pdf jar inside MediaProvider module" into main am: 477a31271d am: 14a6903e77 am: f500e9d78d am: 5c7259efb3 am: e704e4ecaf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2760586

Change-Id: I3f7a71f2ef0672bc033e156602ee2dbf025b468a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-29 17:39:37 +00:00
Mark White
477a31271d Merge "Added new framework-pdf jar inside MediaProvider module" into main 2023-09-29 12:21:33 +00:00
Maxim Siniavine
6b149c846a Merge changes from topic "revert-2755310-HIIDCMFNIU" into main am: 4aa82a13db am: 12663c872e am: dbfe6b66dc am: 8f08662dee am: 7175f020ae
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2766348

Change-Id: I0c1cc1883d430230175d3e89c94a88b9a52b9ce0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-28 06:04:46 +00:00
Maxim Siniavine
943dc1b6f4 Revert "Add flagged api hide conditional to droidstubs" am: 1180919dda am: 57639c5e65 am: 4a564b5bcd am: b1b05aea50 am: c18a909a93
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2766347

Change-Id: I81e893d4fce8c1bde51f2ae66e299f79d4868a05
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-28 06:04:43 +00:00
Maxim Siniavine
1180919dda Revert "Add flagged api hide conditional to droidstubs"
Revert submission 2755310

Reason for revert: Broken build b/302407753

Reverted changes: /q/submissionid:2755310

Change-Id: I56306fc3b7e5608d21dbefe18d6a886561599f40
2023-09-28 01:01:59 +00:00
Maxim Siniavine
5548bf3053 Revert "Add soong config variable Release_expose_flagged_api"
Revert submission 2755310

Reason for revert: Broken build b/302407753

Reverted changes: /q/submissionid:2755310

Change-Id: Ib5c01033882500296989a7c4476a723d95292aab
2023-09-28 01:01:59 +00:00
Jihoon Kang
15ec654d53 Merge changes from topic "expose_flagged_api" into main am: af26c102b8 am: ff593197d9 am: daa3a1a2db am: 9ddde37234 am: c38c9e3f1a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2755310

Change-Id: I69422f68540212dbd178e469e2bf4bbb1931fb7e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-27 22:51:56 +00:00
Justin Yun
af1fde43f9 Generate product variants by default
PRODUCT_PRODUCT_VNDK_VERSION is set to 'current' by default. Now, we
can generate product variants without checking the
PRODUCT_PRODUCT_VNDK_VERSION build variable. Remove reading the
PRODUCT_PRODUCT_VNDK_VERSION variable from soong and generate product
variants by default.

Bug: 302255959
Test: m
Change-Id: I9a9b2076f4367c5ce9a393bbb206f8dee3884bd8
2023-09-27 16:36:40 +09:00
Jihoon Kang
d91a8e806a Add flagged api hide conditional to droidstubs
APIs annotated with @FlaggedApi should not be included in the artifact
when building sdk target products in the "next" release configuration.

This change adds such logic by passing additional flag to metalava in
droidstubs.

The flag does not need to be passed to metalava invocation done in
java_api_library, as java_api_library generates stubs using api
signature files (i.e. *-current.txt files), and they will not contain
apis marked @FlaggedApi. The metalava invocation in droidstubs is
responsible for removing such apis.

Test: go test ./java && m TARGET_PRODUCT=sdk TESTING_TARGET_RELEASE_NEXT=true nothing and inspect ninja command for generating stubs and verify the flag is included
Bug: 299570421
Change-Id: Ia4b699b6e3ff6324f050eecc9ff5b622fdc04621
2023-09-26 22:46:05 +00:00
Jihoon Kang
03f1aa064a Add soong config variable Release_expose_flagged_api
The variable is a release config variable which will be used to
determine whether if the api marked @FlaggedApi is exposed or not.

Test: m nothing
Bug: 299570421
Change-Id: I5647608065543cf5059836f6d6e8906a23145541
2023-09-26 22:32:50 +00:00
Jihoon Kang
948d775d19 Merge "Import make variable NextReleaseHideFlaggedApi to Soong" into main am: e4bb4d4e6b am: 9e613388e3 am: 94f35434bf am: a8e6f67098 am: ca7422b0b5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2755309

Change-Id: Idcc333efd4008cd3144a394c95825c360088b2e1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-26 22:31:22 +00:00
Jihoon Kang
cfbc4077b3 Import make variable NextReleaseHideFlaggedApi to Soong
This change imports NextReleaseHideFlaggedApi exported from soong_config

Test: m nothing
Bug: 299570421
Change-Id: I410596a39d2ba9ad353c5cf48bd38b1e843633b2
2023-09-25 20:54:46 +00:00
Alyssa Ketpreechasawat
34feb68b28 Disable hiddenapi check for building from prebuilts.
Add ReleaseDefaultModuleBuildFromSource to config.productVariables and
use this parameter to disable hiddenapi check.

Test: DEFAULT_MODULE_BUILD_FROM_SOURCE=false m (not failing hiddenapi
check after disabling)
Bug: 301871981
Change-Id: I86b3f3bc21d546022a503a1c6a8a641d4e785565
2023-09-25 15:45:42 +00:00
Christopher Parsons
2ca693f6fd Merge "Handle already existing targets of different name" into main am: 68a3d9b33e am: 07eb212463 am: c85ebf33fe am: 51da529229 am: ee4348d7b3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2759611

Change-Id: Ibb87b3f1134185e2d78bfc2b5f48b119152b4ddd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-22 23:33:45 +00:00
Mark White
a1c9bb08b5 Added new framework-pdf jar inside MediaProvider module
Bug: 301574837
Test: presubmit and m framework-pdf
Change-Id: Ib5294ef9d1c632777af0ca9225d459cbc188e589
2023-09-22 13:28:51 +00:00
Chris Parsons
0c4de1f234 Handle already existing targets of different name
In other words, if, in bp2build, module "foo" would generate "foo",
and "foo_two", and "foo_two" already exists in a build file,
bp2build should label "foo" as being unconvertible.

Fixes: 301321658
Fixes: 301312582
Bug: 285631638
Test: Unit tests
Test: Verified that `m bp2build` results in bit-for-bit identical
contents for out/soong/bp2build before and after this change.

Change-Id: Icbbdd69fce83579ec9b172d04b2bf1f294698f70
2023-09-21 20:58:25 +00:00
Yu Liu
de160f7db1 Merge "Convert cc_aconfig_library to bazel." into main am: 62f7302701 am: b84a5aaec3 am: a77dff0ecf am: 7412dd35ad am: 84997df772
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2751020

Change-Id: Ie40ddf0ca1f27fb9832de0cbe9fa3029bf9ecdea
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-21 20:35:42 +00:00
Yu Liu
62f7302701 Merge "Convert cc_aconfig_library to bazel." into main 2023-09-21 17:43:07 +00:00
Liz Kammer
0959cf0099 Merge "Handle prebuilt vs source selection in bp2build" into main am: af7c166f10 am: e29da0ff11 am: 997cd6dd8a am: cb6b6ee3d0 am: c25487cc92
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2755386

Change-Id: Ia0b8e3e01e21dd1a2d7b8334526a4f479bb7ae42
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-21 16:55:49 +00:00
Yu Liu
855cfc2fac Convert cc_aconfig_library to bazel.
Bug: 297358249
Test: Unit test and CI
Change-Id: Ic84128b0df16efe4255b52b83670ec9902c09383
2023-09-20 17:46:46 -07:00
Liz Kammer
e1b39a5286 Handle prebuilt vs source selection in bp2build
Test: enable mainline modules build from prebuilts and build
Bug: 300640274
Change-Id: Ib1d6bbca7e0ab459515d3cf6378741e8368e7327
2023-09-19 16:04:39 -04:00
Yu Liu
24a382c72f Merge "Support aconfig_declarations, aconfig_values and aconfig_value_set" into main am: e6153b54bc am: 8c21c60e66 am: adf6ac190a am: bde239e2be am: 73e123b294
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2741124

Change-Id: Iba630d0dbfae83726d5214458c2400e94d023388
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-15 19:13:14 +00:00
Yu Liu
2cc802a442 Support aconfig_declarations, aconfig_values and aconfig_value_set
Bug: 297356603
Test: Unit tests
Change-Id: I2f797578a35322440db0f281b4d46b6652512e00
2023-09-09 12:33:40 -07:00
Cole Faust
bb8ef7d615 Merge "Delete ApiBp2build soong_build mode" into main am: 999881376b am: a861380624 am: 3820cfe980 am: 25cae5f78e am: c50d54270f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2630914

Change-Id: Iebb426aaa2bd802a26ee3e7d2bfaf6074e45b802
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-06 22:06:26 +00:00
Cole Faust
999881376b Merge "Delete ApiBp2build soong_build mode" into main 2023-09-06 18:04:25 +00:00
Treehugger Robot
bdb268680c Merge "soong: HWASan exclude path support" into main am: f3d52683a9 am: d24ed92a49 am: 3a5ed146cc am: fadd8932b2 am: 5aae5c20e2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2721423

Change-Id: I658653472fee7289d8e7fe86908f18bffe5a4bc3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-06 04:13:59 +00:00
Treehugger Robot
f3d52683a9 Merge "soong: HWASan exclude path support" into main 2023-09-06 01:14:12 +00:00
Chris Parsons
73f411b72c Delete ApiBp2build soong_build mode
This feature is obsolete.

This makes a large number of codepaths "dead code" (such as
module-specific implementations of ApiBp2build functionality). These
will be deleted in a followup CL.

Bug: 284029211
Test: Presubmits
Change-Id: Ib53b99f1fe8c24380d219caf44e9bb3b96724fa0
2023-09-05 17:09:51 -07:00
Inseob Kim
31be3734ef Merge "Remove code about mixed sepolicy build" into main am: 9c14e725e7 am: e06a2b2880 am: 4afb4219a8 am: fb294bd432 am: 9aaed54837
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2735214

Change-Id: I697213198ac692eccc48e5c76748e63a7dc9268a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-01 04:52:52 +00:00
Inseob Kim
6077b2342c Remove code about mixed sepolicy build
There is no one actively using mixed sepolicy build, and it made
sepolicy codes too complicated. As we are deprecating mixed build,
removing such code for cleanup.

Bug: 298305798
Test: boot cuttlefish
Change-Id: Icb5071eb1378f8ed83568e4445d7b4d33e29bc46
2023-08-31 16:49:59 +09:00
Treehugger Robot
d78e409ca6 Merge "Use board api level for seapp coredomain check" into main am: 37a0e4a0bd am: 2bc8b7cf1b am: f6bbd111b9 am: ca97a45396 am: 1406f096d6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2727563

Change-Id: I98e6238b3d2a911b035daf6962cae0a91d15308b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-29 22:28:19 +00:00
Mark White
387a658e2d Created empty framework-location non-updatable module
Bug: 289776578
Test: presubmit
Change-Id: Iebc6d016b8313759ac1f6f3ab6f4834f5ad7b93e
Merged-In: Iebc6d016b8313759ac1f6f3ab6f4834f5ad7b93e
2023-08-28 17:45:30 +00:00
Inseob Kim
5bac3b6f2a Use board api level for seapp coredomain check
Rather than PRODUCT_SHIPPING_API_LEVEL, use board api level
(BOARD_API_LEVEL or BOARD_SHIPPING_API_LEVEL) to determine whether we
check coredomain violations or not.

Also provides a Makefile variable to override the flag, for targets that
want to turn on the check optionally.

Bug: 280547417
Test: see build command of vendor_seapp_contexts
Change-Id: Ic7c4a53d0df0cccd45eb699e236a92c8c0bc2d56
2023-08-25 21:29:56 +09:00
Inseob Kim
3a61b6edae Revert "Add BUILD_BROKEN_VENDOR_SEAPP_USES_COREDOMAIN"
Revert submission 2715179-BUILD_BROKEN_VENDOR_SEAPP_USES_COREDOMAIN

Reason for revert: not needed

Reverted changes: /q/submissionid:2715179-BUILD_BROKEN_VENDOR_SEAPP_USES_COREDOMAIN

Change-Id: I3bc8f2006b2f82159ae308467ea74ad62a60ec6f
2023-08-23 02:07:40 +00:00
Tomislav Novak
f734f00898 soong: HWASan exclude path support
Adds the ability to centrally disable HWASan for multiple modules when
building with SANITIZE_TARGET=hwaddress. Soong version of the patchset.

HWASan takes precedence over CFI and several other sanitizers that it's
incompatible with[1], which can be problematic for modules that require
those sanitizers (e.g. those that depend on vendor prebuilts where only
sanitized variants are provided). This patch adds an easy way to disable
HWASan for such modules while still keeping it globally enabled.

Test: build with HWASAN_EXCLUDE_PATHS set and verify with readelf that
      relevant modules have no references to __hwasan symbols

[1] bb31ca1168/core/config_sanitizers.mk (236)

Change-Id: I5824f71f2a400c64cde29e2c7afdd167d851d337
2023-08-22 18:15:14 +00:00
Inseob Kim
0a7c819498 Add BUILD_BROKEN_VENDOR_SEAPP_USES_COREDOMAIN
Starting from Android V, vendor seapp_contexts files can't assign
coredomain to vendor apps, as it's Treble violation. This build broken
variable is to suppress the enforcement for devices launching with U or
prior.

Bug: 280547417
Test: set BUILD_BROKEN_VENDOR_SEAPP_USES_COREDOMAIN := true and build
Change-Id: Ic4b5309f0d9bab9b93e88988d1a5a942b2de220a
2023-08-18 18:16:26 +09:00
Mark White
8bf29fd473 Created empty framework-location non-updatable module
Ignore-AOSP-First: Change in topic with internal-first projects
Bug: 289776578
Test: presubmit
Change-Id: Iebc6d016b8313759ac1f6f3ab6f4834f5ad7b93e
2023-08-16 23:22:50 +00:00
Zhi Dou
da196ce83a Merge "Support default-permission in aconfig_declarations" into main am: 1f82aea323 am: e1d9d9e633 am: f2f2ad86d0 am: 9f5eefc1cb am: f0654165d8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2704693

Change-Id: I5656b6b1268af475adba5b1ed792e03081bfd5fa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-14 17:53:32 +00:00