Commit graph

99268 commits

Author SHA1 Message Date
Zhuoyao Zhang
f02aadfd27 Support tool event logging for fastboot
This is part of the adte team's effort to collect metrics that help understand the bottlenecks in the Android local testing workflow.

Added a fastboot function in build/envsetup.sh which wraps the actual
fastboot binary with the logging script

Bug: 346363374
Test: source build/envsetup.sh && lunch
aosp_cf_x86_64_phone-trunk_staging-userdebug && fastboot --version
tested in both bash and zsh

Change-Id: Ia8d29b4323b64f9f853ee096728993096d7babe9
2024-06-10 18:28:25 +00:00
Lance Chang
4203958e68 Merge "Add build number if TARGET_BUILD_APPS_WITH_BUILD_NUMBER is defined" into main 2024-06-10 17:45:53 +00:00
Treehugger Robot
9a3900c7e9 Merge "Enable Pre-reboot Dexopt at build time." into main am: bfcac4a398 am: f8180be2bf
Original change: https://android-review.googlesource.com/c/platform/build/+/3121991

Change-Id: I74afaeea9535b05a33ff4b75ca1b09ab14ca4881
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-10 16:53:29 +00:00
Treehugger Robot
f8180be2bf Merge "Enable Pre-reboot Dexopt at build time." into main am: bfcac4a398
Original change: https://android-review.googlesource.com/c/platform/build/+/3121991

Change-Id: I7181149aeb5beda5a8290df959e0d313cabb9b41
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-10 16:36:08 +00:00
Treehugger Robot
bfcac4a398 Merge "Enable Pre-reboot Dexopt at build time." into main 2024-06-10 15:59:29 +00:00
Mårten Kongstad
576e818880 check-flagged-apis: extract argument names into constants
Extract the command line argument names (and help texts) into constants.
This will allow future subcommands to re-use the same names and keep
things consistent.

Bug: 345207706
Test: atest check-flagged-apis-test
Flag: EXEMPT host side tool
Change-Id: I430f36c99f28aab8511a357f572086ee238d653b
2024-06-10 16:26:17 +02:00
Mårten Kongstad
d5ce20fc07 check-flagged-apis: add support for subcommands
The tool currently only supports a single subcommand, the "check"
command. Follow-up CLs will add new subcommands.

Bug: 345207706
Test: build/tools/check-flagged-apis/check-flagged-apis.sh
Flag: EXEMPT host side tool
Change-Id: I1aaaf313db8a10a7427aab378aac8d946d5a8a3d
2024-06-10 16:26:16 +02:00
Jiakai Zhang
28618cfff8 Enable Pre-reboot Dexopt at build time.
Bug: 311377497
Test: m
Change-Id: I48933eadea8be1d81e7c4ce37abb5a2175402236
2024-06-10 15:11:07 +01:00
Android Build Coastguard Worker
d4138131a2 Make change and version bump to AP3A.240610.001
Snap for 11946224 from 6fd890a5e5 to 24Q3-release

Change-Id: I67c7d626dc58e8af8944884c5721fc0ddab8d8b4
2024-06-09 21:50:54 +00:00
Lance Chang
eda8686794 Add build number if TARGET_BUILD_APPS_WITH_BUILD_NUMBER is defined
This change allows unbundled app builds to embed the build number in the
version name by defining TARGET_BUILD_APPS_WITH_BUILD_NUMBER, so that
APK files from a build can be easily identified.

Ignore-AOSP-First: changes in topics with internal-only projects
Test: manual build
Bug: 340311907
Change-Id: I9a7e4f96f0d92c19d832933b5c68bd6b75ce9ce6
2024-06-09 13:22:58 -07:00
Android Build Coastguard Worker
757564aad2 Make change and version bump to AP3A.240609.001
Snap for 11945538 from 6fd890a5e5 to 24Q3-release

Change-Id: I8bc82ebf5f307d2c35adfa3e0b497684fe4ec139
2024-06-08 21:50:17 +00:00
Android Build Coastguard Worker
34f15f3d6a [coastguard skipped] Merge sparse cherrypicks from sparse-11944173-L29900030004348256 into 24Q3-release.
COASTGUARD_SKIP: I02883aaaa31e15737b0600f45e8cb7cd482f47a4

