Commit graph

4697 commits

Author SHA1 Message Date
Cole Faust
e5bf3fb4c2 Revert^2 "Fix erroneous "Field requires API level 33 (current min is 32)" warnings"
This reverts commit 5d80d895b6.

Reason for revert: The issue that broke the build the first time this was submitted has been fixed in ag/19125702. Also the errorprone build was added to presubmit for changes to these files so we should hopefully catch any other issues at presubmit now: cl/458501206

Change-Id: I80ca08df49c58a1ad70de917822301368d49fc67
2022-07-01 19:39:14 +00:00
Treehugger Robot
804d04f36d Merge "Allowlist more cc mainline modules blockers" am: d9cb4b746c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2132795

Change-Id: Id89b82571da8dc904d254cc7f761226106ad45ed
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-01 19:10:12 +00:00
Treehugger Robot
d9cb4b746c Merge "Allowlist more cc mainline modules blockers" 2022-07-01 18:53:07 +00:00
Treehugger Robot
9fe821b0c6 Merge "Don't pass host cross linux musl modules to Make" am: f47fe38686
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2139099

Change-Id: I97e79b3df1e605d20276f06c407a3ce74a1edfd8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-01 17:37:55 +00:00
Treehugger Robot
f47fe38686 Merge "Don't pass host cross linux musl modules to Make" 2022-07-01 17:11:41 +00:00
Liz Kammer
63367e1da9 Allowlist more cc mainline modules blockers
Test: mixed_droid.sh
Change-Id: Ice133b88d3420d9b976d1632da3e7e5da6bb5c3c
2022-07-01 12:33:59 -04:00
Treehugger Robot
f4da9403f3 Merge changes I93edfd61,Icd23b542,I58c84607,Icfa73a75 am: 4d2f767217
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2139101

Change-Id: I35551b07799c29cb56e2ffdaf7c1693b23f4f8d5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-01 13:10:11 +00:00
Treehugger Robot
4d2f767217 Merge changes I93edfd61,Icd23b542,I58c84607,Icfa73a75
* changes:
  Pass -fno-sanitize=vptr,function for musl
  Use musl rust prebuilts for USE_HOST_MUSL=true
  Don't package host cross modules in javaFuzzPackager
  Add rust musl arm and arm64 toolchains
2022-07-01 12:46:58 +00:00
Sasha Smundak
966994af92 Reformat the test to make them more readable. am: e3cf1abefc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2142353

Change-Id: I5dc19256f8603101845dc56a53b87902049e3042
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-30 23:30:24 +00:00
Sasha Smundak
e3cf1abefc Reformat the test to make them more readable.
Test: treehugger
Change-Id: I28ccd531a5dadcee3cbdebd5f5ba6db1605662d9
2022-06-30 14:20:55 -07:00
Usta Shrestha
5cc4165702 Merge "null build upon repeated mixed build" am: 86363835ae
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2095253

Change-Id: I08d32ec6550688fce86631a942add1de2d243392
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-30 14:31:15 +00:00
Usta Shrestha
86363835ae Merge "null build upon repeated mixed build" 2022-06-30 14:11:20 +00:00
Sasha Smundak
ab8c3df31a Fix config string for the generic target. am: 9d46dcf908
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2121034

Change-Id: I7a11aae2cab98e774696a15e8fa65ba485461e13
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-30 05:52:59 +00:00
Sasha Smundak
9d46dcf908 Fix config string for the generic target.
For the generic target (i.e, arch == "common" and os == Device), the config
 string should be "target|common", not "x86_64|common".
 Also renamed local variable from `os`.

Bug: 232085015
Test: treehugger
Change-Id: I36e696203f207dd295ed7f109b7c07b576ebf3c2
2022-06-29 18:30:36 -07:00
Colin Cross
9a027be6bc Don't pass host cross linux musl modules to Make
Make doesn't understand host cross linux musl modules, don't pass
them to make.  Continue passing them to make when USE_HOST_MUSL=true
is set.

Bug: 236052820
Test: builds with linux musl arm64 host cross configured
Change-Id: Id8b90ca0fa698fdf658156b458cc385387768414
2022-06-28 15:16:15 -07:00
Colin Cross
39a1814f24 Don't package host cross modules in javaFuzzPackager
Normally the host cross OS is windows, which only builds a few opted-in
modules.  When the host cross OS is set to linux_musl it builds all
modules that haven't explicitly opted out, producing linux_musl_common
variants of java modules.  Filter these out of javaFuzzPackager to
avoid conflicts with the linux_glibc_common modules.

Host cross common variants targets were missing the HostCross flag,
so also set it in getCommonTargets.

Bug: 236052820
Test: builds with linux_musl arm64 host cross enabled
Change-Id: I58c846076091bee7df50016c240a176c039c42e9
2022-06-28 15:16:15 -07:00
William Loh
5a082f9a33 Propagate max_sdk_version to manifest_fixer
If max_sdk_version is included in Android.bp that value will now be
propagated to manifest_fixer.py. This value will then be used to
override any maxSdkVersion attribute set on permission or
uses-permission tags in the android manifest if maxSdkVersion="-1".

Bug: 223902327
Test: add max_sdk_version to Android.bp for test app
Test: create permission in test app manifest with maxSdkVersion="-1"
Test: run test to check maxSdkVersion=max_sdk_version
Change-Id: Ic533ef2a41b9ecc9ee68c69399026df47ee945b7
2022-06-28 22:07:23 +00:00
Jooyung Han
2c65d2ca83 Remove min_sdk_version allowlist
This hard-coded list causes inconsistent behavior regarding -target
triple and _ANDROID_APEX_MIN_SDK_VERSION_ macro for native modules.

Bug: 158059172
Test: m
Merged-In: Iae3ecb3bfaefc2ee73ed38a9268c68b6673f30c5
Change-Id: Iae3ecb3bfaefc2ee73ed38a9268c68b6673f30c5
(cherry picked from commit 870ab9c0f78327d92a871ac58c0337db8ae92245)
2022-06-29 06:42:05 +09:00
Xin Li
313fdb5812 Merge tm-dev-plus-aosp-without-vendor@8763363
Bug: 236760014
Merged-In: I1421fb0dbcdb759281259abfae7bddc9aecdaa56
Change-Id: If059be00e6bdaaa94171b456afae1d585540639c
2022-06-28 21:23:06 +00:00
Usta Shrestha
ef92225a67 null build upon repeated mixed build
no implicit deps on bazel-tools

Test: USE_BAZEL_ANALYSIS=1 ../bazel/ci/incremental_mixed_build.sh
Bug: b/216194240
Change-Id: Ibbd87c6a6cc2fddf21fba37a6bb4e72adc209576
2022-06-28 15:37:12 -04:00
Vinh Tran
dd3ea92609 Merge "Replace API level codename with number" 2022-06-28 13:39:37 +00:00
Paul Duffin
23477d79f6 Merge "Add protected_properties support in defaults modules" 2022-06-28 12:02:01 +00:00
Vinh Tran
f192474a60 Replace API level codename with number
This CL fixes a bug when Soong pass `-target` with a non-digit suffix in Clang. As mentioned in b/236753843, Clang's version parsing expects to see an integer in the target string so it ignores the
S suffix.

Test: m gwp_asan_crash_handler && make sure -target is aarch64-linux-androidS instead of aarch64-linux-android31
Test: go test -run ^TestNonDigitMinSdkVersionInClangTriple$ android/soong/cc
Bug: 236753843
Change-Id: I258ecc52083dbf3471d23cf310e0ad54440f1908
2022-06-28 01:33:18 +00:00
Vinh Tran
8d4ae9cbf5 Merge "Deprecate depfile in gensrcs" 2022-06-27 21:17:27 +00:00
Colin Cross
2bce04f76f Merge "Add linux_musl arm+arm64" 2022-06-27 18:37:07 +00:00
Cole Faust
745ae265c2 Merge "Allowlist bazel-built partition directories" 2022-06-27 17:20:38 +00:00
Vinh Tran
140d588a3d Deprecate depfile in gensrcs
All existing gensrsc modulePartners who use the property can use BUILD_BROKEN_DEP_FILE to bypass the error

Test: CI
Bug: 179452413
Fix: 179452413
Change-Id: I7cd39484b43eba693d79188b9a374f192198f90f
2022-06-27 12:07:27 -04:00
Lukács T. Berki
034206cb90 Merge "Add godoc for TransitionMutator." 2022-06-27 06:52:42 +00:00
Lukacs T. Berki
0e691c1119 Add godoc for TransitionMutator.
Test: Presubmits.
Change-Id: I4f2e40afe1f16f4020403d2a03930b0f51fee71d
2022-06-27 08:52:08 +02:00
Colin Cross
a9b2aacf07 Add linux_musl arm+arm64
Add toolchains to support cross compiling to aarch64-linux-musl and
arm-linux-musleabihf.

Bug: 236052820
Test: build arm and arm64 musl sysroots
Change-Id: I47a9322929baff2492c6e8db989ece01fcbeb133
2022-06-24 13:46:36 -07:00
Usta Shrestha
2bc1cd96ef cosmetic: go warnings
Test: N/A
Bug: N/A
Change-Id: I9bad2cecb350e9539344ad7d81d83c93c31e54cd
2022-06-23 14:14:05 -04:00
Usta Shrestha
acd5a0c080 paths in depfiles are relative to $OUT_DIR
Test: USE_BAZEL_ANALYSIS=1 m libc droid
Bug: b/232250671
Change-Id: I7a570894371bd31339ab0cf3c619c30b3cf8cd73
2022-06-23 14:14:01 -04:00
Christopher Ferris
f7d0e02eab Merge "Remove reference to libbacktrace." am: 2ff57f9d00 am: dc30dcb4e0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2132416

