Commit graph

83961 commits

Author SHA1 Message Date
Treehugger Robot
34be43abf9 Merge "Pass --non-updatable-system flag to aapt2 when versionCode is unspecified" into main am: 0ef709565e am: 27c00a8bd2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3076227

Change-Id: Id3ff81abfb8448f0e42dc44c7d06c1e75c9dab2f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-14 03:43:32 +00:00
Treehugger Robot
27c00a8bd2 Merge "Pass --non-updatable-system flag to aapt2 when versionCode is unspecified" into main am: 0ef709565e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3076227

Change-Id: I3b90331dc154b29292a9fcf72caf70458eaff233
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-14 03:38:01 +00:00
Treehugger Robot
0ef709565e Merge "Pass --non-updatable-system flag to aapt2 when versionCode is unspecified" into main 2024-06-14 03:36:09 +00:00
Cole Faust
dde5544d78 Merge "Make the cflags property configurable" into main am: 1b0d92919d am: 0f81d85278
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3131289

Change-Id: Ie0ae0cb924c2371308e59d730ffea8cad34db962
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-14 03:13:09 +00:00
Cole Faust
0f81d85278 Merge "Make the cflags property configurable" into main am: 1b0d92919d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3131289

Change-Id: I56760a2763d6d41d82696d0286085c95d09dfa8d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-14 03:08:08 +00:00
Cole Faust
1b0d92919d Merge "Make the cflags property configurable" into main 2024-06-14 02:59:29 +00:00
Treehugger Robot
8806166b1d Merge "release_config: various cleanup" into main am: 000fe5ac5d am: 4c8f885b84
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3129154

Change-Id: I6fa7afca689c54c2f95e8c65c026da78633a5591
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-14 01:59:09 +00:00
Treehugger Robot
4c8f885b84 Merge "release_config: various cleanup" into main am: 000fe5ac5d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3129154

Change-Id: Iddd2935b353fdfb8a22fccdbe5aa56c6cc17496d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-14 01:51:17 +00:00
Treehugger Robot
000fe5ac5d Merge "release_config: various cleanup" into main 2024-06-14 01:46:45 +00:00
Zi Wang
58b583f64d Merge "Use OutputFilesProvider on aconfig_declarations_group" into main am: 8f3fd0a049 am: 2d92d1dc3a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3126616

Change-Id: I3b4ae3de38159917a3940ffb60894268fb511d55
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-14 00:27:57 +00:00
Zi Wang
3474465b17 Merge "Use OutputFilesProvider on syspropJavaGenRule" into main am: d156fee224 am: 4873775c9f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3125338

Change-Id: I21205b35b3db249c498f49b0406697da935a3e7c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-14 00:27:12 +00:00
Zi Wang
2d92d1dc3a Merge "Use OutputFilesProvider on aconfig_declarations_group" into main am: 8f3fd0a049
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3126616

Change-Id: I5e6a86cc7ac06b2a327ab11eee31bfa0c7aef585
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-14 00:20:46 +00:00
Zi Wang
4873775c9f Merge "Use OutputFilesProvider on syspropJavaGenRule" into main am: d156fee224
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3125338

Change-Id: I3f032438be2987dbdf7fa2d3d85278d00a44055f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-14 00:20:09 +00:00
Zi Wang
8f3fd0a049 Merge "Use OutputFilesProvider on aconfig_declarations_group" into main 2024-06-14 00:17:05 +00:00
Zi Wang
d156fee224 Merge "Use OutputFilesProvider on syspropJavaGenRule" into main 2024-06-14 00:16:50 +00:00
Treehugger Robot
6a2852ec9a Merge "Properly track where a build flag is declared" into main am: 5078551e97 am: aac618bb2d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3132914

Change-Id: I111801efaa4b4923787f935fe7d29e1399bb028f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-14 00:13:01 +00:00
Treehugger Robot
aac618bb2d Merge "Properly track where a build flag is declared" into main am: 5078551e97
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3132914

Change-Id: I661af7b1cdcabe87b0d71b0113cd2087823ccc10
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-14 00:04:36 +00:00
Treehugger Robot
5078551e97 Merge "Properly track where a build flag is declared" into main 2024-06-14 00:02:05 +00:00
Treehugger Robot
401ac9c067 Merge "Add following directories to Android.mk denylist to block new Android.mk files." into main am: 1571ad9605 am: 55fa55c62e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3126355

Change-Id: Ic3ae432f078cec33abf9c3ce57441a5839b33173
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-13 23:57:32 +00:00
Cole Faust
2530b44656 Only write release config files if they've changed
Currently, when you do `m` repeatedly, it does a little bit of
rebuilding to copy release config files around. If we change
release-config to only rewrite the files if they've changed, we
get a proper "ninja: no work to do." message.

