Commit graph

76442 commits

Author SHA1 Message Date
Cole Faust
b0a21dc871 Merge "Reapply "Handle symlinks in sbox"" into main 2023-12-15 02:00:40 +00:00
Cole Faust
ca355af1fc Reapply "Handle symlinks in sbox"
This reverts commit 6a855191bd.

Reason for revert: Last issue fixed with aosp/2875001

Change-Id: I961ea6d97c936df8a6475995b768a7eda861e6ee
2023-12-14 23:38:38 +00:00
Cole Faust
0d6bb34801 Merge "Add sdk_genrule" into main 2023-12-14 21:58:10 +00:00
Cole Faust
c01104234e Merge "Allow compile_data on all java modules" into main 2023-12-14 21:44:46 +00:00
Yu Liu
a1df1a5937 Merge "Properly package aconfig files for vendor partition" into main 2023-12-14 19:14:11 +00:00
Cole Faust
2b64af861a Allow compile_data on all java modules
art java_test modules need to specify compile_data, make it common
to all java modules.

Bug: 307824623
Test: m lint-check
Change-Id: I68640f14137f9cadaf0c454d3b5abc9e2d1d9b4b
2023-12-13 18:22:18 -08:00
Treehugger Robot
a53330a525 Merge "Revert "Handle symlinks in sbox"" into main 2023-12-14 01:58:17 +00:00
Yu Liu
6dc93f9a09 Properly package aconfig files for vendor partition
Bug: 311173471
Test: Unit tests
Change-Id: Ibb857b69c3f83326a9ff5732e11dd09887e4ba6e
2023-12-14 01:19:35 +00:00
Treehugger Robot
453afad7b5 Merge "Enable Soong's tradefed_binary to support multi-arch" into main 2023-12-14 00:55:37 +00:00
Cole Faust
6a855191bd Revert "Handle symlinks in sbox"
This reverts commit 14a2362183.

Reason for revert: Breaks art tests on errorprone build

Change-Id: I2e21867fba6c8c1660ffa564273b6200c63221f3
2023-12-13 23:48:11 +00:00
Treehugger Robot
3e22fe2193 Merge "Avoid -target riscv64-linux-androidVanillaIceCream." into main 2023-12-13 22:48:56 +00:00
Cole Faust
8fc38f3761 Add sdk_genrule
Some users want to repackage the results of an sdk module.
Genrules have 3 variants: linux, android, and common_os. The common_os
one produces a snapshot zip file that users want. In order to get
access to it, we need a genrule in the same variant, so create
an sdk_genrule for that.

The sdk_genrule shouldn't have linux/android variants either, because
those other variants would get errors when trying to depend on the
sdk modules because the snapshot zip doesn't exist in those other
variants. The code in arch.go needs to be tweaked to allow a common_os
variant without the other variants.

Bug: 315962165
Test: m dist out/dist/art_release.zip
Change-Id: Idc9b3cae7a525d71aed6bafa0f8724a89f75a94b
2023-12-13 14:11:24 -08:00
Elliott Hughes
a19d9597cb Avoid -target riscv64-linux-androidVanillaIceCream.
clang silently ignores such things rather than reporting them as errors.

With this change, verbose.log.gz says android10000 instead, as expected.

Bug: https://buganizer.corp.google.com/issues/315788463#comment24
Test: treehugger
Change-Id: I0d92b0747912f28065de0d2dc6b4d33d1c2c9857
2023-12-13 12:10:28 -08:00
Cole Faust
a1eb34a709 Merge "Reapply "Handle symlinks in sbox"" into main 2023-12-13 17:47:07 +00:00
Treehugger Robot
e25374a962 Merge "Update wording on depfile property error" into main 2023-12-13 03:03:47 +00:00
Nelson Li
8efd580eb1 Enable Soong's tradefed_binary to support multi-arch
The original `tradefed_binary_host` in Soong always used the host OS
architecture when writing the `arch` in `test-suite-info.properties`.
This change introduces the `Suite_arch` attribute in
`tradefed_binary_host`, allowing users to specify the architecture
for `test-suite-info.properties`.

Bug: 313535357
Test: 1. Add property of `suite_arch` in the Android.bp
      2. m cts-tradefed
      3. check `test-suite-info.properties` in cts-tradefed.jar