Change-Id: I2803614c814721f845037f4adbbfde7d3c77b94e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-22 21:14:07 +00:00
Oriol Prieto Gascó
7d7bc5bef1 Merge "Hard-code apex_available handling for the btservices apex" into tm-dev am: 3bb9d7a8d9
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/18972588

Change-Id: I5c6cc4bc32174ba0739d7ed6b42ae0b1685c4ef6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-22 17:43:25 +00:00
Usta Shrestha
f4887dfb7a cosmetic changes am: 16ac13506e am: ed060fa87b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2132596

Change-Id: I834d871fdacd6ab561128b023c1b367854a63589
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-22 17:34:07 +00:00
Christopher Ferris
51506684f2 Remove reference to libbacktrace.
Bug: 120606663

Test: Builds.
Change-Id: Iefd6a60937a79155dd63ec79c66b347d5d1af01b
2022-06-22 10:30:05 -07:00
Usta Shrestha
16ac13506e cosmetic changes
Test: m nothing
Bug: N/A
Change-Id: Ia74a09a6ee42560562e2e1a15e972860e77a5724
2022-06-22 11:02:43 -04:00
Cole Faust
42c48ac133 Allowlist bazel-built partition directories
Bug: 232430910
Test: b test //build/bazel/tests/partitions:image_contains_apex_test --test_output=errors
Change-Id: Ie3f61a590d25310ff401e3575aaeecd6551f2404
2022-06-21 17:47:26 -07:00
Bob Badour
5f35225082 Fix escaping for package_name am: a10d5a2746 am: d5a951da99
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2133016

Change-Id: I053298497b76d6d5738ad5120affdcf62931c487
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-21 20:51:32 +00:00
Bob Badour
a10d5a2746 Fix escaping for package_name
Bug: 235333302

Test: m droid dist
Change-Id: I6e52b960be4171a9510edd4f2857f13cc3f54bc0
2022-06-21 11:12:01 -07:00
Jiyong Park
2f36d8e906 Merge "buildinfo_prop generates ro.build.version.known_codenames" am: 061d352801 am: 2e4bc136fd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2133112

Change-Id: I28ccd4839366114cf5958aa382e10c2e45f6d302
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-21 17:34:21 +00:00
Jiyong Park
3707384f02 buildinfo_prop generates ro.build.version.known_codenames
The sysprop is now generated as the corresponding Make variable
PLATFORM_VERSION_KNOWN_CODENAMES is imported.

Bug: 236602028
Test: atest ComposHostTestCases
Change-Id: Ife7e87ce5de65b57c51d5565e288807cf8360b28
2022-06-21 10:13:42 +09:00
Oriol Prieto Gasco
8132fbf8c1 Hard-code apex_available handling for the btservices apex
Bug: 236192423
Test: TH
Change-Id: Ie095ae22704a80e0ec171b1bb3fdc995f95a1c64
2022-06-19 23:13:25 +00:00
Lukács T. Berki
28e86cdebd Merge "Migrate sanitizers to transition mutators." am: 5ad0185b63 am: c0d25950f2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2123434

Change-Id: I05b8668cd8b2b24c31bc07633e639f0492aa0cd9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-18 20:17:49 +00:00
Lukacs T. Berki
6c71676d6c Migrate sanitizers to transition mutators.
The logic is not 100% provably the same since HEAD was quite
confusing at some points, but I did make an effort to preserve
functional equivalence.

In case that effort was not enough, it should be pretty easy to
tweak the logic at HEAD since it's still quite malleable.

Bug: 231370928
Test: Presubmits.
Change-Id: I17b2efbfb5c4d0aedd922caed54ff8d857e578df
2022-06-18 06:20:28 +02:00
Paul Duffin
d6f7851dee Merge "Treat <x> and <x>_compressed prebuilt APEXes as being equivalent" 2022-06-14 18:49:49 +00:00
Yu Liu
110f78ca8e Merge "Support cc code coverage for mixed build" am: 57c1edc4d9 am: 56868c621b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2103671

Change-Id: Ibe7fab143ee1ebbdbe4df73c1d173cc9c3c5a315
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-13 20:16:29 +00:00
Yu Liu
57c1edc4d9 Merge "Support cc code coverage for mixed build" 2022-06-13 18:57:50 +00:00
Romain Jobredeaux
9e8e7d7b86 Merge "Allow empty zip file in extra files in install command." into tm-dev 2022-06-13 13:24:06 +00:00
Paul Duffin
5556c5f17a Treat <x> and <x>_compressed prebuilt APEXes as being equivalent
(cherry picked from commit 1aa50564c7)

When extracting dex files from prebuilt APEXes the build fails if it
finds two or more prebuilt APEXes that could provide the dex files.
This change treats <x> and <x>_compressed APEXes as being the same
and always selects the uncompressed APEX.

Bug: 235284603
Test: m nothing
      # Added TestDuplicateButEquivalentDeapexersFromPrebuiltApexes
      # Failed without this change, works with it.
Merged-In: I805cb9dfa9f590c91585d75c4f4586b212b73d41
Change-Id: I805cb9dfa9f590c91585d75c4f4586b212b73d41
2022-06-13 13:16:53 +00:00
Treehugger Robot
af5e7280a5 Merge "Allowlist apexer for bp2build" am: ab12f792c0 am: d2c842be31
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2115757

Change-Id: I939c1813093cdb3a09f9508ec03b186e2d298e89
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-13 00:46:24 +00:00
Treehugger Robot
ab12f792c0 Merge "Allowlist apexer for bp2build" 2022-06-13 00:05:53 +00:00
Paul Duffin
5c24484a50 Merge "Treat <x> and <x>_compressed prebuilt APEXes as being equivalent" into tm-dev am: 60c0b9ec9c
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/18801840

Change-Id: Ib7e45cf518950d65e7b87da42a0f5883266b0c5e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-11 12:32:16 +00:00
Paul Duffin
60c0b9ec9c Merge "Treat <x> and <x>_compressed prebuilt APEXes as being equivalent" into tm-dev 2022-06-11 12:13:45 +00:00
TreeHugger Robot
d23c863fae Merge "Fix strip_prefix flags to strip install paths." into tm-dev 2022-06-10 23:06:33 +00:00
Treehugger Robot
302846a63b Merge "Fix strip_prefix flags to strip install paths." am: 20b623da89 am: 28b9607224
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2120624

Change-Id: I5c9edaeb2df8a61eb18fe9368dd2f8e9d1321343
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-10 20:32:30 +00:00
Bob Badour
f0529ec6da Merge "Fix Neural Networks API notice." into tm-dev 2022-06-10 18:14:49 +00:00
Treehugger Robot
20b623da89 Merge "Fix strip_prefix flags to strip install paths." 2022-06-10 18:07:41 +00:00
Paul Duffin
1aa50564c7 Treat <x> and <x>_compressed prebuilt APEXes as being equivalent
When extracting dex files from prebuilt APEXes the build fails if it
finds two or more prebuilt APEXes that could provide the dex files.
This change treats <x> and <x>_compressed APEXes as being the same
and always selects the uncompressed APEX.

Bug: 235284603
Test: m nothing
      # Added TestDuplicateButEquivalentDeapexersFromPrebuiltApexes
      # Failed without this change, works with it.
Change-Id: I805cb9dfa9f590c91585d75c4f4586b212b73d41
2022-06-10 11:05:53 +00:00
Bob Badour
3d16d5ddf8 Fix strip_prefix flags to strip install paths.
Bug: 235331488

Test: m droid dist

Change-Id: I3cd2af5d90e46a4c983728bc9b2d941d6ffda229
Merged-in: I3cd2af5d90e46a4c983728bc9b2d941d6ffda229
2022-06-09 15:00:08 -07:00
Bob Badour
c6ec9fb849 Fix strip_prefix flags to strip install paths.
Bug: 235331488

Test: m droid dist

Change-Id: I3cd2af5d90e46a4c983728bc9b2d941d6ffda229
2022-06-09 14:24:41 -07:00
Cole Faust
01243368d7 Allowlist apexer for bp2build
This also introduces a workaround for the fact that
apexer depends on aapt2, but aapt2 doesn't build
with bp2build yet. Aapt2 is removed from apexer's
requirements during bp2build.

Bug: 204244290
Test: ./build/bazel/ci/bp2build.sh
Change-Id: I837597ce035c7d5c06e1a3957166583a7a94b5c7
2022-06-09 13:28:25 -07:00
Liz Kammer
716b1ec4b5 Merge "Migrate more unblocked modules." am: 2320e27eb1 am: 1ffde1b892
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2097187

Change-Id: Idca66e019ee6803dc6fcc837794942d1d67e4ae8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-09 14:54:12 +00:00
Bob Badour
0e1befd4d1 Merge "Fix Neural Networks API notice." am: 229b7c4234 am: 25ae3ce9b0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2121038

Change-Id: I42131a379630937375d3d68c1b4d68c02d7bb5ab
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-09 14:21:05 +00:00
Liz Kammer
2320e27eb1 Merge "Migrate more unblocked modules." 2022-06-09 14:13:56 +00:00
Romain Jobredeaux
84efaf45bf Allow empty zip file in extra files in install command.
Test: m
Bug: 229901709
Change-Id: I4c8d1b16f2232d4cda75467615779145d2c7315e
Merged-In: I4c8d1b16f2232d4cda75467615779145d2c7315e
2022-06-09 10:11:46 -04:00
Bob Badour
e8febee28b Fix Neural Networks API notice.
Must quote the PackageName for embedded spaces.

