Commit Graph

831 Commits

Author SHA1 Message Date
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
Zhi Dou
1f82aea323 Merge "Support default-permission in aconfig_declarations" into main 2023-08-14 14:12:27 +00:00
Juan Yescas
c598343efb Merge "soong: Add product variable DevicePageSizeAgnostic" into main am: 83a740e888 am: d02e4d9670 am: ee81963a69 am: 0f82705c6e am: 8af318dbf9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2700794

Change-Id: I3e875298c9270426537c4bf39050e15b74cfd3bf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-11 09:45:59 +00:00
Juan Yescas
83a740e888 Merge "soong: Add product variable DevicePageSizeAgnostic" into main 2023-08-11 05:45:44 +00:00
Treehugger Robot
7da2356b0a Merge "Remove pdk product variable" into main am: 1824463396 am: f2d88a1ab9 am: 98746a4fde am: 478abea17a am: ad3ce4ccb0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2703674

Change-Id: I8854e78a7d0803144638039e55b4f1c4994e3303
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-11 01:55:36 +00:00
Zhi Dou
3f65a416b8 Support default-permission in aconfig_declarations
Aconfig provides new argument, default-permission, for create-cache.
When buld aconfig_declarations, aconfig_declarations will read the value
from release configuration to pass this value to aconfig.

Bug: 294417368
Test: presubmit
Change-Id: Id55dab1d757e2366a62449c73e2497cc958c5e78
2023-08-10 21:54:59 +00:00
Cole Faust
8dc9e917aa Remove pdk product variable
It has no effect.

Test: Presubmits
Change-Id: Ia15cd99ce083294a119203c416046e43d20bf87f
2023-08-10 10:20:03 -07:00
Juan Yescas
0106560e34 soong: Add product variable DevicePageSizeAgnostic
The product variable DevicePageSizeAgnostic will determine
whether AOSP is kernel page size agnostic or not.

Test: source build/envsetup.sh
      lunch aosp_cf_arm64_phone_pgagnostic
      m
      cat out/soong/build.aosp_cf_arm64_phone_pgagnostic.ninja | grep __BIONIC_NO_PAGE_SIZE_MACRO
Bug: 289419664
Change-Id: I33a1a4f1967d7e78432b7b8d90357d16b2002dcc
2023-08-09 16:46:07 -07:00
Cole Faust
1e47a2d153 Merge "Make bp2build-generated selects() based on product config build settings" into main am: fc47771bdd am: d3ced084d3 am: e2fe5f5dda am: d5dc676445 am: 8016f2cc7c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2687675

Change-Id: I28656155606fa4844513bf534ebb7688f1cf9d1b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-03 23:49:28 +00:00
Cole Faust
87c0c33a65 Make bp2build-generated selects() based on product config build settings
...instead of based on constraint settings.

Bug: 269577299
Test: m nothing and ./build/bazel/ci/bp2build.sh
Change-Id: Ib9caec79c92b8fd304e46be841de5612bd1637e3
2023-08-03 10:12:09 -07:00
Pratyush
8dd9dbbfeb Merge "Disable Hidden API Checks for ENG Builds" into main am: d938f83be1 am: f42fbcf6a1 am: e4b8ef7b74 am: 128acca18d am: ae1c06f8f6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2666977

Change-Id: Ib60d7842670c38de0bb3ca37607f7930cc7321df
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-30 18:33:15 +00:00
Pratyush
d938f83be1 Merge "Disable Hidden API Checks for ENG Builds" into main 2023-07-30 13:57:36 +00:00
Pratyush
faec4db56f Disable Hidden API Checks for ENG Builds
For more discussions/details, please check internal CL ag/24145146

Bug: 289409213
BUg: 285976182
Test: Look for hiddenapi calls in build trace
Change-Id: Ia2780ee419b8da1418ba1c7a7d732712b7c2a322
2023-07-30 13:57:10 +00:00
Devin Moore
bee8b95640 Merge "Add new Release_aidl_use_unfrozen soong variable" into main am: 1579a72d78 am: 211e090d28 am: 38a9b8a61c am: 84be4996dd am: 1e4f40a108
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2652369

Change-Id: I9cfab7f092548f1c85b7d8fdf4073bbad08f99c3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-27 01:19:21 +00:00
Devin Moore
1579a72d78 Merge "Add new Release_aidl_use_unfrozen soong variable" into main 2023-07-26 21:42:52 +00:00
Devin Moore
c381e100c9 Add new Release_aidl_use_unfrozen soong variable
this comes from a trunk stable build flag `RELEASE_AIDL_USE_UNFROZEN`
and is used by the AIDL compiler when creating build rules for the
generated AIDL libraries.

Test: m
Bug: 290265210
Change-Id: I94445c870ac908474e62db0b3172b64d53680852
2023-07-21 23:59:11 +00:00
Treehugger Robot
4f3fff9c21 Merge "Add CFI product config variables to platform_mappings" into main am: 00d0d7af7d am: 110f8b4a08 am: 57073321bf am: 2d0c4a1efa am: 9ccedba777
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2660958

Change-Id: Iff8146b25b6ddc03b53ddb1c2b32ac1943ee9a29
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-20 22:19:19 +00:00
Cole Faust
88c8efb18c Add CFI product config variables to platform_mappings
Bug: 269577299
Fixes: 283130542
Test: b test --config=android //build/bazel/rules/cc/...
Change-Id: I2fc4094167c48b1f3b22bee6b7ada309278f7250
2023-07-20 09:45:36 -07:00
Treehugger Robot
276e4a4f6f Merge "Install VNDK libraries into vendor or product lib with flag" into main am: 7d34640ac8 am: 4fc627b005 am: b4df366727 am: 3e5d1939dd am: 79e07295a2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2648170

Change-Id: I79931d46a257f9298a1d95373c0becbd91f71601
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-19 08:04:36 +00:00
Treehugger Robot
7d34640ac8 Merge "Install VNDK libraries into vendor or product lib with flag" into main 2023-07-19 04:44:51 +00:00
Cole Faust
a78a73393b Merge "Platform mapping-based product config" into main am: 66ef2ff97f am: b74818b55d am: 4b7519d350 am: 470a5e359b am: 6dee30bbc8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2629193

Change-Id: I032d710efb199cb03cfccfde8a87cb983d6b746e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-18 19:53:22 +00:00