Change-Id: Ib95db4e0e8d238c9bb8a2a3fffea606fa6a764ce
2023-12-13 02:53:22 +00:00
Cole Faust
27609f15ff Update wording on depfile property error
Bug: 307824623
Test: Presubmits
Change-Id: I25919150d2ee2483099e7cb710330dc259d57e66
2023-12-12 18:10:36 -08:00
Treehugger Robot
550a0dab0d Merge "Use --revert-annotation instead of --hide-annotation" into main 2023-12-13 01:24:27 +00:00
Paul Duffin
7ac943f7e1 Use --revert-annotation instead of --hide-annotation
Use of `--hide-annotation android.annotation.FlaggedApi` was always an
intermediate solution until the required semantics for `@FlaggedApi`
was determined. The `--revert-annotation` option provides those
semantics. When the `@FlaggedApi` is applied to an existing API, e.g.
because it has moved from system to public, or because it has changed
in some way, e.g. modifiers, then the correct semantics for when that
API is not required is not to hide the API but to revert it to what it
was before the change necessitating the `@FlaggedApi` annotation was
made.

Use --revert-annotation instead of --hide-annotation

Use of `--hide-annotation android.annotation.FlaggedApi` was always an
intermediate solution until the required semantics for `@FlaggedApi`
was determined. The `--revert-annotation` option provides those
semantics. When the `@FlaggedApi` is applied to an existing API, e.g.
because it has moved from system to public, or because it has changed
in some way, e.g. modifiers, then the correct semantics for when that
API is not required is not to hide the API but to revert it to what it
was before the change necessitating the `@FlaggedApi` annotation was
made.
Use --revert-annotation instead of --hide-annotation

Use of `--hide-annotation android.annotation.FlaggedApi` was always an
intermediate solution until the required semantics for `@FlaggedApi`
was determined. The `--revert-annotation` option provides those
semantics. When the `@FlaggedApi` is applied to an existing API, e.g.
because it has moved from system to public, or because it has changed
in some way, e.g. modifiers, then the correct semantics for when that
API is not required is not to hide the API but to revert it to what it
was before the change necessitating the `@FlaggedApi` annotation was
made.

Bug: 314196587
Test: ./gradlew
Change-Id: Ic97f29dd2b9f598ba0851f5f622c2a2724f18037
2023-12-13 00:33:25 +00:00
Treehugger Robot
fa6995f75e Merge "Remove infrastructure to run bp2build" into main 2023-12-12 20:03:58 +00:00
Wei Li
c1fb159206 Merge "Build native libraries used by layoutlib." into main 2023-12-12 16:18:16 +00:00
Mårten Kongstad
18c95ecab9 Merge "Add exported_java_aconfig_library" into main 2023-12-12 09:46:05 +00:00
Wei Li
5f5d271fc3 Build native libraries used by layoutlib.
Bug: 303904212
Test: m layoutlib dist; CIs
Change-Id: Id77cba97b2f66997431beb78ecc9d9b74b64b803
2023-12-12 05:06:20 +00:00
Treehugger Robot
4e8a7e9974 Merge "Remove extra go.mod files" into main 2023-12-12 04:00:32 +00:00
Colin Cross
e8da10aae0 Remove extra go.mod files
Only the top level build/soong/go.mod file should exist, any extras
breaks `go test ./...` in build/soong, and also breaks the kythe build
that produces xrefs for code search.

Bug: 315537199
Test: go test ./...
Change-Id: Id5262550654ff1559cfb3fa1ecdae95c126109df
2023-12-12 03:02:33 +00:00
Yu Liu
cec0e410cd Support rust modules when packaging aconfig files in apex.
Also remove the code to package aconfig files for transitive
dependencies since those files should have already been included in the
direct dependencies.

Bug: 311173471
Test: Unit tests
Change-Id: I25637af9381f71a78b70a8de9894618188c9735d
2023-12-11 17:43:07 -08:00
Colin Cross
a72573a727 Merge "Remove ConvertWithBp2build implementations" into main 2023-12-11 23:12:53 +00:00
Treehugger Robot
b49f038231 Merge "Add compile_data for android apps" into main 2023-12-11 19:25:20 +00:00
Tor Norbye
2624653aa9 Merge "303434307: Enable flagged API checking" into main 2023-12-11 18:14:56 +00:00
Jeongik Cha
d74c914e36 Fix typo in log in ninja.go
Test: n/a
Bug: 292304818

Change-Id: I6dcb6bb3e84e15292cbd3acc613c744e3ec039f8
2023-12-11 11:41:16 +00:00
Mårten Kongstad
c82f118d23 Add exported_java_aconfig_library
Add a rule to generate a JAR file containing code for all aconfig flags
in all packages. This is intended for apps compiled outside the
platform.

Also add a rule to include the new JAR file among the SDK artifacts.

Note: a future CL will refine the aconfig command line options used, or
filter the aconfig output: right now the JAR really contains *all*
flags; we want it to include only *exported* flags.