Bug: 233936718

Test: m droid dist

Change-Id: Ida57800a9e733517f773faea92c90a357e0f58af
Merged-in: Ida57800a9e733517f773faea92c90a357e0f58af
2022-06-09 06:43:23 -07:00
Bob Badour
229b7c4234 Merge "Fix Neural Networks API notice." 2022-06-09 13:32:08 +00:00
Bob Badour
0d364eead5 Fix Neural Networks API notice.
Must quote the PackageName for embedded spaces.

Bug: 233936718

Test: m droid dist

Change-Id: Ida57800a9e733517f773faea92c90a357e0f58af
2022-06-08 18:20:27 -07:00
Cole Faust
2dd69922af Merge "Make filegroup paths relative to module dir in mixed builds" am: 5c6ebfa08c am: c6cba0c3ba
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2116276

Change-Id: I986f2472e3dad8bdade2543c002dc97bbb1f233f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-08 22:56:49 +00:00
Liz Kammer
5068eaeb06 Migrate more unblocked modules.
Test: mixed_droid.sh
Change-Id: I1f8d84c42029e4db34a5bdc2205983cff12997d2
2022-06-08 20:17:22 +00:00
Sam Delmerico
b706b4efef add multilib data_device_bins properties
Some targets need to be able to specify the specific architecture for a
data_device_bin module. This commit adds new properties to allow
specification of first, both, 32, or 64 multilib properties.

Bug: 231448797
Bug: 232408185
Test: go test ./java -run TestDataDeviceBinsBuildsDeviceBinary
Change-Id: I457cf4b1a9ccb28b46042f874c96bd0a87009fab
Merged-In: I457cf4b1a9ccb28b46042f874c96bd0a87009fab
2022-06-08 19:26:01 +00:00
Cole Faust
9a06d25be2 Make filegroup paths relative to module dir in mixed builds
filegroup.srcs must have a .rel() version of their paths
that is relative to the module directory. Previously in
mixed builds, the relative path wasn't filled in.

Bug: 229251008
Bug: 204244290
Test: go tests, and USE_BAZEL_ANALYSIS=1 m apexer with the following cl
Change-Id: I11a2a8b96139e0e7b956fa4c256a9a99c02f88f3
2022-06-08 11:47:24 -07:00
Sam Delmerico
b0837c2fe2 Merge "add multilib data_device_bins properties" am: a22e2c982d am: 88fa2f6a6a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2113524

Change-Id: Id91e9272c91768dd95cd549d9860667f8fe30a0a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-08 14:53:22 +00:00
Trevor Radcliffe
d456182dd1 Merge "Enable Mixed Builds for Prebuilt Library" am: 74e8df0741 am: d6b70adce7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2101150

Change-Id: Ia64712d0ca085e856c569ac6d06e58299d54e34b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-08 14:53:08 +00:00
Sam Delmerico
a22e2c982d Merge "add multilib data_device_bins properties" 2022-06-08 14:07:11 +00:00
Trevor Radcliffe
74e8df0741 Merge "Enable Mixed Builds for Prebuilt Library" 2022-06-08 13:51:13 +00:00
Trevor Radcliffe
5d6fa4d857 Enable Mixed Builds for Prebuilt Library
This change provides support for mixed builds for
cc_prebuilt_library modules and allowlists some such modules.

Fixes: 225938765
Test: Unit tests, run mixed builds and verify correctness
Change-Id: I04396c79661df6b9a43907859e4f96d0191e8e1b
2022-06-07 20:36:53 +00:00
Romain Jobredeaux
3962a8eff4 Merge "Allow empty zip file in extra files in install command." am: 41758c71be am: 9eadd04b98
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2100283

Change-Id: Ie566bd3e5e709abbb2ac7f52000f8e8094cc8160
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-07 15:53:41 +00:00
Romain Jobredeaux
41758c71be Merge "Allow empty zip file in extra files in install command." 2022-06-07 15:14:18 +00:00
Sam Delmerico
cc271e2065 add multilib data_device_bins properties
Some targets need to be able to specify the specific architecture for a
data_device_bin module. This commit adds new properties to allow
specification of first, both, 32, or 64 multilib properties.

Bug: 231448797
Bug: 232408185
Test: go test ./java -run TestDataDeviceBinsBuildsDeviceBinary
Change-Id: I457cf4b1a9ccb28b46042f874c96bd0a87009fab
2022-06-06 20:11:46 +00:00
Yu Liu
8d82ac58b4 Support cc code coverage for mixed build
Bug: 231322627
Test: Manual tests and unit tests
Change-Id: I786042af0d612192c54c3572f63a86a47174a242
2022-06-06 12:29:25 -07:00
Usta Shrestha
d2f726e468 Merge "minor dead code: unused format string" am: 93a9b9f471 am: bf241fdadf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2115093

Change-Id: I3301e7210e56bba2c04832b37421b9cc46e2e4e0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-06 18:33:53 +00:00
Usta Shrestha
93a9b9f471 Merge "minor dead code: unused format string" 2022-06-06 17:00:34 +00:00
Treehugger Robot
f938138325 Merge "Tool to create license metadata for copied target." am: 85f98765d2 am: 356a0bdfca
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2107157

Change-Id: I5fa26cedbb420a0b2706083a8179a23228d84f47
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-03 03:39:57 +00:00
Treehugger Robot
85f98765d2 Merge "Tool to create license metadata for copied target." 2022-06-03 02:05:02 +00:00
Liz Kammer
400896e0d7 Merge "Handle restricting to device only builds" am: 62ac8a0707 am: 33d59b4ef5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2098530

Change-Id: I4af093f3422811db07721da60f8c2f1c7700aeba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-02 21:16:24 +00:00
Liz Kammer
62ac8a0707 Merge "Handle restricting to device only builds" 2022-06-02 20:29:27 +00:00
Vinh Tran
255c5d4981 Merge changes from topics "bp2build-gensrcs", "bp2build-gensrcs-gendir" am: a1675a539f am: c4a69eb376
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2108333

Change-Id: I13a01a10fdb0d12de4d9b52fdf6f8a15941cc5fc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-02 18:20:24 +00:00
Treehugger Robot
4815e771f9 Merge "Make sure dist files have license metadata." am: f57b54cda7 am: c688531cba
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2063295

Change-Id: I09562d127844d389cb6af0c13833c6a463c826ad
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-02 18:19:54 +00:00
Vinh Tran
a1675a539f Merge changes from topics "bp2build-gensrcs", "bp2build-gensrcs-gendir"
* changes:
  Allowlist integration test for gensrcs
  Modify ConvertWithBp2build mutator to convert gensrcs to Bazel rule
2022-06-02 17:51:48 +00:00
Treehugger Robot
f57b54cda7 Merge "Make sure dist files have license metadata." 2022-06-02 17:37:46 +00:00
Usta Shrestha
2ccdb42098 minor dead code: unused format string
Using URL base64 encoding
(without padding, i.e. with trailing '=' or '==')
hash string width is 256/6 = 43 characters.

file size virtually unchanged,
  out/soong/build.ninja:  7,188,669,041 => 7,186,999,370 ie 1.6M

Bug: N/A
Test: manually verified (e.g. ran `m nothing` successfully)
Change-Id: I166d613e1fd857555da9611d420d6691806571c7
2022-06-02 11:37:20 -04:00
Bob Badour
4e7d74ceee Add gen_notice test. am: afd99fd305 am: c687edfae5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2103667

Change-Id: Ia66f0e5ce822f9539bd229d6831dbb117bc18734
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-02 04:56:11 +00:00
Bob Badour
5180438478 Make sure dist files have license metadata.
Bug: 151177513
Bug: 210912771

Test: m droid dist reportmissinglicenses

Change-Id: I0c85f6c49a3e9d9bb3219ed6ddfb939d90f80656
2022-06-01 21:07:25 -07:00
Bob Badour
5a1fcab110 Tool to create license metadata for copied target.
Bug: 213388645

Test: m copy_license_metadata
Test: m cts dist reportmissinglicenses

Change-Id: I75c196ceca221effb2d6c972e250f5d42854e42f
2022-06-01 18:56:26 -07:00
Bob Badour
afd99fd305 Add gen_notice test.
Test: m cts dist reportmissinglicenses
Change-Id: I1d630c3d14d27b7605ab13d204d34b6851a24d33
2022-06-01 17:57:00 -07:00
Vinh Tran
b69fd88773 Allowlist integration test for gensrcs
Tests are in aosp/2108410

Test: b build //build/bazel/examples/gensrcs/...
Bug: 179452413
Change-Id: Iea7da04d92ba7b6ac3d555d5f35765a48a68bf65
2022-06-01 20:28:39 +00:00
Cole Faust
fc821c4892 Merge "Allowlist apexer tools" am: 44b368df87 am: ef4c9a4a94
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2111813

Change-Id: I13d5940dc0c39fb7e91a2bed003d04dbd3edbe24
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 16:33:36 +00:00
Cole Faust
91a2e1020f Allowlist apexer tools
Bug: 204244290
Test: ./build/bazel/ci/bp2build.sh
Change-Id: I6bfe64bd435b721eb61eed2578ec9df02c7583d1
2022-05-31 16:13:46 -07:00
Liz Kammer
dfeb120324 Handle restricting to device only builds
By default, most module types are only enabled for device. Converting
this behavior and host_supported/device_supported properties allows us
to skip building incompatible targets.