Change-Id: If3b00374d58890eb80a49062712b1731eee2675e
2024-06-08 08:43:27 +00:00
Android Build Coastguard Worker
3656710da9 Version bump to AP3A.240607.004.A1 [core/build_id.mk]
Change-Id: I02883aaaa31e15737b0600f45e8cb7cd482f47a4
2024-06-08 08:42:14 +00:00
Treehugger Robot
6fd890a5e5 Merge "Add license metadata declaration in device/generic/goldfish" into main am: a96b36bd9f am: fc9567c25b
Original change: https://android-review.googlesource.com/c/platform/build/+/3113262

Change-Id: I32983f131d32c1519e52daba6f7b879c3fa17ff2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-08 02:42:57 +00:00
Treehugger Robot
fc9567c25b Merge "Add license metadata declaration in device/generic/goldfish" into main am: a96b36bd9f
Original change: https://android-review.googlesource.com/c/platform/build/+/3113262

Change-Id: I27d42d389336a7fd2edb7f3b08a7f75a3c971f8c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-08 02:24:47 +00:00
Treehugger Robot
a96b36bd9f Merge "Add license metadata declaration in device/generic/goldfish" into main 2024-06-08 02:07:02 +00:00
Android Build Coastguard Worker
1064d3dd34 Make change and version bump to AP3A.240608.001
Snap for 11944020 from 55b92a6726 to 24Q3-release

Change-Id: I373279a62622fca645db207ec334fd538e3ae93c
2024-06-08 01:51:29 +00:00
Zhuoyao Zhang
6579539668 Merge "Move the impl of run_tool_with_logging into shell_utils.sh" into main am: df1ba7c5ff am: 99d5a16cf7
Original change: https://android-review.googlesource.com/c/platform/build/+/3109346

Change-Id: Id674e385717943f4fdc23744406055a9b8ee237c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-08 01:30:48 +00:00
Zhuoyao Zhang
99d5a16cf7 Merge "Move the impl of run_tool_with_logging into shell_utils.sh" into main am: df1ba7c5ff
Original change: https://android-review.googlesource.com/c/platform/build/+/3109346

Change-Id: Ia92e745c9f0b861972979e76cd46ef1c1add28be
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-08 01:16:20 +00:00
Treehugger Robot
c75273461d Merge "Add support to disable adb root on userdebug builds based on product config" into main am: 878141b810 am: 812d3e988c
Original change: https://android-review.googlesource.com/c/platform/build/+/3118597

Change-Id: I2f91943b5045dc3ac89eb1ddcec0c5e3de811f3a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-08 01:09:14 +00:00
Zhuoyao Zhang
df1ba7c5ff Merge "Move the impl of run_tool_with_logging into shell_utils.sh" into main 2024-06-08 00:53:08 +00:00
Treehugger Robot
812d3e988c Merge "Add support to disable adb root on userdebug builds based on product config" into main am: 878141b810
Original change: https://android-review.googlesource.com/c/platform/build/+/3118597

Change-Id: Idc6a114fa58a832dac67000489c97d00ae1a4975
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-08 00:46:16 +00:00
Treehugger Robot
878141b810 Merge "Add support to disable adb root on userdebug builds based on product config" into main 2024-06-08 00:26:20 +00:00
Treehugger Robot
a8fb229469 Merge "Fix expansion of _include_stack in _import-node" into main am: 7120481a00 am: e48e393a12
Original change: https://android-review.googlesource.com/c/platform/build/+/3119358

Change-Id: Ic1b29682425660bd6d975e7ea9e11f1a2affb8a0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-07 23:56:33 +00:00
Treehugger Robot
e48e393a12 Merge "Fix expansion of _include_stack in _import-node" into main am: 7120481a00
Original change: https://android-review.googlesource.com/c/platform/build/+/3119358

Change-Id: I8d0014c551d42be8cf3e81cd23e6b1378314dd12
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-07 23:42:17 +00:00
Joe Onorato
d4b4224e02 Add support to disable adb root on userdebug builds based on product config
Test: manually verify
Bug: 345480978
Change-Id: I00cf7d30f66137055ed0aa495bf3d98143c391b7
2024-06-07 16:24:06 -07:00
Treehugger Robot
7120481a00 Merge "Fix expansion of _include_stack in _import-node" into main 2024-06-07 23:22:22 +00:00
Zhuoyao Zhang
de884897d1 Merge "Remove run_tool_with_logging function from envsetup.sh" into main am: 997c0b3b77 am: 40fb1dab24
Original change: https://android-review.googlesource.com/c/platform/build/+/3096107

