Commit graph

89957 commits

Author SHA1 Message Date
Wonsik Kim
d4d952f9d2 aconfig: move cache_ as a memeber
provider_ object relies on cache_ vector to be alive, but the order
of destruction between these objects at exit are not guaranteed.
This can lead to crash at the exit especially on ASAN build.
By putting cache_ as a member it is guaranteed that cache_ is not
destructed until provider_ is destructed.

Test: m ; m AconfigDemoActivity
Test: atest aconfig.test
Test: observe no crash on _hwasan build
Change-Id: If9e23e99c501bf8f06fcab003622948b9e730352
2023-11-20 09:50:52 -08:00
Ted Bauer
ca355c09a2 Merge "Revert^2 "Cache Java codegen'd flags in static member variables."" into main 2023-11-16 18:48:00 +00:00
Anas Sulaiman
3e17366053 Merge "fix RE for metalava actions" into main 2023-11-16 18:42:24 +00:00
Ted Bauer
c3073786b3 Revert^2 "Cache Java codegen'd flags in static member variables."
This reverts commit efda207c09.

Reason for revert: this unrevert contains the fix for b/311187402

Test: cargo test
Change-Id: I210aebd30edd864a7c141ede336c12aebf4f1fcd
2023-11-16 12:26:41 -05:00
Kiyoung Kim
25b71e0689 Merge "Deprecate VNDK based on feature flag" into main 2023-11-16 00:37:29 +00:00
Aditya Choudhary
432c41ecbf Merge "Refactor metadata tool to support metadata generation for different rules." into main 2023-11-15 22:11:22 +00:00
Anas Sulaiman
5dacf0f6dd fix RE for metalava actions
Some of those actions use unzip which is not available in the source
tree and needs to be installed in the container.

Bug: b/309783005
Test: Ran an android build and verified there are no local fallbacks from metalava actions.
Change-Id: I360c3fb30e2eacc0615ed636115bce011bff5bf3
2023-11-15 20:39:45 +00:00
Treehugger Robot
5003ff741a Merge "Move signing related options to a shared place" into main 2023-11-15 18:32:40 +00:00
Treehugger Robot
f0e5c7e321 Merge "Allow ParseOptions to compose multiple option parsers easily" into main 2023-11-15 18:32:00 +00:00
Aditya Choudhary
a96ce3223a Refactor metadata tool to support metadata generation for different rules.
Bug: 296873595
Test: Manual test (use go test inside tools/metadata/testdata)

Change-Id: I881fd76213ec78001f9e12ed2fbc860d1503a364
2023-11-15 18:05:11 +00:00
Ted Bauer
a06cff1048 Merge "Revert "Cache Java codegen'd flags in static member variables."" into main 2023-11-15 18:04:10 +00:00
Aditya Choudhary
4277d617f2 Merge "Add metadata generator tool for test spec metadata generation. Bug: 296873595 Test: Manual test (use go test inside tools/metadata/testdata)" into main 2023-11-15 17:13:28 +00:00
Ted Bauer
efda207c09 Revert "Cache Java codegen'd flags in static member variables."
This reverts commit afe55106e5.

Reason for revert: causes a bug b/311187402

Change-Id: Ic3f56fbb66a6412cd702cebd9e4247032f950324
2023-11-15 16:52:02 +00:00
Jihoon Kang
3b12b769e4 Merge "Set BUILD_FROM_SOURCE_STUB=true for finalization" into main 2023-11-15 16:29:12 +00:00
Aditya Choudhary
51f97c1963 Add metadata generator tool for test spec metadata generation.
Bug: 296873595
Test: Manual test (use go test inside tools/metadata/testdata)

Change-Id: I404b57224828149f26bcf4deadb662f513886231
2023-11-15 16:08:14 +00:00
Greg Kaiser
2c8ece0b25 Merge "Reland: Require TARGET_RELEASE for builds" into main 2023-11-15 13:42:18 +00:00
Treehugger Robot
a463723f16 Merge "Revert "[CrashRecovery] Add module to BCP and SSCP"" into main 2023-11-15 11:43:29 +00:00
Harshit Mahajan
1b22a8e7dd Revert "[CrashRecovery] Add module to BCP and SSCP"
Revert submission 2789412-cherrypicker-L65800000963076834:N61100001405784943

Reason for revert: Leading to merge conflict
Bug: b/311082270

Reverted changes: /q/submissionid:2789412-cherrypicker-L65800000963076834:N61100001405784943

Change-Id: I2cbe26499ad5ce938db7cdd3ebaf9c2e48982de9
Merged-In: I39dfab62897d907023720b594d6929397403d314
2023-11-15 08:26:47 +00:00
Treehugger Robot
251ad2f41f Merge "Add .product suffix for the product variants" into main 2023-11-15 07:34:40 +00:00
Justin Yun
59fbdf0bba Add .product suffix for the product variants
Instead of adding .vendor suffix, add .product suffix to include
product variants.