Test: soong tests
Test: bp2build.sh
Change-Id: If1da523b4cc8c4cbf2bb26da063d9923b662cc32
2022-05-31 17:46:48 -04:00
Cole Faust
123a1fbabd Merge "Add bp2build converter for python protobuf files" am: 5317be265a am: 06c53221cf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2099296

Change-Id: I84c420d928dfaa6ec2eddb9fada5019d90d6750c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-31 20:00:29 +00:00
Cole Faust
5317be265a Merge "Add bp2build converter for python protobuf files" 2022-05-31 19:22:32 +00:00
Jingwen Chen
394f17a1f9 Denylist f2fscrypt because it's failing to compile for the host. am: 24a060cf88 am: ddfc7df790
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2110089

Change-Id: Icc361dfa8778ae61ffbf9903910ccf0e864598e7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-31 05:44:12 +00:00
Jingwen Chen
24a060cf88 Denylist f2fscrypt because it's failing to compile for the host.
Bug: 234340806
Test: bp2build.sh (CI)
Change-Id: Id437611f35a387949c664ff4385c464c12ce51f5
2022-05-30 14:19:01 +00:00
Cole Faust
b1848aa05f Merge "Allowlist tools that apexer uses" am: 97fd87e4db am: 1db05f65a4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2100359

Change-Id: Ib5da5bf1b13909e7a8ada353c9f4ab20f2fa4f58
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 20:54:26 +00:00
Cole Faust
97fd87e4db Merge "Allowlist tools that apexer uses" 2022-05-27 20:21:39 +00:00
Treehugger Robot
1f02fe781a Merge "Add filegroup srcs to json module graph" am: 0e3d36c582 am: c0f5453c29
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2107304

Change-Id: If6f12e2425dfa1a31573b36141ab9f3bdc606cb2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 14:09:48 +00:00
Treehugger Robot
0e3d36c582 Merge "Add filegroup srcs to json module graph" 2022-05-27 13:29:54 +00:00
Cole Faust
53b62098d0 Add bp2build converter for python protobuf files
Bug: 196084681
Test: b run //build/bazel/examples/python/protobuf:build_bazel_examples_python_protobuf_main --config=linux_x86_64
Change-Id: I4d806902d262351231f64686a5d24513a25d9749
2022-05-26 15:54:23 -07:00
Liz Kammer
5edc1411ee Add filegroup srcs to json module graph
This will allow us to do json analysis on a filegroup's inputs as they
will now have a corresponding phony action.

Test: m json-module-graph and check module-actions.json
Change-Id: Id1ab681c01689eef06205d4a7fe8cf8b9110c628
2022-05-26 16:14:33 -04:00
Cole Faust
ba95b11146 Allowlist tools that apexer uses
Apexer uses a lot of extra binaries, and most
of them already build fine but haven't been
allowlisted.

After this cl, only aapt2 and sefcontext_compile
will still be needed for apexer to run.

Bug: 233346273
Test: b build --config=linux_x86_64 //build/make/tools/zipalign:zipalign //external/f2fs-tools:make_f2fs //external/f2fs-tools:sload_f2fs //external/erofs-utils:make_erofs
Change-Id: I1b721d998c7d1f89d62fce30f565b8422e2dd74a
2022-05-26 12:54:09 -07:00
Trevor Radcliffe
2bb24935e4 Merge "Generate genlex rules from bp2build for cc targets" am: 5731d0fffd am: c68fbc38e7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2092784

Change-Id: I91cba2b4927db6e1284efcf82161f81f4216bebb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 20:32:59 +00:00
Trevor Radcliffe
5731d0fffd Merge "Generate genlex rules from bp2build for cc targets" 2022-05-25 19:38:15 +00:00
Sorin Basca
ec9d37f146 Merge "Add experimental option to target Java 17" am: 78ce8c23de am: a571b7d389
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2104326

Change-Id: Iac56194ce46c845e0498e0fb794f4eb29895d78e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-24 16:10:38 +00:00
Sorin Basca
78ce8c23de Merge "Add experimental option to target Java 17" 2022-05-24 15:12:14 +00:00
Liz Kammer
3d704c2826 Merge "Handle multiple linkages in sdk snapshots" am: 91f10eccc6 am: 1446249224
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2097793

Change-Id: I5f428f85d998cde7a90d3cf361480a66363ae3db
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-24 14:55:28 +00:00
Trevor Radcliffe
ef9c900ec3 Generate genlex rules from bp2build for cc targets
This change will cause bp2build to generate genlex targets any
time a .l or .ll file is present in the srcs for a cc target and
add those genlex targets to the srcs attribute of the original
target.

Bug: 207408632
Test: unit tests
Change-Id: I1bce82c9d3c3d458eae1cef547ffae3d6e975134
2022-05-24 14:42:51 +00:00
Liz Kammer
91f10eccc6 Merge "Handle multiple linkages in sdk snapshots" 2022-05-24 14:13:19 +00:00
Sorin Basca
ce720c3663 Add experimental option to target Java 17
Bug: 233029164
Test: EXPERIMENTAL_TARGET_JAVA_VERSION_17=true \
      EXPERIMENTAL_USE_OPENJDK17_TOOLCHAIN=true m
Change-Id: I80a9ba9eb356a460c1036e711e793c2ca6620f53
2022-05-24 13:05:17 +01:00
Treehugger Robot
b18711b500 Merge "Add blockers of cc mainline modules to allowlist" am: 52edad230a am: 9130804d06
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2095405

Change-Id: Id486563c06c6ddc3da2999e1b508b03a46da7f38
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 20:02:29 +00:00
Treehugger Robot
52edad230a Merge "Add blockers of cc mainline modules to allowlist" 2022-05-23 18:55:01 +00:00
Treehugger Robot
a2a665b40e Merge "Clean up some bp2build technical debt" am: 5bec8d41ea am: d5c19f1eb9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2075729

Change-Id: Ia782f52cc1dfb7a43cef80f8fd374160b0208526
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 18:53:44 +00:00
Treehugger Robot
5bec8d41ea Merge "Clean up some bp2build technical debt" 2022-05-23 18:01:04 +00:00
Liz Kammer
96320dfff8 Handle multiple linkages in sdk snapshots
Currently, if the same library is specified for multiple of native_libs,
native_shared_libs, and native_static_libs for different arch/oses,
there can be a few errors:

1. specifying a .so file as `srcs` within a cc_prebuilt_library rather
than being specified only for shared
2. the final type of prebuilt library is dependent on the arch/os

This change introduces:
* an ability for a member type to override the type for specified
  properties
  * checks for a library being used with incompatible member types
  * basing linkage nesting on the member type in addition to variants

  This will ensure that the correct library type is used, regardless of
  the order of iteration over oses/arches, and support nesting linkages
  where necessary but only one linkage variant exists.

Test: soong tests
Test: CI
Change-Id: I81dee013b09b99c34ca6c18f9cfcc12ee56d33d1
2022-05-23 10:51:22 -04:00
Bob Badour
763da0fe98 gen_module visibility tests. am: 0507921dcf am: 433f098306
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2098695

Change-Id: I899dddd1a4d18b6ed430140447acfbc75253ab89
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-21 03:22:48 +00:00
Bob Badour
efdf8ab4cc Fix bug: allow multiple gen_notice modules. am: a5ea2479d3 am: d9771dedbb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2098696

Change-Id: I921b541c513779e4a73a70876a9ffff23e4361f6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-21 03:22:39 +00:00
Bob Badour
0507921dcf gen_module visibility tests.
Test: m cts dist reportmissinglicenses

Change-Id: Ib2f8d0ad46ffe795d392166a74a7c6309b1246e2
2022-05-20 16:54:13 -07:00
Bob Badour
a5ea2479d3 Fix bug: allow multiple gen_notice modules.
Test: m cts dist reportmissinglicenses

Change-Id: I07963c83eaddfe363a04871e813b56fe7f1465ad
2022-05-20 16:54:00 -07:00
Wei Li
268d7bbc28 Merge "Change init process of bp2buildAllowlist so the Soong plugin of bp2build allowlist can hookup properly." am: 440c66a799 am: 69fe75500b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2096884

Change-Id: Ic9051a2b239c8da2c8b14fbe425dc82594ddb12e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 21:36:53 +00:00
Wei Li
440c66a799 Merge "Change init process of bp2buildAllowlist so the Soong plugin of bp2build allowlist can hookup properly." 2022-05-20 20:36:40 +00:00
Christopher Parsons
89aeb9181b Merge "Refactor mixed builds to only take one pass" am: 489128b8ef am: 935261d614
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2094705

Change-Id: I64c79ef138c4a5ee8e6197d2ce2b50bb7397ea7d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 16:15:37 +00:00
Paul Duffin
0ccfe77dd3 Merge "Add custom java_sdk_library info to the SDK info file" am: e73d52cb9b am: e917d3ae4c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2096802

Change-Id: I27a97a5b6477fe25ce3aafbe8bbdb9ebe2e0bd52
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 16:15:25 +00:00
Christopher Parsons
489128b8ef Merge "Refactor mixed builds to only take one pass" 2022-05-20 14:13:49 +00:00
Chris Parsons
f874e46153 Refactor mixed builds to only take one pass
This large refactoring has both immense performance implications and
improves mixed builds complexity / usability. Summary:

1. Queueing calls to Bazel is done in a new mutator instead of a full
   soong_build pass. Normal soong_build flow is interrupted (via a
   functional hook in blueprint) to invoke bazel and parse its response.