Bug: 346757289
Test: m repeatedly
Change-Id: I9c1f6d34ec20d14b684a0183c5ec457ea92440f9
2024-06-13 16:56:24 -07:00
Treehugger Robot
55fa55c62e Merge "Add following directories to Android.mk denylist to block new Android.mk files." into main am: 1571ad9605
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3126355

Change-Id: Ib5c59c4e6d5f2b650fbb41eb49973520e634d4f7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-13 23:49:25 +00:00
Treehugger Robot
1571ad9605 Merge "Add following directories to Android.mk denylist to block new Android.mk files." into main 2024-06-13 23:43:25 +00:00
Treehugger Robot
ae828966a5 Merge "Modify the installation rules of sh binary based on the image variants" into main am: 6c76ad374e am: cbcabf569c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3125655

Change-Id: Icb3d6491904deaa0805dba398e767c2aca6267fe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-13 23:03:23 +00:00
Android Build Coastguard Worker
094fac040e Snap for 11967491 from f903442099 to 24Q3-release
Change-Id: I59a139b0fc1abe6c4d73fb37e3c6e15696ae6ef1
2024-06-13 23:00:37 +00:00
Treehugger Robot
cbcabf569c Merge "Modify the installation rules of sh binary based on the image variants" into main am: 6c76ad374e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3125655

Change-Id: Ia0455f4b15aa86bef47722e15d123642376bdc7b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-13 22:57:27 +00:00
Treehugger Robot
6c76ad374e Merge "Modify the installation rules of sh binary based on the image variants" into main 2024-06-13 22:52:03 +00:00
LaMont Jones
97e29a9cb4 Properly track where a build flag is declared
This allows us to generate an error when it is then set in an earlier
location in the list.

Bug: 346883187
Test: manual
Change-Id: I1c8389ff0d5a16c080008967ab5e0b9b93101301
2024-06-13 15:49:29 -07:00
Cole Faust
fee6fdea22 Add test for AppendSimpleValue
Bug: 346922064
Test: m nothing --no-skip-soong-tests
Change-Id: I18d82cf5ca20b1c9fea9751fee742577b5173374
2024-06-13 15:35:17 -07:00
mrziwang
937f35f464 Use OutputFilesProvider on aconfig_declarations_group
In the context of incremental soong, the output files
inter-module-communication will be through OutputFilesProvider.
The OutputFileProducer interface will be deprecated.

This CL also removes the unused field "intermediatePath" from
build_flag_declarations and aconfig_declarations

Test: CI
Bug: 339477385
Change-Id: I8417db7ca6ece50b3ecd807fc3b6356aa52b18e0
2024-06-13 15:03:16 -07:00
Treehugger Robot
e18a1b66a4 Merge "Call PackageFile for dexpreopt files of APEX bundles." into main am: 9034af498e am: 0adcd9aefa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3128073

Change-Id: I967af1f331806ab22e9ba9ddd4481fc630f7180e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-13 21:58:43 +00:00
Jihoon Kang
7583e835f7 Cleanup ImageInterface.SetImageVariation
This change modifies the interface method of
ImageInterface.SetImageVariation so that the image variation is set
directly at the caller image variation module, instead of passing the
pointer to set the image variation.

Test: m nothing
Change-Id: I8eadb5149365530243e19a8cd37eb49d335fbeef
2024-06-13 21:56:23 +00:00
Cole Faust
e96c16a806 Make the cflags property configurable
So that you can use select statements on it. The current modivation
is to convert a module from make to bp with minimal soong config
variable boilerplate.

Bug: 342006386
Bug: 346922064
Test: m nothing --no-skip-soong-tests
Change-Id: I48d5a11ad3aa65c24cc199458634a5fdbeab2f64
2024-06-13 14:51:14 -07:00
Treehugger Robot
0adcd9aefa Merge "Call PackageFile for dexpreopt files of APEX bundles." into main am: 9034af498e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3128073

Change-Id: I40cce87cc466de96df45e05c9a6cf7b073725ec8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-13 21:49:51 +00:00
Jihoon Kang
71825167e0 Modify the installation rules of sh binary based on the image variants
This change modifes the build rules of sh binary module type so that:
- The installation paths respects the image variations and the
  *_available properties.
- The androidmk entries have subnames so that the names of the different
  variants do not collide.

Test: Patch ag/27004177 and run m nothing
Bug: 336582138
Change-Id: Id85c428980ab459bff8d84098bd6c501a12231ed
2024-06-13 21:49:47 +00:00
Treehugger Robot
9034af498e Merge "Call PackageFile for dexpreopt files of APEX bundles." into main 2024-06-13 21:46:03 +00:00
mrziwang
ba2a460008 Use OutputFilesProvider on syspropJavaGenRule
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: I3b1cb3a4cfafa1385ef27a427009abb13accf834
2024-06-13 14:16:52 -07:00
Zi Wang
0fb952bb48 Merge "Use OutputFilesProvider on prebuilt_etc" into main am: afc28427cf am: 3581dc9734
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3125335