Bug: 311151343
Test: m sdk dist # manually verify that this generates $(gettop)/out/dist/android-flags.jar
Change-Id: I73481a9f723a0e5487cfcd2ee697873ecc4e8275
2023-12-11 09:51:42 +01:00
Treehugger Robot
5eca978092 Merge "Remove art/test from genrule allowlist" into main 2023-12-09 01:10:55 +00:00
Treehugger Robot
96b6a499d9 Merge "individually escape results of $(locations)" into main 2023-12-09 01:10:51 +00:00
Xin Li
1804e19358 Merge "Merge Android 14 QPR1" into main 2023-12-09 00:11:54 +00:00
Yu Liu
65287d5dc2 Merge "Remove the code for bazel when reading ReleaseAconfigValueSets." into main 2023-12-08 21:52:59 +00:00
Colin Cross
b63d7b3af7 Remove infrastructure to run bp2build
Bug: 315353489
Test: m blueprint_tests
Change-Id: Idcf6377d389b94c39e4e6ff4b8efa8a9f9e78b17
2023-12-08 13:51:07 -08:00
Colin Cross
8ff105860d Remove ConvertWithBp2build implementations
Remove the ConvertWithBp2build implementations from all the module
types, along with the related code.

Bug: 315353489
Test: m blueprint_tests
Change-Id: I212672286686a318893bc7348ddd5a5ec51e77a7
2023-12-08 13:51:05 -08:00
Colin Cross
e51c6e4109 Merge "Remove bp2build and bazel from soong_ui" into main 2023-12-08 21:43:26 +00:00
Xin Li
41968c6c20 Merge Android 14 QPR1
Merged-In: Ide278450fa058b6dc565bff395f541dc7b574905
Bug: 315507370
Change-Id: I1831ca9b459f19974b0030cb019157e803031511
2023-12-08 13:13:06 -08:00
Cole Faust
14a2362183 Reapply "Handle symlinks in sbox"
This reverts commit 69b5a5f0bf.

Bug: 307824623
Test: Presubmits
Change-Id: Id7dd1518ae6b04232c48c0aa138cad2c59b228c3
2023-12-08 12:43:00 -08:00
Cole Faust
df1efd7251 Add compile_data for android apps
Compile_data is a property on rust rules to declare extra files
that are used by the compiler. In rust's case this happens commonly
with `include_str!()`.

Other compilers like javac or aapt2 don't often reach out to other
files, so it's not as neccessary. But they will follow symlinks.
We're making a change to only include symlinks themselves in sbox
sandboxes, and the targets of the symlinks must be listed
explicitly. For this, we need compile_data to list the targets
of symlinks.

Bug: 307824623
Test: m out/soong/.intermediates/frameworks/base/tools/aapt2/integration-tests/SymlinkTest/AaptSymlinkTest/android_common/lint/lint-baseline.xml with the symlink change
Change-Id: I33eb9cbe4b6eb25e3f33ea0ac9dade88c3d4a624
2023-12-08 12:34:42 -08:00
Treehugger Robot
f73da3ef78 Merge "rust: add aconfig_flag support" into main am: 5ada6c2738
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2863750

Change-Id: Ide278450fa058b6dc565bff395f541dc7b574905
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-08 20:05:49 +00:00
Treehugger Robot
5ada6c2738 Merge "rust: add aconfig_flag support" into main 2023-12-08 19:35:28 +00:00
Cole Faust
bcfc299575 Remove art/test from genrule allowlist
go/android-busy-beavers-sandboxing

Bug: 307824623
Test: mm in art/test
Change-Id: Ic37343ad873f71461db984b030f6beda5279207c
2023-12-08 10:57:27 -08:00
Cole Faust
ce74a59bb2 individually escape results of $(locations)
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
2023-12-08 10:53:59 -08:00
Cole Faust
558e2bd19c Merge "Fix typo in the comment" into main am: 2237d24894
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2865414

Change-Id: I6ecf98ae6cd00dc10518716673acea89f7114f2c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-08 18:09:10 +00:00
Cole Faust
2237d24894 Merge "Fix typo in the comment" into main 2023-12-08 17:32:43 +00:00
Tor Norbye
cabafdeee0 303434307: Enable flagged API checking
Also downgrade the new UseSdkSuppress check from error to warning.
And temporarily downgrades FlaggedApi from error to warning until
existing violations are resolved.

Test: The build
Bug: 303434307
Change-Id: Id7802621d567815470dee1aeb815abe214f098cd
2023-12-08 15:44:20 +00:00
Jihoon Kang
1ed5d5ca20 Merge changes from topic "aconfig_dump_map" into main am: 25c187cc7d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2854663

Change-Id: I0d9212e36959c7964e6cbff7228b5ff5dabad32a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-08 10:27:20 +00:00
Jihoon Kang
25c187cc7d Merge changes from topic "aconfig_dump_map" into main
* changes:
  Add aconfig flag support for android_app
  Add aconfig flag value text file in aconfig_declarations provider
2023-12-08 09:48:13 +00:00