Bug: 309511650
Test: atest com.android.gts.vndk.VndkDependencyTest#testVndkDependencyTestCase
Change-Id: I6d578be95c618c565347f0fdf660e82945ac77a3
2023-11-15 14:59:39 +09:00
Jihoon Kang
59c61acf64 Set BUILD_FROM_SOURCE_STUB=true for finalization
Build from text stub feature was initially implemented to improve build
performance and may be unstable for api finalization, as the stubs
generated from api signature files miss some methods, which may cause
backward compatibility issues. Therefore, this change disables building
from text stub for api finalization.

Test: build/tools/finalization/finalize-aidl-vndk-sdk-resources.sh and inspect generated ninja file to verify that the stubs are generated from source Java files.
Bug: 310279899
Change-Id: I9d374e973788bc97514815f64eeb949a94a97647
2023-11-15 00:38:41 +00:00
Kelvin Zhang
68252b801a Move signing related options to a shared place
Move OTA signing flags to payload_signer.py so that we can re-use these
flags in multiple binaries.

Test: th
Bug: 293313353
Change-Id: I44f9910cee37c449397e174a5784f747ec9fb0d6
2023-11-14 12:41:58 -08:00
Kelvin Zhang
c68c6b9530 Allow ParseOptions to compose multiple option parsers easily
There are certain options which we need to share in multiple binaries,
for example, the signer options. Current options parsing function only
accepts 1 extra option handler, which is inflexible. Extend it to take a
list of extra option handlers.

Currently, to add a new CLI flag, caller must append the flag name to
`extra_long_opts`, then pass an extra option handler which can handle
that option. Define a new dataclass which contains both the CLI flag
name and the code to handle that flag for better composition.

Test: th
Bug: 293313353
Change-Id: I758db66dfd95934f5b2701454d97bfe7d37dc16d
2023-11-14 12:41:56 -08:00
Alyssa Ketpreechasawat
c7bc53999d Merge "Remove jars in PRODUCT_APEX_BOOT_JARS_FOR_SOURCE_BUILD_ONLY (e.g. framework-pdf in MP) from ApexBootJars when prebuilt is enabled." into main 2023-11-14 19:13:32 +00:00
Ted Bauer
99b189ac83 Merge "Cache Java codegen'd flags in static member variables." into main 2023-11-14 19:04:05 +00:00
Ted Bauer
afe55106e5 Cache Java codegen'd flags in static member variables.
By caching flag values directly in member variables instead of caching
a HashMap and accessing that, flag reads avoid `hashCode()`, map
lookup, and Boolean.parse runtime costs. Flag reads are turning out
to have performance problems in hot paths, so this should help to
alleviate that.

Bug: 309625014
Test: m
Change-Id: I923bf6af2ae3fcbbf2fee7126b492a47cd6049ad
2023-11-14 12:02:01 -05:00
Justin Yun
136fa83d4e Merge "Define BOARD_API_LEVEL and BOARD_API_LEVEL_FROZEN" into main 2023-11-13 23:40:06 +00:00
Treehugger Robot
534b47bc8e Merge "Require scl files in ExecutionModeScl" into main 2023-11-13 21:39:12 +00:00
Devin Moore
731d920878 Merge changes from topic "revert-2818339-remove_hidl_memory-VHKFNXVYFO" into main
* changes:
  Revert "Remove android.hidl.memory library from the VNDK"
  Revert "Stop including android.hidl.memory ashmem impl on V+ devices"
2023-11-13 21:30:03 +00:00
Cole Faust
6309234411 Require scl files in ExecutionModeScl
Also remove json from scl file builtins, as it's not in bazel.

Bug: 309686282
Test: Presubmits
Change-Id: I6227c5dc14922b4682380254b4716b4ae38c47b9
2023-11-13 11:47:30 -08:00
Devin Moore
0b69afa338 Revert "Remove android.hidl.memory library from the VNDK"
Revert submission 2818339-remove_hidl_memory

Reason for revert: b/310680652 broke VTS tests

Reverted changes: /q/submissionid:2818339-remove_hidl_memory

Change-Id: Ie55fd1d0b8429a17966755ec1c54b2868ca966f9
2023-11-13 19:32:46 +00:00
Devin Moore
77393ba39d Revert "Stop including android.hidl.memory ashmem impl on V+ devices"
Revert submission 2818339-remove_hidl_memory

Reason for revert: b/310680652 broke VTS tests

Reverted changes: /q/submissionid:2818339-remove_hidl_memory

Change-Id: I1065d67949c4270d5351a9ca00ec79ead845020d
2023-11-13 19:32:54 +00:00
Zi Wang
2b09495e2a Merge "Update test: true to mode: "test"" into main 2023-11-13 19:23:55 +00:00
Devin Moore
001ed67bba Merge changes from topic "remove_hidl_memory" into main
* changes:
  Stop including android.hidl.memory ashmem impl on V+ devices
  Remove android.hidl.memory library from the VNDK