2. Implementing mixed build support for additional modules is as simple
   as implementing MixedBuildsBuildable. In this interface, define the
   request that must be queued to Bazel, and then subsequently define
   how to handle the returned bazel cquery metadata.
3. Mixed builds consists of only a single pass. This greatly
   improves mixed build performance.

Result:
  A 33% runtime improvement on soong analysis phase with mixed builds.

Caveats:
  C++ BazelHandler handling still remains a bit of a mess; I did what
  I could within this CL's scope, but this may require additional cleanup.

Test: Treehugger
Test: Verified that aosp_arm ninja file is bit-for-bit identical with or
without this change.

Change-Id: I412d9c94d429105f4ebfafc84100d546069e6621
2022-05-20 10:04:13 -04:00
Paul Duffin
e73d52cb9b Merge "Add custom java_sdk_library info to the SDK info file" 2022-05-20 13:59:19 +00:00
Liz Kammer
dbd8eb11f4 Remove unused uses_sdks property for apexes
(cherry picked from commit 7eed538208)

Bug: 232546567
Test: m nothing & compare build.ninja before/after
Merged-In: I3f1199af338e1d2e48ec29cf9f59b6b36236c4cc
Change-Id: I3f1199af338e1d2e48ec29cf9f59b6b36236c4cc
2022-05-20 07:45:48 +00:00
Bob Badour
00d6beecc9 Merge "Add gen_notice module." am: 335a4333fe am: 15aba3f5e0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2095028

Change-Id: I56c39b0693a8a18b6e43f0536c724e5b26338504
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 19:09:45 +00:00
Romain Jobredeaux
1cef629459 Allow empty zip file in extra files in install command.
Test: m
Bug: 229901709
Change-Id: I4c8d1b16f2232d4cda75467615779145d2c7315e
2022-05-19 14:50:27 -04:00
Bob Badour
335a4333fe Merge "Add gen_notice module." 2022-05-19 18:03:09 +00:00
Jingwen Chen
01581f9960 Merge "bp2build: keep existing build files for prebuilts/build-tools recursively." am: 37232d819a am: 4dd02853bd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2101510

Change-Id: I538fb941a94dbdff03284df62a394acf252c6ab9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 16:06:34 +00:00
Jingwen Chen
23ca2d2d26 bp2build: keep existing build files for prebuilts/build-tools recursively.
This lets us test https://cs.android.com/android/platform/superproject/+/master:prebuilts/build-tools/tests/BUILD.bazel;l=2;drc=d3dc3d5f20dee2a67dabc1a89dcc9ce93d6f5d44

Test: CI
Change-Id: Ic7c43e3ca655a222ed9113b31761f3cb0d8a45f3
2022-05-19 09:53:56 +00:00
Bob Badour
eef4c1c563 Add gen_notice module.
Refactor notices to support notices for multiple modules.

Enforce visibility and handle missing dependencies.

Bug: 213388645

Change-Id: Id6a81987f087419ad37d0cce57a71e8a7c4cd6e0
2022-05-18 16:38:19 -07:00
Paul Duffin
958806b8c8 Add custom java_sdk_library info to the SDK info file
Previously the SDK info file only contained basic common information
about each member. This change adds support for each member to
provide custom information to add to the info file.

It uses that mechanism to add the following:
* "dist_stem"
* "scopes" object containing:
  * for each scope a:
    "<scope>" object containing:
    * "current_api" - the path within the snapshot for the API's .txt
                      file.
    * "removed_api" - the path within the snapshot for the removed
                      API's .txt file.
    * "latest_api" - the path within the build to the latest finalized
                     API .txt file.
    * "latest_removed_api" - the path within the build to the latest
                             finalized removed API .txt file.

In order to access the latest API files it was necessary to add and
resolve dependencies on the module that makes them available. In order
to do that safely the code for creating the names of the modules was
refactored to avoid duplicating the name creation logic.

Bug: 204763318
Test: m nothing
Change-Id: Ica68abbd2b2c7c2b2b7877b502f96cc89f06fd68
2022-05-16 17:09:10 +00:00
Liz Kammer
be1315eb41 Add blockers of cc mainline modules to allowlist
Test: mixed_droid.sh
Change-Id: If14254d192c67a76e307fa2fc7d732a648879cb5
2022-05-13 19:51:51 -04:00
Liz Kammer
3bf97bd1c0 Clean up some bp2build technical debt
Previously we ran mutators in bp2build mode to add dependencies, now we
look up modules by name directly. Remove workarounds to allow bp2build
mode to not fail when adding/handling dependencies.

Test: m bp2build
Change-Id: Ibf6fd905150cac306e5c395902ef28f609f4df2a
2022-05-13 19:47:48 -04:00
Christopher Parsons
f1526a56dd Merge "Deterministic aquery details in mixed builds" am: 58c43e9694 am: 1bf08694c8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2097673

Change-Id: I6b6bc3a34bce6a2d99526706163ddab56ffc6868
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-13 18:30:55 +00:00
Chris Parsons
0bfb1c0556 Deterministic aquery details in mixed builds
This change constitutes a number of fixes which cause mixed builds to
have deterministic ninja file output:

1. Depsets are identified based on a hash of their contents instead of
   an arbitrary ID integer from Bazel
