This allows using select statements with it.
Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I6f3efaaa3d82505e38a91ee4ba0e18e404360191
Merged-In: If355d24506e3f117d27b21442a6c02bca3402dc7
In order to provide a more flexible ability for gensrcs's output, due to
current output_extension property will only allow to replace the string
after the last "." of input, in order to handle input with multiple dot
in file name, provide a way to trim the suffix of input string.
Bug: 335536003
Test: cd build/soong/genrule ; go test -run TestGenSrcs
Test: cd build/soong/genrule ; go test -run TestGenSrcsWithTrimExtAndOutpuExtension
Test: cd build/soong/genrule ; go test -run TestGenSrcsWithTrimExtButNoOutpuExtension
Test: cd build/soong/genrule ; go test -run TestGenSrcsWithOutpuExtension
Test: cd build/soong/android ; go test -run TestPathsForModuleSrc
Change-Id: I033bbe1d225f207f0f6bdc140df308884f214b51
Previously, when gathering transitive dependencies of genrule's host
tool, TransitivePackagingSpecs() was used if available. However, when
using this, it didn't check whether the dependencies are for host or not
(i.e. device). This was fine because host module can only depend on host
modules.
However, this is preventing Soong from implementing the installation of
the required modules by itself. Then a host module may depend on a
device module or vice versa (because that's the symantics of the
property).
To prevent the issue, check the partition of the transitive dependencies
of the host tool and filter out ones whose partition is not "" (which
means host).
Bug: 321626681
Test: builds
Change-Id: I296a920b3b88e7601315a4e1768af9727d0061e6
Change genrule Out to `android:"arch_variant"` for supporting
multilib variants.
Bug: 323295272
Test: go test -run TestMultilibGenruleOut
Change-Id: I102d64b45a5a2a5193f813001fc32da0d1fe9d36
This is an internal-only genrule, that was previously included in
a denylist in vendor/google/build. However, not all partners have
that file, so some products ended up setting
BUILD_BROKEN_GENRULE_SANDBOXING when that file didn't exist. Moving
it to the aosp allowlist lets us remove those build broken flags.
I checked with krzysio@ and yromanenko@ and they're ok with putting
this name in aosp.
Bug: 307824623
Test: Presubmits
Change-Id: Ia3f24a5c8c8efc62bdc84435343cafd1dac9afed
go/android-busy-beavers-sandboxing
It still has a diff in the generule_sandbox_test, but it's just the
addition of "./" in front of all the paths, which is fine.
Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py CtsApkVerityTestDebugFiles
Change-Id: I8b352305cfb339bc5a09a2305e10a187723d754d
* changes:
Convert ModuleProvder to generic providers API
Convert OtherModuleProvider to generic providers API
Convert Provider to generic providers API
Convert SetProvider to generic providers API
Convert all of the callers of SetProvider to use the type-safe
android.SetProvider API.
Bug: 316410648
Test: builds
Change-Id: If58f4b5355264ddab2045bc3591a4eac19cd58fc
It was fixed with aosp/2866315.
Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py camera-its
Change-Id: Iaf3871682e99ceb7161c159acb757ce2949f5b3d
Remove the ConvertWithBp2build implementations from all the module
types, along with the related code.
Bug: 315353489
Test: m blueprint_tests
Change-Id: I212672286686a318893bc7348ddd5a5ec51e77a7
proptools.ShellEscape escapes mostly by surrounding the string in
quotes. This makes all the files from a $(locations) be passed as
one shell argument if escaping was needed. Escape them individually
so that they're still passed as separate arguments.
Bug: 307824623
Test: running art tests with aosp/2860435
Change-Id: I9940941f4a7bb4d29d9388e4d57f8cbd732b6d32
The next CL will need a TestContext parameter in
ContentFromFileRuleForTests in order to retrieve the file rule contents
from the Config. Add it and update all the tests that use it in order
to simply review of the next CL.
Bug: 306029038
Test: go test ./...
Change-Id: Ia4b4c9854017ea3472fa2f8ba42cf7f72720496e
Sandboxing produces this diff:
1c1
< "v2023.2", "SPIRV-Tools v2023.2 android-u-beta-1-gpl-587-g9d167f845"
---
> "v2023.2", "SPIRV-Tools v2023.2 unknown hash, 2023-11-30T17:54:23"
But the git repository is already not garunteed to exist on CI, and
the genrule is consequently commented with a FIXME about that.
Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py swiftshader_spvtools_update_build_version
Change-Id: I98e65781bd49137662ed020927940b0f3e4d645b
go/roboleaf-busy-beavers-sandboxing
deqp_spvtools_update_build_version gets this diff:
< "v2022.4-dev", "SPIRV-Tools v2022.4-dev android-u-beta-1-gpl-177-g1ef94532"
---
> "v2022.4-dev", "SPIRV-Tools v2022.4-dev unknown hash, 2023-11-28T19:30:48"
But it already has a comment on it to revisit its usage of git,
which doesn't work on CI.
Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py chre_atoms_log.h deqp_spvtools_update_build_version
Change-Id: I759970a5687c4f75116a40f5c127ae762da4ee95
go/roboleaf-busy-beavers-sandboxing
This genrule is non-deterministic, (the jar files have timestamps)
so genrule_sandbox_test.py fails, but should otherwise work with
sandboxing.
Bug: 307824623
Test: m vm-tests-tf-lib
Change-Id: Ia8c60e7a0f134e839939622fd2747ff73ea3ce3c
This already works with sandboxing, I'm not sure why it was added.
Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py ue_unittest_erofs_imgs
Change-Id: I8d2c151e3bc6ed87e1d147e0ae316397ad56c4c8
This already works with sandboxing, I'm not sure why it was added.
Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py pvmfw_fdt_template_rs
Change-Id: I43390274740144122aae2a225807a6e1100c85c1
Sandboxing it produces this diff:
$ diff <(zipinfo -l out_not_sandboxed/soong/.intermediates/external/musl/libc_musl_sysroot_bits/linux_glibc_x86_64/gen/ libc_musl_sysroot_bits.zip) <(zipinfo -l out/soong/.intermediates/external/musl/libc_musl_sysroot_bits/linux_glibc_x86_64/gen/ libc_musl_sysroot_bits.zip)
1,3c1,2
< Archive: out_not_sandboxed/soong/.intermediates/external/musl/libc_musl_sysroot_bits/linux_glibc_x86_64/gen/ libc_musl_sysroot_bits.zip
< Zip file size: 8535 bytes, number of entries: 16
< -rw-r--r-- 2.0 unx 421 bl 225 defN 08-Jan-01 00:00 include/bits/alltypes.h.in
---
> Archive: out/soong/.intermediates/external/musl/libc_musl_sysroot_bits/linux_glibc_x86_64/gen/libc_musl_sysroot_bits.zip
> Zip file size: 5358 bytes, number of entries: 14
17d15
< -rw-r--r-- 2.0 unx 10384 bl 2666 defN 08-Jan-01 00:00 include/bits/syscall.h.in
19c17
< 16 files, 21039 bytes uncompressed, 6439 bytes compressed: 69.4%
---
So the alltypes.h.in and syscall.h.in are removed from the zip after
sandboxing. This seems good, because those two files are handled
separately already in that Android.bp file, and are not regular header
files like the rest of the zip file.
Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py libc_musl_sysroot_bits
Change-Id: I46b6340046ad7df85ea4fc9c54b46ade305661e6