2023-11-13 17:55:30 +00:00
Alyssa Ketpreechasawat
ba231d2084 Remove jars in PRODUCT_APEX_BOOT_JARS_FOR_SOURCE_BUILD_ONLY (e.g. framework-pdf in MP) from ApexBootJars when prebuilt is enabled.
framework-pdf is newly added framework jar which is not yet included in
the actual prebuilt apex. Thus, we add it PRODUCT_APEX_BOOT_JARS_FOR_SOURCE_BUILD_ONLY. The APEX_BOOT_JARS_EXCLUDED will be created based on PRODUCT_APEX_BOOT_JARS_FOR_SOURCE_BUILD_ONLY and will be removed from ApexBootJars.

Bug: 304719212
Test: lunch cf_x86_phone-next-userdebug & m
Test: lunch cf_x86_phone-trunk-userdebug & m
Change-Id: I9902131629900fbd629b8560a422ed8c2b06073c
2023-11-13 13:22:32 +00:00
Colin Cross
70ed34cc72 Merge "Escape sbom lines" into main 2023-11-11 03:22:11 +00:00
Colin Cross
92f8043874 Escape sbom lines
Go 1.21 changes the names of some factory functions to include
characters that need shell escaping.  Wrap everything written to
the sbom file with single quotes.

Bug: 309895579
Test: m out/target/product/vsoc_x86_64/sbom-metadata.csv
Change-Id: Ia61f02d8b02dd9f92ce144307087423c592a1833
2023-11-10 15:06:21 -08:00
Treehugger Robot
fc9ebd2684 Merge changes from topic "disable-dexpreopt-dexopt" into main
* changes:
  Add a Make variable to disable all dexpreopt and dexopt activities.
  Update dexopt system properties.
2023-11-10 18:47:19 +00:00
Treehugger Robot
1f9ba9c4ec Merge "Don't build VNDK on GSI" into main 2023-11-10 09:04:16 +00:00
Treehugger Robot
4e7ba9e30c Merge "GSI: add VNDK 34/remove VNDK 29" into main 2023-11-10 08:31:14 +00:00
Hung-ying Tyan
d116600dc1 Don't build VNDK on GSI
Bug: 308878144
Test: manual mix on T Pixel 6

Change-Id: I924d9a52f542450bdfc727d65e668e56bb89bc50
2023-11-10 08:01:59 +00:00
Hung-ying Tyan
04531b5c79 GSI: add VNDK 34/remove VNDK 29
Bug: 291204040
Test: boot GSI on U Pixel
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d4639705bdf86c8b8c1607719eab4f5791e236fe)
Merged-In: I04c50ca03a6ebd9b371a35f66faf5ea7861c6ca5
Change-Id: I04c50ca03a6ebd9b371a35f66faf5ea7861c6ca5
2023-11-10 08:00:56 +00:00
Justin Yun
23d52435f3 Define BOARD_API_LEVEL and BOARD_API_LEVEL_FROZEN
BOARD_API_LEVEL and BOARD_API_LEVEL_FROZEN are set by the release
flags.
BOARD_API_LEVEL sets ro.board.api_level that shows the API level of
the vendor API surface.
BOARD_API_LEVEL_FROZEN sets ro.board.api_frozen that shows if the
ro.board.api_level is finalized.

Bug: 295269182
Test: getprop ro.board.api_level
Change-Id: Ie57c57b6c9f1fc0c98968195843059a48da8e512
2023-11-10 16:31:04 +09:00
Colin Cross
481b02106c Merge "Skip parts of notice_files.mk that don't apply to Soong modules" into main 2023-11-10 06:15:45 +00:00
Zi Wang
0ab8a96dcf Update test: true to mode: "test"
Test: CI

Bug: 309990433
Change-Id: I31644510002560fd81c41fbe37f0872fc1135390
2023-11-09 16:33:39 -08:00
Treehugger Robot
124101862b Merge "Prevent using symlinks to starlark files" into main 2023-11-10 00:00:41 +00:00
Juan Yescas
06b7b6c492 Merge "16k: Support max-page-size alignment greater than 4096 for x86-64" into main 2023-11-09 23:07:09 +00:00
Cole Faust
ccd26808af Prevent using symlinks to starlark files
Symlinks are frequently confusing / a source of bugs. They also don't
provide much utility over just loading the other file and re-exporting
its symbols, so recommend doing that instead.

Test: Presubmits
Change-Id: Ie3052ebc0add77f1746d6321fbdf7bc15df9819b
2023-11-09 14:32:55 -08:00
Treehugger Robot
c50601abc4 Merge "Remove _kwmarker" into main 2023-11-09 21:35:20 +00:00
Juan Yescas
ebadc969a8 16k: Support max-page-size alignment greater than 4096 for x86-64
To simulate 16k page size in x86-64 cuttefish, it is necessary
to compile the shared libraries and binaries with max-page-size greater
than 4096.

Bug: 309816695
Test: source build/envsetup.sh
      lunch aosp_cf_x86_64_phone_pgagnostic-trunk-userdebug
      m
Change-Id: Id8e142a5a3556f5fd30ce90eaac236dcbc1b0881
2023-11-09 12:51:30 -08:00