Change-Id: Ia9e4314bc6747804f958c37a84c107aadba5d5a8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-07 23:02:06 +00:00
Joe Onorato
1f6eddbc35 Move the impl of run_tool_with_logging into shell_utils.sh
- This lets other shell scripts use it without being a shell function
- Simplifies run_tool_with_logging which is now in build/soong/bin

Bug: 340648588
Test: atest run_tool_with_logging
Change-Id: I1c1c5c1b115f155929c027c2ea82df5da8b190de
2024-06-07 22:54:41 +00:00
Zhuoyao Zhang
40fb1dab24 Merge "Remove run_tool_with_logging function from envsetup.sh" into main am: 997c0b3b77
Original change: https://android-review.googlesource.com/c/platform/build/+/3096107

Change-Id: Ia5825f0fe420202c446ffc0276cd594e57e3f888
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-07 22:46:15 +00:00
Zhuoyao Zhang
997c0b3b77 Merge "Remove run_tool_with_logging function from envsetup.sh" into main 2024-06-07 22:33:20 +00:00
Android Build Coastguard Worker
f99bbd39c1 Version bump to AP3A.240607.004 [core/build_id.mk]
Change-Id: I80d8f14a5f2169c72a87d98d75ccb0afbd290fab
2024-06-07 22:29:34 +00:00
Spandan Das
653237c2a4 Merge "Prevent implicit outputs created during dexpreopt_config.zip" into main am: d7c448f0f7 am: cc4e318dce
Original change: https://android-review.googlesource.com/c/platform/build/+/3117879

Change-Id: I505bb16d818082d2abd62a0e278f10d2d1110713
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-07 22:06:35 +00:00
Luca Farsi
040fabea76 Add optimized build features in build_test_suites
Add the optimized build feature in build_test_suites. WIP

Test: WIP
Bug: 342264003
Change-Id: I05a4ac4026c345f7ced771aa6deb1b6d1c38705c
2024-06-07 15:01:18 -07:00
Spandan Das
cc4e318dce Merge "Prevent implicit outputs created during dexpreopt_config.zip" into main am: d7c448f0f7
Original change: https://android-review.googlesource.com/c/platform/build/+/3117879

Change-Id: I5043fae20d7b533fe8fa4d1de1aa345c27c2a63f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-07 21:51:03 +00:00
Rashid Zaman
7a29da75fe Fix expansion of _include_stack in _import-node
During product configuration after a subgraph has been fully imported,
i.e. a makefile and all makefiles it inherits from have been imported,
the makefile representing the root node of this subgraph is meant to be
removed from _include_stack in the _import-node macro via the call to
the wordlist function. Instead, _include_stack is being cleared because
the last argument to the wordlist function is escaped so when it is
expanded before being passed to wordlist instead of expanding to the
value of _include_stack the reference to _include_stack is unescaped.
Fix this by removing the escaping of the variable reference.

This issue has no impact on product configuration but the correct value
of _include_stack helps when debugging product configuration because,
for example, the dumpconfig generated by 'product-config' contains the
value of _include_stack when nodes are imported.

Bug: 345709996
Test: lunch aosp_cf_x86_64_phone-trunk_staging-userdebug && \
  m nothing shows no change to build.ninja files
Test: Run product-config and dumpconfig.csv shows correct include
  stack, e.g. for telephony_product.mk

Change-Id: I5a9b22fffc147ceea3d49e298b1bbad45f71332c
Signed-off-by: Rashid Zaman <rashidz@meta.com>
2024-06-07 14:46:16 -07:00
Spandan Das
d7c448f0f7 Merge "Prevent implicit outputs created during dexpreopt_config.zip" into main 2024-06-07 21:28:44 +00:00
Spandan Das
d9d72c46ba Prevent implicit outputs created during dexpreopt_config.zip
$PRODUCT_OUT/dexpreopt_config.zip is created by zipping all the
dexpreopt configs of individual apps. These config files are created in
$PRODUCT_OUT/dexpreopt_config, and this dir is as used as -C for
soong_zip.

