Commit graph

5740 commits

Author SHA1 Message Date
Dan Albert
460fb2d6d5 Merge "Remove libandroid_support support." into main 2023-07-21 21:06:41 +00:00
Treehugger Robot
cc8c8e5f8d Merge "Allowlist additional deps of inputflinger" into main 2023-07-21 21:03:39 +00:00
Zi Wang
8348ce92f5 Merge "java_test macro needs srcs and deps to create .jar for tradefed_test_suite" into main 2023-07-21 20:48:13 +00:00
Treehugger Robot
00d0d7af7d Merge "Add CFI product config variables to platform_mappings" into main 2023-07-20 19:31:41 +00:00
Dan Albert
94dd5651d7 Remove libandroid_support support.
This hasn't been needed since Android dropped API 19/20 support.

Bug: None
Test: m
Change-Id: I2749d6a706d4aa2fe13cac9816b4a2be9743ad24
2023-07-20 18:17:04 +00:00
Cole Faust
88c8efb18c Add CFI product config variables to platform_mappings
Bug: 269577299
Fixes: 283130542
Test: b test --config=android //build/bazel/rules/cc/...
Change-Id: I2fc4094167c48b1f3b22bee6b7ada309278f7250
2023-07-20 09:45:36 -07:00
Yu Liu
4c9b3e114b Merge "denylist boringssl_test_support before we fully support cc_test_library" into main 2023-07-20 04:16:22 +00:00
Treehugger Robot
e2cfe50279 Merge "Fix typo in mutator name" into main 2023-07-20 01:30:58 +00:00
Yu Liu
1d03d176a9 denylist boringssl_test_support before we fully support cc_test_library
Bug: 291962016
Test: CI
Change-Id: I20596fe3f70d0a27b12b39a288df753c0befb891
2023-07-19 23:39:41 +00:00
Romain Jobredeaux
0ccd94cefa Merge "Keep rules_java vendored repository BUILD files" into main 2023-07-19 23:22:11 +00:00
Spandan Das
950091ce29 Fix typo in mutator name
Change-Id: I1aa249e0c2095afb3bdd6eb9f1da62f75607b261
Test: N/A
2023-07-19 22:26:37 +00:00
Romain Jobredeaux
01e6b2c788 Keep rules_java vendored repository BUILD files
Test: CI
Bug: 291828210
Bug: 287596254
Change-Id: Ic8a3a1966cc82816b74f0efe59c27fae70552c11
2023-07-19 15:27:13 -04:00
Spandan Das
958ca02582 Merge changes from topic "build_go_source_mixed_builds" into main
* changes:
  Delete aliases to prebuilts
  Add functionality to sandbox mixed build actions
2023-07-19 17:21:25 +00:00
Sam Delmerico
cfcd0a4960 Merge "make android.InList generic" into main 2023-07-19 15:02:56 +00:00
Liz Kammer
0a681989ae Merge "Handle static binary repetition of system deps" into main 2023-07-19 14:16:52 +00:00
Treehugger Robot
b7c8d3d708 Merge "Add workaround for a file with an mtime in the future" into main 2023-07-19 05:22:28 +00:00
Treehugger Robot
7d34640ac8 Merge "Install VNDK libraries into vendor or product lib with flag" into main 2023-07-19 04:44:51 +00:00
Cole Faust
e9ae480a82 Add workaround for a file with an mtime in the future
Bug: 291828210
Test: `m` repeatedly, and see ninja say there's no work to do on the second run
Change-Id: I0e1e5a82ebd25e9eec5daea90eb72db0ac085f34
2023-07-18 19:36:41 -07:00
Sam Delmerico
1717b3bb7a make android.InList generic
Change-Id: Ic166216cb473371a5e34cd97a068ca35f5534740
2023-07-18 15:07:24 -04:00
Kiyoung Kim
e623c58cc6 Install VNDK libraries into vendor or product lib with flag
Install VNDK libraries into vendor or product lib when flag
'KEEP_VNDK' is set as false from build. This flag will be used to
test while deprecating VNDK step by step.

Bug: 290157355
Test: build succeded with DEPRECATE_VNDK succeded
Test: Cuttlefish boot succeded with sepolicy disabled
Change-Id: I05b166f054113ae2775df4e310916d0ea4af3fb6
2023-07-18 02:02:57 +00:00
Zi Wang
7873f613c4 java_test macro needs srcs and deps to create .jar for tradefed_test_suite
Test: java_test_host_conversion_test.go and TH