2. Depset definitions in the ninja file are sorted by the above hashes
3. BuildStatements (action information from Bazel's aquery) are sorted
   by their contents

Test: Ran `USE_BAZEL_ANALYSIS=1 m nothing` three times and verified the
md5sum of out/soong/build.ninja was identical all three runs.
Test: mixed_droid

Change-Id: Iffdf6cc62c31d76fbbfa78726827497516171f4f
2022-05-13 13:45:56 -04:00
Treehugger Robot
7ee1422274 Merge "Clean up hard-coded min_sdk_version/apex_available" am: 1c87db50ca am: 793c10dcc7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2089563

Change-Id: I789fa4687a2bdac6f0130543b21c58cd7707d12f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-13 10:21:55 +00:00
Wei Li
d7736ec1b1 Change init process of bp2buildAllowlist so the Soong plugin of bp2build allowlist can hookup properly.
Bug: 216442475
Test: m nothing
Change-Id: I47d768e09aa290e23fb846404686dcf26c8caf41
2022-05-12 23:40:45 -07:00
Treehugger Robot
1c87db50ca Merge "Clean up hard-coded min_sdk_version/apex_available" 2022-05-13 04:56:59 +00:00
Treehugger Robot
14d9849ea7 Merge "bp2build: allowlist system/memory/libmemunreachable" am: c983b97a8b am: f452f69744
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2096073

Change-Id: I01e87ced03eee152edef2f42ddc6a6fe259e2bf4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-12 08:01:56 +00:00
Treehugger Robot
024b5717f3 Merge "Switch the namespace tests to fully use test fixtures" am: b53efcfc97 am: 1c7539c0a4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2095255

Change-Id: I7eb6160b088b91f31190609840dea83bd3a45c9c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-12 01:22:59 +00:00
Jingwen Chen
b184d3130b bp2build: allowlist system/memory/libmemunreachable
A new dep on this package was added in https://android-review.googlesource.com/c/platform/bionic/+/2092709

Started failing from ab/8573658

Change-Id: If53bc4d75f95aeca9f0dcf007d7ed700860058eb
Test: CI
2022-05-12 00:28:57 +00:00
Treehugger Robot
b53efcfc97 Merge "Switch the namespace tests to fully use test fixtures" 2022-05-11 22:43:28 +00:00
Treehugger Robot
da3b642bf5 Merge "convert java_resources with bp2build" am: 2737c25e9e am: ff063f97fd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2042845

Change-Id: I674693e21d9098ad9f185f394ee055dfac6869af
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-11 20:49:27 +00:00
Paul Duffin
0fc6d32c82 Switch the namespace tests to fully use test fixtures
Indented the bp contents to make it easier to differentiate between
them and the directory in which they belong.

Bug: 181070625
Test: m nothing
Change-Id: Iae7495fb7c88769dc688006a41f4d21f57cf03b8
2022-05-11 17:30:58 +00:00
Sam Delmerico
79985819fe convert java_resources with bp2build
Test: b build --platforms=//build/bazel/platforms:linux_x86
  //external/jarjar:jarjar-binary and try to use on a jar
Change-Id: Id6f4e6937687fd575360fbacaeda55c41922636e
2022-05-10 14:32:52 +00:00
Jooyung Han
3f62092bd2 Merge "Clean up minSdkVersionAllowlist" am: 8ee3fb12d1 am: 64026a824f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2080103

Change-Id: I9a53575222e59339f06d31ce37b5e8663b0e7ab6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-09 05:18:00 +00:00
Jooyung Han
932d2c1932 Clean up hard-coded min_sdk_version/apex_available
Set min_sdk_version/apex_available for modules used by
com.android.permission APEX.

Bug: 147364041
Bug: 158059172
Test: m
Change-Id: I93ff72ed765354d44a2ccb5105b5f2820f0358f5
2022-05-06 12:21:04 +09:00
Jooyung Han
0ea5277adf Clean up minSdkVersionAllowlist
remove NN modules from the list.

Bug: 158059172
Test: m com.android.neuralnetworks
Change-Id: I40b25a06afd81a8fad44c853cf4ccff41300f87a
2022-05-06 11:06:45 +09:00
Paul Duffin
799962789a Add protected_properties support in defaults modules
Previously, there was no way to prevent a module from overriding a
value provided by a defaults. That made it difficult to ensure
consistency across modules, e.g. for modules that use
framework-module-defaults.

This change adds the protected_properties property to defaults modules
which allows a default module to list those properties that should not
be changed by a module applying those defaults.

Properties can either be listed explicitly by name, or it can just be
a single "*" in which case all properties that are set on the defaults
will be protected.

Bug: 230841626
Test: m nothing
Change-Id: Ibb0e482c2856a572437e7818466f41c5493baf33
2022-05-04 21:41:55 +00:00
Lukács T. Berki
2737d91393 Merge "Add a test for correctness of C++ compilation." am: 28ba9c472f am: 35c8481ffd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2083443

Change-Id: Iabcc5918f0bcc6904ff5cf7e4daa0eae4a9f3916
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-04 13:29:03 +00:00
Lukács T. Berki
28ba9c472f Merge "Add a test for correctness of C++ compilation." 2022-05-04 12:06:38 +00:00
Lukacs T. Berki
e3487c8848 Add a test for correctness of C++ compilation.
This required the following:

- Adding Platform_base_sdk_extension_version to default soong.variables
- Teaching the symlink tree creation code to understand symlinks
- Making finder.go follow symlinks when requested

Adding yet another knob is unfortunate, but I can't allow that
unconditionally because the Android code base contains a number of
symlinks giving rise to infinite directory trees because they point back
to their parent and this seemed preferable to adding complicated logic
like "follow symlink but if only its fully resolved version does not
point under the source tree".

I could be convinced about the latter, though.

Test: Presubmits.
Change-Id: I453f6b7e5334771f5832c700db00f9d24ed1d82f
2022-05-04 09:12:01 +02:00
Mark Dacek
87989eed0f Merge "Log information for Mixed Builds modules. Test: Output matches expected. https://paste.googleplex.com/5913495636803584?raw Performance evaluated: https://docs.google.com/spreadsheets/d/1X7eOVBKEZUwUWl5i8CDfBo9yUeZrDPXWi2JYO4BEZt4/edit?resourcekey=0-co8crIFW9dpiedhCMkhAgw#gid=0" am: 390df4c181 am: f06d0af87d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2072287

Change-Id: I2da415e45f8feb50ee219e01d3247bc33e6ac441
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-03 22:00:01 +00:00
Mark Dacek
390df4c181 Merge "Log information for Mixed Builds modules. Test: Output matches expected. https://paste.googleplex.com/5913495636803584?raw Performance evaluated: https://docs.google.com/spreadsheets/d/1X7eOVBKEZUwUWl5i8CDfBo9yUeZrDPXWi2JYO4BEZt4/edit?resourcekey=0-co8crIFW9dpiedhCMkhAgw#gid=0" 2022-05-03 20:04:10 +00:00
MarkDacek
ff851b83b6 Log information for Mixed Builds modules.
Test: Output matches expected. https://paste.googleplex.com/5913495636803584?raw
Performance evaluated: https://docs.google.com/spreadsheets/d/1X7eOVBKEZUwUWl5i8CDfBo9yUeZrDPXWi2JYO4BEZt4/edit?resourcekey=0-co8crIFW9dpiedhCMkhAgw#gid=0

Change-Id: I88780c7cc52a189a72216c5e2e499c96574b3731
2022-05-03 18:11:32 +00:00
Treehugger Robot
3c11108c46 Merge "Clean up minSdkVersionAllowlist" am: a0bab18a47 am: 6c356f40a2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2083104

Change-Id: I2c3cd50ffc0dfca954f616b677c831f7caa76d33
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-03 13:23:15 +00:00
Treehugger Robot
a0bab18a47 Merge "Clean up minSdkVersionAllowlist" 2022-05-03 09:00:15 +00:00
Treehugger Robot
ef758eca54 Merge "Remove unused uses_sdks property for apexes" am: a6fcf9fd92 am: 9a37c9bb75
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2071390

Change-Id: Icb6dec841f99bfafb4238255bf80934f6600d059
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-03 05:52:36 +00:00
Treehugger Robot
a6fcf9fd92 Merge "Remove unused uses_sdks property for apexes" 2022-05-03 03:24:59 +00:00
Jooyung Han
c743039b48 Clean up minSdkVersionAllowlist
These modules have min_sdk_version set. No need to keep them in
allowlist.

Bug: 158059172
Test: m
Change-Id: Id9d3c62f4da941f26212ce69637469d82758c935
2022-05-02 12:38:26 +09:00
Inseob Kim
c7c4746151 Add buildinfo_prop module
buildinfo_prop module is a replacement for build/make/tools/buildinfo.sh
so other images like microdroid can refer to build.prop.

For now, buildinfo_prop only supports a few build.prop properties, and
it's only used in microdroid.

Bug: 189164487
Test: build
Change-Id: I120654ca23a68de414df8da2051c6677afbab441
Merged-In: I120654ca23a68de414df8da2051c6677afbab441
(cherry picked from commit 4f1f3d97ca)
2022-05-02 09:51:45 +09:00
Christopher Parsons
d86f2d0cc6 Merge "Preserve depset structure from bazel aquery" am: f485a95d3a am: b189af9c49
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2075349

Change-Id: I33edc6217d86aee12db67c349bc4e2a118d70175
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 18:25:57 +00:00
Victor Chang
197ec71ec9 Merge "Revert "Fix erroneous "Field requires API level 33 (current min is 32)" warnings"" am: 99666e2720 am: 611f75ea9a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2081278

Change-Id: Ib989959b0b864c46f519d57295c5647321db009c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 18:16:50 +00:00
Treehugger Robot
0c9fe97b4d Merge "Clean up min_sdk_version allowlist" am: 979a64f810 am: a72f626d9d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2076338

Change-Id: Ia6bf2024c500a0f67735e3c58790bfedc4b57b3e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 18:14:59 +00:00
Vinh Tran
c1a8f931a3 Merge "bp2build converts java_version property to javacopts attribute" am: 775b44fa50 am: f4b263c487
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2072296

Change-Id: I65ceaa0414ca153fdb737af38dc7ec94c9a9e00e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 18:14:30 +00:00
Treehugger Robot
50da2c4530 Merge "Prototype changes for multitree" am: 184a6b87e5 am: 91255a653f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2076401

Change-Id: Icf425fdcfddcb1267d241175ec86758117e53afc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 18:09:34 +00:00
Christopher Parsons
f485a95d3a Merge "Preserve depset structure from bazel aquery" 2022-04-29 14:49:31 +00:00
Victor Chang
99666e2720 Merge "Revert "Fix erroneous "Field requires API level 33 (current min is 32)" warnings"" 2022-04-29 10:34:41 +00:00
Nataniel Borges
5d80d895b6 Revert "Fix erroneous "Field requires API level 33 (current min is 32)" warnings"
This reverts commit 8b7f627f30.

Reason for revert: b/230821289

Change-Id: I3032103b174c78586b38b64d2748ec5a42fa9522
2022-04-29 09:49:16 +00:00
Treehugger Robot
979a64f810 Merge "Clean up min_sdk_version allowlist" 2022-04-29 02:22:24 +00:00
Vinh Tran
3ac6daf47c bp2build converts java_version property to javacopts attribute
This CL also converts `external/rappor` (which already set `java_version` to `1.7`) to be bazelable to testify the changes.

Results from `b build //external/rappor && cat bazel-bin/external/rappor/librappor.jar-0.params`: https://paste.googleplex.com/5518725462622208.

Test: go test ./bp2build/...
Bug: 227618664
Change-Id: I8d370d4639f70fba51e6de6ceb7bcb5ace9ccd91
2022-04-28 18:52:48 -04:00
Treehugger Robot
184a6b87e5 Merge "Prototype changes for multitree" 2022-04-28 22:20:47 +00:00
Chris Parsons
1a7aca075b Preserve depset structure from bazel aquery
Each depset now corresponds to a phony rule which depends on other
depsets or on full paths; thus, bazel's depset structure is preserved in
the form of phony rules of name bazel_depset_{id}.

Previously, flattening and recopying large lists of file path strings
was quite inefficient. This was particularly evident as we enumerated
hundreds of clang headers for each cc compile action.

This reduces soong_build analysis time by about 30% for mixed builds.
It also reduces ninja file size by ~750MB.

Fixes: 229405615
Test: Unit tests, manually verified metrics, mixed_droid CI

Change-Id: I78df152ac1488ae0c6807afdde4b4ad5e6d26287
2022-04-28 12:44:28 -04:00
Inseob Kim
5eb7ee9fad Prototype changes for multitree
This change contains a prototype implementation for multitree. Several
interfaces and modules are added.

1. Imported/Exported
Modules implementing Exportable interface can export artifacts to other
components. "imported_filegroup" modules can import generated artifacts from other exported modules.

2. Multitree metadata
It contains information about imported/exported modules in each
component, and can be generated via "m update-meta".

3. cc library stub
It's based on prototype stub libraries. It uses imported/exported
mechanism to expose a C API, with a map.txt file and header files.

Bug: 230448564
Test: m
Change-Id: Id7ff7618e2c630c5617a564d8b23b60a1cc9c8e8
2022-04-28 08:20:10 +00:00
Treehugger Robot
35e5179349 Merge "Fix erroneous "Field requires API level 33 (current min is 32)" warnings" am: fcf0b686aa am: 587f8c3425
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2072628

Change-Id: I7cc60174e9e525181cbf51dfd20e2e3e89f5c241
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-27 23:30:58 +00:00
Cole Faust
8b7f627f30 Fix erroneous "Field requires API level 33 (current min is 32)" warnings
Bug: 215567981
Bug: 204776549
Test: m out/soong/.intermediates/frameworks/base/framework-minus-apex/android_common/lint/lint-report.xml, then check that that file doesn't have any of these warnings
Change-Id: I39aa2228474630c93250bf5833ac6bd9bbadcc7f
2022-04-27 12:20:08 -07:00
Treehugger Robot
7aa2ab4257 Merge "Share CreateModule between hooks & mutators" am: 60fe34a79d am: 37ce89c599
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2075728

Change-Id: I180f522c5fd7bef9fd6bcff2af9ee9aa5a2f7dad
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-27 17:53:12 +00:00
Treehugger Robot
60fe34a79d Merge "Share CreateModule between hooks & mutators" 2022-04-27 16:00:35 +00:00
Treehugger Robot
57179b8d38 Merge "Add buildinfo_prop module" am: 266cf08ac6 am: 36a65aaaba
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2073592

Change-Id: Ia98c5bfe897a0e1f9719fd718a34de621006ef9f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-27 13:50:51 +00:00
Jingwen Chen
71420e9761 bp2build: Denylist new module that has a dependency on unconverted go binaries. am: c172816439 am: b47d59ac7c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2076206

Change-Id: I6b147e7377046b89b153f0b55fe607377bc1d102
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-27 13:03:04 +00:00
Treehugger Robot
266cf08ac6 Merge "Add buildinfo_prop module" 2022-04-27 13:00:36 +00:00
Jingwen Chen
c172816439 bp2build: Denylist new module that has a dependency on unconverted go binaries.
Test: CI
Change-Id: I2763d3371f32850732303110fc13a5b44a4f14fe
2022-04-27 09:56:33 +00:00
Inseob Kim
4f1f3d97ca Add buildinfo_prop module
buildinfo_prop module is a replacement for build/make/tools/buildinfo.sh
so other images like microdroid can refer to build.prop.

For now, buildinfo_prop only supports a few build.prop properties, and
it's only used in microdroid.

Bug: 189164487
Test: build
Change-Id: I120654ca23a68de414df8da2051c6677afbab441
2022-04-27 14:10:52 +09:00
Liz Kammer
f31c90050c Share CreateModule between hooks & mutators
These contained duplicate code, but evolved separately in the effort to
identify module type of those created with CreateModule. This refactors
to share a common implementation between the two.

Test: m json-module-graph and verify Type fields
Test: CI
Change-Id: Ifdb9a006d9b1bef7411f9ce3a4384797693b4bfc
2022-04-26 09:08:55 -04:00
Jooyung Han
036ef1f8f6 Clean up min_sdk_version allowlist
Hard-coded min_sdk_version is not necessary for kotlinx-* modules
because they are already marked by updater script.

Bug: 158059172
Test: m nothing
Change-Id: I42cf26c9390244f93059af68027cca4f8518a828
2022-04-26 16:21:28 +09:00
Dan Albert
fa652e32a6 Bump minimum minSdkVersion to 19.
We need to land an update to the NDK prebuilts and the NDK no longer
supports APIs 16-18.

Bug: http://b/222341313
Test: treehugger
Change-Id: I996b0eb65a7d1ae4cc0687b7ed8f533fbbba295d
2022-04-25 23:17:23 +00:00
Christopher Parsons
5bdf7b4426 Merge "Improve bazel action status mnemonics" am: be9b9deef9 am: b26d44c2fb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1992270

Change-Id: I4c5f900917aaba20c2ea9ecfff5bc1731b16646e
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-25 21:29:04 +00:00
Christopher Parsons
be9b9deef9 Merge "Improve bazel action status mnemonics" 2022-04-25 20:57:17 +00:00
Treehugger Robot
ab8f0472c7 Merge "Bump minimum minSdkVersion to 19." am: b2d87ef0bd am: a9146906f9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2070287

Change-Id: Ib30c2fa2087c6c6f81c07ede7084be7e701b6b15
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-22 11:00:14 +00:00
Treehugger Robot
b2d87ef0bd Merge "Bump minimum minSdkVersion to 19." 2022-04-22 03:16:05 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
7f55284a9e DoNotConvert tzdata nor tz_version am: bff2e88a85 am: 9ea047d5e3 am: bf99c62ff5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2069572

Change-Id: I4e40f401a5f35e346ec45ed0093ec2f7aa1f349e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 15:33:16 +00:00
Liz Kammer
7eed538208 Remove unused uses_sdks property for apexes
Test: m nothing & compare build.ninja before/after
Change-Id: I3f1199af338e1d2e48ec29cf9f59b6b36236c4cc
2022-04-21 11:13:45 -04:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
bff2e88a85 DoNotConvert tzdata nor tz_version
In using prebuilt_file for prebuilt_{etc,usr_share}, Bazel now sees such
targets translated and doesn't permit a target name to alias e.g. its
`src`. Thus we temporarily disable the conversion of the `tz_version` and
`tzdata` whilst their in-tree sources are updated. Their conversions
will be reenabled afterward.

Bug: 215723302
Test: bp2build.sh
Test: mixed_{libc,droid}.sh
Change-Id: Ie19813ccb0fb93c90b54bfd19c909ed15b826385
2022-04-21 14:37:12 +00:00
Dan Albert
862a7c5b5e Bump minimum minSdkVersion to 19.
We need to land an update to the NDK prebuilts and the NDK no longer
supports APIs 16-18.

Bug: https://issuetracker.google.com/228670422
Test: treehugger
Change-Id: I996b0eb65a7d1ae4cc0687b7ed8f533fbbba295d
2022-04-20 22:54:42 +00:00
Treehugger Robot
ed2a5918b0 Merge "Install .rc files for ramdisk variants" am: 0c9d27c463 am: 0ad2da70c1 am: 9cb758c5c6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2062874

Change-Id: Ib093513ffe443d8a82a007e4c2c7d86ef7a4f81f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 19:32:36 +00:00
Treehugger Robot
0c9d27c463 Merge "Install .rc files for ramdisk variants" 2022-04-20 18:07:18 +00:00
Yike Zhang
2b18574ee0 Merge "Export Java library dependency information" am: 29f5068a1c am: 51d0f34e93 am: c3763358db
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2063668

Change-Id: I043e0aac97d79520bd1f4f2140fda5f774e7a206
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-18 06:04:36 +00:00
Yike Zhang
29f5068a1c Merge "Export Java library dependency information" 2022-04-18 04:58:47 +00:00
Yike
f628202aab Export Java library dependency information
Write `static_libs` and `libs` of Java library and Android app modules to module_bp_java_deps.json. This enables downstream tools to correctly set up the runtime environment. Note that while static libraries don't need to be on the Java classpath these modules could have non-static library dependencies that do need to be present.

Test: m out/soong/module_bp_java_deps.json
Bug: 227538646
Change-Id: I7c4aecb2fb03c890f0d2aaae80e619f6176809ef
2022-04-18 10:23:28 +08:00
Treehugger Robot
18ba2a409e Merge "Remove linux_glibc musl hack" am: d5aa2e0da3 am: f7daa06e3a am: 3c57fd97f3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2049205

Change-Id: I4d5a40e1356a6fe2dccb840ae0081344607bfeb8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-15 00:53:21 +00:00
Treehugger Robot
d5aa2e0da3 Merge "Remove linux_glibc musl hack" 2022-04-15 00:04:41 +00:00
Treehugger Robot
ac2dc895a3 Merge "Export listshare and checkshare to Soong and Make" am: 7e7abd116d am: 207a44b0bf am: c6c26768ea
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2063507

Change-Id: I6d28cb2db39467b5804964fdb9c161fccdd00830
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-14 23:19:19 +00:00
Treehugger Robot
7e7abd116d Merge "Export listshare and checkshare to Soong and Make" 2022-04-14 22:09:15 +00:00
Sam Delmerico
1f94a90655 add unit test for bp2build allowlist am: cc51843e52 am: d09556a687 am: ebe9822b8f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2047750

Change-Id: I9f2e4bdcbdf791c68029ea465cd268c9296f8842
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-14 16:58:21 +00:00
Sam Delmerico
e61850b571 refactor bp2build module allowlists into struct am: 24c5603815 am: a9ffab0be2 am: 191831f1b2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2047749

Change-Id: Ib5fb7b318b104658be57aa3bcce4d33a92c0d8ea
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-14 16:58:17 +00:00
Sam Delmerico
cc51843e52 add unit test for bp2build allowlist
Test: go test ./android
Change-Id: I0ea1d97444cbedfd285f1fc4bd7ff246ce699dc9
2022-04-14 13:31:09 +00:00
Sam Delmerico
24c5603815 refactor bp2build module allowlists into struct
To make testing easier, refactor existing module-global variables into a
struct that can be mocked.

Test: build/bazel/bp2build.go
Change-Id: I9d177677644ea743641a745b1839a3a8b29f902a
2022-04-14 13:31:05 +00:00
Yurii Zubrytskyi
ac190b9bd9 Merge "platform/build/soong - Tiramisu is now 33" into tm-dev 2022-04-14 06:21:09 +00:00
Kelvin Zhang
4697725e81 Install .rc files for ramdisk variants
Previously, we removed .rc files from ramdisk variants because init
isn't reading them. But after generic_ramdisk is introduced, we might
re-use ramdisk variant of snapuserd in recovery, and recovery will need
those .rc fiels. So install .rc files again.

Test: th
Bug: 219841787
Bug: 228893064
Change-Id: I9e6e761f4f2b3a03693567c077c3225669398b86
2022-04-13 19:19:25 -07:00
Bob Badour
470fd6d946 Export listshare and checkshare to Soong and Make
Bug: 151177513
Bug: 213388645
Bug: 210912771

Test: m droid dist reportmissinglicenses
Change-Id: I1a2f2f69df22ec28e3fc016b61341717c6f2b1d2
2022-04-13 11:05:12 -07:00
Yurii Zubrytskyi
6114bd54eb platform/build/soong - Tiramisu is now 33
Bug: 225745567
Test: Build
Change-Id: I647b3e979ea9df622d86784f84f1155759e9ac0e
2022-04-12 08:23:14 -07:00
Jiyong Park
d4a0063d3e Remove apex10000_private variants
When a library is included in two APEXes whose platform_apis settings
are different, two apex variants of the library is created: apex1000 and
apex1000_private.

This change was introduced with ag/15061306, especially by the commit
[1].

However, that part should be reverted because it actually creates
unnecessary variants. It's unnecessary because the two variants of the
library are compiled (excluding the linking) exactly the same. If a
private symbol of its dependency was actually used when compiling the
apex1000_private variant, then the other apex1000 variant wouldn't have
been built because that private symbol must have caused a linkage error.

[1] https://googleplex-android-review.git.corp.google.com/c/platform/build/soong/+/15061306/2..4/android/apex.go#b527).

Bug: 228785792
Test: m
Change-Id: Id58d3e98a51de5e628ca72ef86e9cd11b0ee8971
2022-04-12 12:23:20 +09:00
Chris Parsons
155d768e5f Improve bazel action status mnemonics
Example output line:

```
CppCompile: [bazel-out/android_arm-fastbuild-ST-dd3fdd7bf572/bin/bionic/libc/_objs/libc_bionic_asm/
0/strcpy.o]
```

Instead of just `CppCompile`.

Fixes: 220234318
Test: `m libc` in mixed builds
Change-Id: I3e079006b1f1bb9e8db5b4f022ea993d7693aeb5
2022-04-11 19:17:52 +00:00
Albert Martin
26ef058655 Merge "Flag to globally override apexes' min_sdk_version" 2022-04-11 12:29:09 +00:00
Treehugger Robot
759f5a25a6 Merge changes from topic "export-vars" am: a2a7b57924 am: 066a777c15 am: fefe3547a2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2044966

Change-Id: I3f71b23b335baa61b0b997e454d900a8e914c549
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-08 18:36:58 +00:00
Albert Martin
eefabcf321 Flag to globally override apexes' min_sdk_version
Override all mainline updateable apexes' min_sdk_version
to same version to get single shared native libs on DCLA.

Test: Run "vendor/google/build/go/mainline_go_modules_arm.sh" and inspect built apexes
Bug: 212609891
Change-Id: Ide7d3f2bc772ac6240f1c917b87285d051d6f605
Merged-In: Ide7d3f2bc772ac6240f1c917b87285d051d6f605
2022-04-08 17:51:07 +00:00
Treehugger Robot
a2a7b57924 Merge changes from topic "export-vars"
* changes:
  export Java variables to Bazel
  refactor Bazel variable export
2022-04-08 17:31:23 +00:00
Albert Martin
5b0f6b9717 Merge "Flag to globally override apexes' min_sdk_version" into tm-dev 2022-04-08 16:05:23 +00:00
Sam Delmerico
932c01cf9e export Java variables to Bazel
Test: build/bazel/bp2build.sh
Change-Id: Ia06f9265c9f96e6add6edbd0cee925fe37b430d3
2022-04-08 14:15:43 +00:00
Liz Kammer
d5aa079291 Clean up allowlist contents.
Test: mixed_droid.sh
Test: bp2build.sh
Change-Id: I6d00a55400e7843899c71be3de9e52403ba26f55
2022-04-06 15:26:15 -04:00
Albert Martin
55ccba2f61 Flag to globally override apexes' min_sdk_version
Override all mainline updateable apexes' min_sdk_version
to same version to get single shared native libs on DCLA.

Test: Run "vendor/google/build/go/mainline_go_modules_arm.sh" and inspect built apexes
Bug: 212609891
Change-Id: Ide7d3f2bc772ac6240f1c917b87285d051d6f605
2022-04-06 17:39:50 +00:00
Sam Delmerico
7f88956c16 refactor Bazel variable export
Most of the variable export code for cc modules can be re-used for
exporting variables for java modules. Refactor this code into a more
composable structure for reuse.

Test: build/bazel/bp2build.sh
Test: manual comparison of
  out/soong/soong_injection/cc_toolchain/constants.bzl
  with previous output
Change-Id: Ie5a6fee08cc888b7dc69c3e324e5c3f8aa269a8f
2022-04-06 14:48:32 +00:00
Jiyong Park
661edbb331 Merge "Don't allow using framework and SDK at the same time." 2022-04-05 23:46:43 +00:00
Liz Kammer
7821a5e180 Merge "Denylist modules that depend on a rust binary" 2022-04-05 23:11:23 +00:00
Colin Cross
209844ce1c Merge "Enable restat for sbox rules" 2022-04-05 22:49:10 +00:00
Liz Kammer
6879cc0983 Denylist modules that depend on a rust binary
Test: b build //system/...
Test: CI
Change-Id: Ib01124ca22e1ed83e9b71a18607d60fb1a4fc8e2
2022-04-05 18:00:22 -04:00
Jiyong Park
3c306f3d1d Don't allow using framework and SDK at the same time.
Using SDK (current, system_current, module_current, or <api_version>)
while at the same time depending on "framework" doesn't make sense
because framework anyway provides all APIs including hidden ones. This
is not only uncessary but also error prone because the availability of a
private method in a class depends on whether the class is part of the
SDK or not.

Add a neverallow rule for prohibiting that. Note that "core_*" SDKs are
allowed because there's no overlap between "framework" and the core-Java
SDKs.

Bug: 227528906
Test: m nothing on git_master
Change-Id: I0605075aef20c75db084beeedcbf49a642573e69
2022-04-05 15:39:05 +09:00
Spandan Das
2430a04b2e Merge changes Icb91de93,I5a2edaf4
* changes:
  Change permitted_packages check to be per-jar rather than per-apex
  Revert "Relax apex package restriction for T+ jars"
2022-04-05 04:06:55 +00:00
Colin Cross
e52c2ac7fb Enable restat for sbox rules
Add support to sbox for only writing output files if they are changed
to support enabling restat.  Move the clearing of the output directory
into sbox, and when write if changed is enabled delete obsolete output
files without deleting output files that will be replaced.

Enable restat for local metalava rules.  Restat for metalava rules
run remotely is still blocked on b/183630617.

Bug: 222095735
Test: TestRuleBuilder_Build
Test: m SystemUI
Change-Id: If8fc47e711f4a6f43947ab69f17cccc8ba6ae61a
2022-04-04 16:42:46 -07:00
Spandan Das
f14e254a28 Change permitted_packages check to be per-jar rather than per-apex
(cherry-pick of ag/17524387 into aosp)

Summary:
- updates the Q and R maps, the new keys are the bcp jars and not the
apexes. neverallow build rules ensure that these bcp jars have a
restricted set of permitted_packages
- remove BootclasspathJar from the neverallow rule. This is no longer
necessary since the keys in the maps are the bootjars themselves, and
not apexes

Bug: 205289292
Test: In build/soong, go test ./apex
Change-Id: Icb91de934181a8b6f085e03a0ce8c5e08504ff94
Merged-In: Icb91de934181a8b6f085e03a0ce8c5e08504ff94
(cherry picked from commit 440ff96728)
2022-04-04 17:42:00 +00:00
Anton Hansson
e1b1836939 Revert "Relax apex package restriction for T+ jars"
This reverts commit 1fdd6ca88a.

Reason for revert: b/205289292 tracks the real fix for this

Test: presubmit
Change-Id: I5a2edaf4f930dafa26659f85d9425e9041c72275
Merged-In: I5a2edaf4f930dafa26659f85d9425e9041c72275
2022-04-04 17:27:43 +00:00
Treehugger Robot
7a45d37e62 Merge "convert java_import jars with arch variants" 2022-04-04 16:06:55 +00:00
Bob Badour
de6a087d2d Revert "Revert "Build notice files from license metadata.""
This reverts commit 77807b3c27.

Reason for revert: fix and roll forward again

Change-Id: I80c796ca81ecf29df9522babe54d684a0d11b9e6
2022-04-01 18:00:00 +00:00
Wei Sheng Shih
77807b3c27 Revert "Build notice files from license metadata."
This reverts commit 43c2dcaef6.

Reason for revert: suspect build break

Bug: 227682036

Test: TARGET_BUILD_VARIANT=userdebug UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true vendor/google/build/mainline_modules_bundles.sh -j97


Change-Id: Ibfb8b4fefc264f52f32ba661c269a9cd625d800a
2022-04-01 14:10:53 +00:00
Sam Delmerico
489831660c convert java_import jars with arch variants
Bug: 220168131
Test: go test ./bp2build -run TestJavaImport
Test: b build '...'
Change-Id: Ib485e6905e7be9d199af5295b23131c226fd6e96
2022-03-31 21:00:24 +00:00
Bob Badour
43c2dcaef6 Build notice files from license metadata.
Switch from generate-notice-files.py and mergenotice.py to htmlnotice.

Bug: 151177513
Bug: 213388645
Bug: 210912771

Test: m droid dist reportmissinglicenses
Change-Id: I6cac049d24f35ec358c6f341a04f4ba6161703bf
2022-03-31 17:29:01 +00:00
Sam Delmerico
3c25ab1ac3 Merge changes I8e4c3f37,I89a32bde
* changes:
  add plugins to javaLibraryAttributes
  convert java_import_host with bp2build; enable jetifier
2022-03-30 21:08:12 +00:00