In the current implementation, this build action also implicitly copies
global configuration files dexpreopt.config and dexpreopt_soong.config
into $PRODUCT_OUT/dexpreopt_config with the intent of being included in
the resultant zip file. These implicit outputs are unknown to ninja.

This CL prevents creation of these implicit outputs.
out/soong/dexpreopt_soong.config and
out/soong/dexpreopt_<arch>/dexpreopt.config is now passed directly to
soong_zip via -f.

Bug: 333316620
Test: m out/target/product/vsoc_x86_64/dexpreopt_config.zip # no longer
bit identical since the relative order changes, dexpreopt(_soong).config
now appears at the bottom of the zip
Test: zipcmp dexpreopt_config.zip.before dexpreopt_config.zip.after # no
diffs

Change-Id: Ib30c9a5c436e263231f9688129ab94664277b841
2024-06-07 17:45:19 +00:00
Tongbo Liu
55b92a6726 Merge "fix wrong mts folder issue" into main 2024-06-07 17:02:49 +00:00
Android Build Coastguard Worker
a27a212c03 Version bump to AP3A.240607.003 [core/build_id.mk]
Change-Id: Ice34524daef594c1c073fcdca6e18704edddb9df
2024-06-07 16:17:23 +00:00
Treehugger Robot
b4cf9be5fb Merge "Build build_flags.json in soong" into main am: 04837c61f3 am: 4401accfe0
Original change: https://android-review.googlesource.com/c/platform/build/+/3011233

Change-Id: I6e32f3b30d749b092f71ab6fd6bcc736605cca2c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-07 05:50:40 +00:00
Yihan Dong
b89bb9d547 fix wrong mts folder issue
Bug: 345042907
Test: m mts-mainline-infra
Ignore-AOSP-First: For internal use

Change-Id: I457403b0f9b50179d7b6ca9e13d1040b2a039b54
2024-06-07 05:31:20 +00:00
Treehugger Robot
4401accfe0 Merge "Build build_flags.json in soong" into main am: 04837c61f3
Original change: https://android-review.googlesource.com/c/platform/build/+/3011233

Change-Id: Ia33e4242d757bf6be4158039d5f88147ec7d99b8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-07 05:31:15 +00:00
Treehugger Robot
04837c61f3 Merge "Build build_flags.json in soong" into main 2024-06-07 05:12:31 +00:00
Android Build Coastguard Worker
f2415d92a7 Version bump to AP3A.240607.002 [core/build_id.mk]
Change-Id: Ia502683e859fcaf7a5221701ded11fca18b168be
2024-06-07 00:52:58 +00:00
Zhuoyao Zhang
1698d49b55 Remove run_tool_with_logging function from envsetup.sh
As part of the build team's effort to cleanup envseup.sh.
Remove the run_tool_with_logging rundtion from envsetup.sh and add it
as a standalone script under build/soong/bin

Test: atest run_tool_with_logging
Test: manually do source envsetup.sh and run adb devices -l and check
the event log is sent to clearcut, tested with both bash and zsh

Bug: 342066042
Change-Id: I9c23a1b0a4b5790fb32f5e84fd7421ee6b36bdb0
2024-06-06 23:53:36 +00:00
Android Build Coastguard Worker
83ef037e4a Make change and version bump to AP3A.240607.001
Snap for 11938003 from 7e008bd5b9 to 24Q3-release

Change-Id: I2bbf3a30acf4200fc80549b561a8c152d251cc18
2024-06-06 23:49:26 +00:00
Treehugger Robot
adbe658f63 Merge "Drop product config include tags" into main am: 27d977e49b am: 4203b5baa7
Original change: https://android-review.googlesource.com/c/platform/build/+/3098637

Change-Id: Ieff76d73c26a1470bc99d8fc120a9f4dbb680d70
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-06 22:38:46 +00:00
Treehugger Robot
4203b5baa7 Merge "Drop product config include tags" into main am: 27d977e49b
Original change: https://android-review.googlesource.com/c/platform/build/+/3098637

Change-Id: I2eabcd961c55645bfe4e74cf5d4f4ccf6638290e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-06 22:16:18 +00:00
Treehugger Robot
27d977e49b Merge "Drop product config include tags" into main 2024-06-06 22:12:38 +00:00