Bug: 280452825
Change-Id: Ibf0c7eed415fc58a4d228f0347ab125fdc4466e4
2023-07-17 16:39:07 -07:00
Cole Faust
f8231dd0ea Platform mapping-based product config
This allows us to set product variables as build settings instead
of loading them from a target's provider, which further allows us
to read product config variables in transitions.

Bug: 287539062
Bug: 269577299
Test: Presubmits
Change-Id: I8497703f706162572ceb3486240e1eb02a37f5f6
2023-07-17 16:27:08 -07:00
Spandan Das
e61a0817f6 Merge "Add missing formatting directive" into main 2023-07-14 16:24:05 +00:00
Spandan Das
1181ca2be3 Merge "Cleanup an unused variable in rule_builder" into main 2023-07-14 16:19:27 +00:00
Jiakai Zhang
a1140990a1 Merge changes from topics "art-boot-image-jars", "configured-jar-location-overrides" into main
* changes:
  Add a Make variable to determine ART boot image jars for testing.
  Add a Make variable that overrides configured jar locations.
  Refactor dexpreopt for boot jars to make it flexible to config changes.
2023-07-14 11:47:59 +00:00
Jiakai Zhang
4d90da29a8 Add a Make variable that overrides configured jar locations.
We had hardcoded logic to override "framework-minus-apex", but we need
to override more jars, so this CL adds a general solution for this.

Bug: 290583827
Test: m nothing
Change-Id: I211ebda7aa2803886ab6e6d081d26327665e49a6
2023-07-14 12:13:30 +01:00
Spandan Das
af4ccaaf41 Add functionality to sandbox mixed build actions
The use case for this is for building rules_go's root builder which runs
into issues when built in a directory that contains a symlink to
prebuilts/go

The implementation will involve two changes of working dir
- `sbox` to change the working directory to
__SBOX_SANDBOX_DIR__
- the generated manifest will change the working
directory to mixed build execution root relative to that

Implemenation details
1. Create a unique intermediate path by hashing the outputs of a buildAction.
   "out/bazel/output/execroot/__main__/" was deliberately not chosen as
   the outpuDir for the sandbox because ruleBuilder would wipe it.
   `sbox` will generate the files in __SBOX_SANDBOX_DIR__ and then place
   the files in this intermediate directory.
2. After the files have been generated in (1), copy them to
   out/bazel/output/execroot/__main__/...
3. For bazel depsets that are inputs of an action, copy the direct
   artifacts into the sandbox instead of the phony target
4. Make sandboxing an opt-in. Currently we will only use it for
   `GoToolchainBinaryBuild`

In the current implementation, (3) will increase the size of the ninja
file. With sboxing turned on for only GoToolchainBinaryBuild, this will
increase the size of the ninja file by around 1.3% on aosp's cf

Test: m com.android.neuralnetworks (will build soong_zip from source
using rules_go)
Test: OUT_DIR=out.other m com.android.neuralnetworks
Bug: 289102849

Change-Id: I7addda9af583ba0ff306e50c1dfa16ed16c29799
2023-07-14 00:43:52 +00:00
Spandan Das
33e309746e Cleanup an unused variable in rule_builder
Test: In build/soong, go build ./android
Change-Id: Ic8fad64a95fd2d27c639b0b60c95db47d22bb45b
2023-07-14 00:34:07 +00:00
Spandan Das
5b18c0ca27 Add missing formatting directive
Fixes the error
```
fmt.Errorf call has arguments but no formatting directives
```

Test: go test ./android
Change-Id: Ic589d6133ccdc88e77dedd4b8a5a56166f62efa9
2023-07-14 00:25:02 +00:00
Spandan Das
06f3c9bb42 Merge changes from topic "go_bp2build" into main
* changes:
  Respect package boundaries in bp2build conversion of go modules
  Create a temporary denylist for go binaries used in mixed builds
  Partial bp2build conversion of blueprint_go_binary
  Partial bp2build conversion of bootstratp_go_package
2023-07-13 16:16:00 +00:00
Spandan Das
0a8a27500e Respect package boundaries in bp2build conversion of go modules
bp2build's codegen context does not implement
BazelPathConversionContext. To reuse the utility function
transformPackagePaths, update its signature

(Also make deps of go_library unique to make the conversion resilient)

Test: go test ./bp2build
Change-Id: I126b1057d2b26bc6c7d3be2780f1b62d28323cf0
2023-07-13 00:22:26 +00:00
Jiakai Zhang
b898c112a2 Merge changes I0918f2fa,I3fc6ff91,I7adc97cb,I674a5fa1,I22c45cbf into main
* changes:
  Change the profile path on host.
  Extract duplicate code to common helper functions.
  Fix dumpOatRules.
  Remove Modules() from BootclasspathFragmentApexContentInfo.
  Fix some tests for dexpreopt and remove unnecessary tests.