Change-Id: Ibfc731a8e20a856bf7f3e067ec0f1f2ff17ac6b6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-13 21:12:56 +00:00
Zi Wang
3581dc9734 Merge "Use OutputFilesProvider on prebuilt_etc" into main am: afc28427cf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3125335

Change-Id: Ideac73b3f2784718a0787a604fca6684dba31f67
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-13 21:04:23 +00:00
Zi Wang
afc28427cf Merge "Use OutputFilesProvider on prebuilt_etc" into main 2024-06-13 20:56:57 +00:00
Treehugger Robot
f903442099 Merge "Remove timestamp from local build number" into main am: 68f5fbf99b am: 220d0340fb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3131837

Change-Id: Icb9e88dcb6ae1b7e4d85ee9bd072ffd68847e41c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-13 18:57:38 +00:00
Treehugger Robot
220d0340fb Merge "Remove timestamp from local build number" into main am: 68f5fbf99b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3131837

Change-Id: I5ba8743ad87e9ed2ef6a010104ff37385fcecdad
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-13 18:49:36 +00:00
Treehugger Robot
68f5fbf99b Merge "Remove timestamp from local build number" into main 2024-06-13 18:45:09 +00:00
Cole Faust
5591460e81 Remove debug/release cflags
These were never fully implemented, release cflags are the same as
regular cflags, and debug cflags are not used at all.

Bug: 346922064
Test: Presubmits
Change-Id: I0e8914e03f3a092bbc816cabf75255c55c3531e4
2024-06-13 10:49:13 -07:00
Cole Faust
1ae7b774eb Remove timestamp from local build number
The build_info.prop file was converted to soong, which then caused it to
have a stale build number due to not adding the build number file as a
dependency to avoid rebuilds. I added it as a dependency to fix the
staleness, but it always rebuilds locally now.

I think the way it worked before, it would get stale build numbers,
except that it was cleared with installclean which was always run on CI.
Now that it's a soong module and generated in out/soong/.intermediates
it's not cleared by installclean. I could make a system to register
files that should be installclean'd from a soong module, but I'd
eventually like to eliminate the need to run installclean entirely.

So as an alternative, just make the build number not change every build
when doing local builds, by removing the timestamp from it.

Bug: 346757289
Test: m repeatedly and observe no rebuilds the second time (of the system image, the build flags infrastructure seems to do some small rebuilding)
Change-Id: I0207feb739523dde3e89d1e5c4822865f641c313
2024-06-13 10:27:20 -07:00
Aleks Todorov
ec2cf1e580 cc: Make cc_genrule defaultable
Allows genrule_defaults to be used with cc_genrule.

This change does not create a cc_genrule_defaults, that can be done in a
follow-up change.

Bug: 325444956
Test: m [custom cc_genrule with defaults]
Change-Id: I9e2d26b31e04eb972801421d25b1ff6c8ef75369
2024-06-13 17:34:45 +01:00
LaMont Jones
09721868db release_config: various cleanup
- move WriteMakefile to release_config.go
- use slices.Sort instead of slices.SortFunc where applicable.
- improve error message when inheriting an invalid release config

Bug: None
Test: manual
Change-Id: Id959ddccc75fad912518d5cce8d14da506e0bbea
2024-06-13 09:18:03 -07:00
Justin Yun
613bdc5b64 Call PackageFile for dexpreopt files of APEX bundles.
Soong generates AndroidMk modules and Make installs the required
dexpreopt files for APEX bundles. This dependency is not tracked by
the soong and missing from the soong filesystem.
Call PackageFile for the dexpreopt files of APEX bundles to install
the files in the soong-built system image.

Bug: 346439786
Test: lunch aosp_cf_x86_64_phone-trunk_staging-userdebug \
      && m aosp_cf_system_x86_64
Change-Id: I6af4afe5b3183c89bf687ac779007b87e1d7e948
2024-06-13 12:37:04 +09:00
Justin Yun
c1a4ff3726 Call PackageFile for dexpreopt files am: 22c8aca893 am: e024ec0ba1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3110884

Change-Id: Ibe89fbf2667e6f2b2294e3a70e89816c93b5d401
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-13 02:44:03 +00:00
Justin Yun
e024ec0ba1 Call PackageFile for dexpreopt files am: 22c8aca893
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3110884

Change-Id: I0ecc092ec4dacfd90b67ccdd0d213021c951d2c6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-13 02:36:00 +00:00
Justin Yun
22c8aca893 Call PackageFile for dexpreopt files
Dexpreopt files use RuleBuilder.Install() that installs the file from
Make. By calling PackageFile, this information is also shared to
soong PackagingSpec.

Bug: 339314890
Test: See if .prof, .bprof, and vdex files are installed with
      "m aosp_cf_system_x86_64"

Change-Id: I42167603ecfd4334e4f35602bdf03a21846fc798
2024-06-13 09:04:42 +09:00