2023-07-11 20:59:07 +00:00
Jiakai Zhang
b1639db53f Extract duplicate code to common helper functions.
Also, fall back to using a default name for the dexpreopt directory if
we are not building for Android.

Bug: 290583827
Test: m nothing
Change-Id: I3fc6ff9142a2dcdf995796f75891b242fe2848d0
2023-07-11 17:59:05 +01:00
Liz Kammer
b492843c3f Handle static binary repetition of system deps
Test: b build `bmod toybox-static`
Test: go test bp2build tests
Change-Id: Id728f6fd08832a4fc153f0ff5282cdfb6b19c2f6
2023-07-10 10:28:02 -04:00
Colin Cross
702ef0a07a Merge changes I70f81120,If8f2534e into main
* changes:
  Export ReverseSliceInPlace and ReverseSlice
  Make CopyOf generic
2023-07-07 17:07:50 +00:00
Colin Cross
b5e3f7dad5 Export ReverseSliceInPlace and ReverseSlice
... and add tests.

Test: TestReverseSliceInPlace, TestReverseSlice
Change-Id: I70f811207fdb2af891f7ef3fe19cbe5c7276135a
2023-07-06 16:36:50 -07:00
Colin Cross
13aeb689af Make CopyOf generic
Test: util_test.go
Change-Id: If8f2534ec454903eb967dc9ec0c8708096d1baff
2023-07-06 15:02:56 -07:00
Cole Faust
950689a9c2 Handle RepoMappingManifest actions
These are essentially FileWrite actions, like SourceSymlinkManifest.

However, currently aquery appears to give non-deterministic results
for the file content. Emit an empty file for now to avoid the
non-determinism.

Fixes: 288292933
Bug: 287539324
Test: Presubmits
Change-Id: Ieaf8aff0d58d2d69087e4e34dc99074a015e700c
2023-07-06 09:44:14 -07:00
Jingwen Chen
661b2ee719 Merge "Revert "add media.swcodec to Bazel prod allowlist"" 2023-06-30 04:23:40 +00:00
Treehugger Robot
bf815a135a Merge "Ensure we get cross refs for Bazel-built artifacts" 2023-06-30 02:22:27 +00:00
Trevor Radcliffe
061012475c Revert "add media.swcodec to Bazel prod allowlist"
This reverts commit b1274236e8.

Reason for revert: 
b/289418267

Change-Id: I0a94675e09a82b55d62e58dbeea0d3186c754ed3
2023-06-29 22:30:18 +00:00
Treehugger Robot
da169a1ee3 Merge "Fix FirstUniqueStrings after conversion to generics" 2023-06-29 18:46:20 +00:00
Trevor Radcliffe
cae9c84a56 Merge "add media.swcodec to Bazel prod allowlist" 2023-06-29 16:26:11 +00:00
Liz Kammer
36ba6b2347 Ensure we get cross refs for Bazel-built artifacts
Test: CI
Change-Id: I377dde648e023d1ac8e44b6e814475f7410cd2eb
2023-06-29 10:18:39 -04:00
Liz Kammer
e848bb2c51 Allowlist additional deps of inputflinger
Test: bp2build.sh
Change-Id: Ie6a750f5ef28e9380a6d01ea68daeeb7244da805
2023-06-29 09:21:50 -04:00
Julien Desprez
bc332f6cd8 Merge "Add -sha256 to robolectric zip" 2023-06-29 00:17:54 +00:00
Spandan Das
557423d96e Merge "Remove special-casing of DCLA libraries" 2023-06-28 04:38:35 +00:00
Cole Faust
8ee97f7a20 Merge "Revert "Add unit test for parsing build files in bp2build"" 2023-06-27 22:52:59 +00:00
Cole Faust
3d927238cc Revert "Add unit test for parsing build files in bp2build"
This reverts commit e1f25230df.

Reason for revert: breaks bp2build ci

Change-Id: I7320ef679d8a1ba1d605cf0d3781854b97816358
2023-06-27 22:52:07 +00:00
Julien Desprez
f368073522 Add -sha256 to robolectric zip
This help limit the overhead of cas upload

Change-Id: I4e1dacb38cbebf882457297ddf047a1ad1166504
Test: presubmit
Bug: None
2023-06-27 20:48:05 +00:00