Commit Graph

76511 Commits

Author SHA1 Message Date
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
Yuichiro Hanada
e42ac1c79b Fix typo in the comment
Bug: None
Test: m soong_docs and check the generated soong_build.html

Change-Id: I72dd87915f8f5225600365d8ef3f6b9c337a5dbc
2023-12-08 12:23:15 +09:00
Cole Faust
08f46ee8d4 Merge "Revert "Handle symlinks in sbox"" into main am: 25861686fe
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2864655

Change-Id: Ic479fd4e9d4f0fec49ba0e11a52370d2cc4a8d5e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-08 01:24:48 +00:00
Colin Cross
8d411ff8f8 Remove bp2build and bazel from soong_ui
Bug: 315353489
Test: m blueprint_tests
Change-Id: I9df31b18caaae24e3cf2994e56bb90b50523f11e
2023-12-07 17:14:27 -08:00
Cole Faust
25861686fe Merge "Revert "Handle symlinks in sbox"" into main 2023-12-08 00:43:17 +00:00
Yu Liu
95572ff2da Remove the code for bazel when reading ReleaseAconfigValueSets.
Bug: 315353489
Test: CI
Change-Id: I652f78df6d9256cdb35b8b498e20bcb76f1437b3
2023-12-07 16:38:45 -08:00
Jihoon Kang
84b2589e6d Add aconfig flag support for android_app
This change adds an overrideable property flags_packages to android_app,
which is used to list the aconfig_declarations module names that the app
depends on. The build action of android_app is modified to pass all
flags text file provided by the aconfig_declarations to aapt2 link as
--feature-flags arguments.

Test: m nothing --no-skip-soong-tests
Bug: 306024510
Change-Id: I4924f88b9954950cc1936a472cd7ac70f41add5d
2023-12-07 23:01:26 +00:00
Colin Cross
4c803a0355 Merge aconfig files per-module am: d788b3e6cb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2860765

Change-Id: Ie43ca8826156ff580618cdeda0337db270a82e62
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-07 22:37:13 +00:00
Jihoon Kang
cca3e0c4b5 Add aconfig flag value text file in aconfig_declarations provider
Alongside with the generated proto file, the aconfig_declaration now
also outputs a text file that lists aconfig flags and values of its
corresponding proto file, in the format as shown below:
```
my.flag1=true
my.flag2=false
...
```

To prevent confusion between the preexisting proto file and the newly
introduced text file, the change also renames the variables of the proto
file from `intermediatePath` to `intermediateCacheOutputPath` and
likewise.

The utilization of the generated text file will be done in the child
changes.

Test: m out/soong/.intermediates/build/make/tools/aconfig/aconfig.test.flags/intermediate.txt && inspect output
Bug: 306024510
Change-Id: Iee16ad57bb87e992a477fc96502f79e971d01233
2023-12-07 22:36:08 +00:00
LaMont Jones
0c97185450 rust: add aconfig_flag support
Bug: b/308625757
Test: manual
Change-Id: Ifd98cd0ad4e2525b08f5766e9332991c049162ea
2023-12-07 21:56:59 +00:00
Cole Faust
69b5a5f0bf Revert "Handle symlinks in sbox"
This reverts commit dd9529050d.

Reason for revert: There are at least b/315337725 and b/315036698 issues, reverting this cl while I fix them.

Change-Id: I644bbbe594b9dd53a99a3b6513fbcba68afe0b4a
2023-12-07 21:40:08 +00:00
Colin Cross
d788b3e6cb Merge aconfig files per-module
Passing the list of all transitive aconfig files to Make causes extra
Kati analysis runs when dependencies are changed in Android.bp files.
Since Make is going to merge them anyways, merge them per-module and
pass a single aconfig file to Make for each module.

Fixes: 313698230
Test: m out/target/product/vsoc_x86_64/system/etc/aconfig_flags.pb
Change-Id: Ifde4826bc93bc06e40338f72b4cb39eed26ca08d
2023-12-07 04:17:37 +00:00
LaMont Jones
78c3daf391 Merge "cc: export LOCAL_ACONFIG_FILES for printflags" into main am: 7dcbf427f9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2860706

Change-Id: Ibe4edfa6bd523d8f4d7850e7935a435734c2c2f6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06 19:16:59 +00:00
LaMont Jones
7dcbf427f9 Merge "cc: export LOCAL_ACONFIG_FILES for printflags" into main 2023-12-06 18:01:17 +00:00
Vilas Bhat
3f2cdb2665 Merge "16k: soong: Update DevicePageSizeAgnostic to DeviceNoBionicPageSizeMacro" into main am: 3ad4cf3a9a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2857828

Change-Id: Ic5d8c2efc8d41b766812d551607f7f6931060a2f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06 14:09:16 +00:00
Vilas Bhat
3ad4cf3a9a Merge "16k: soong: Update DevicePageSizeAgnostic to DeviceNoBionicPageSizeMacro" into main 2023-12-06 13:16:19 +00:00
Aleksei Vetrov
d193a77232 Merge "Move NDK ABI monitoring enabling flag to release flags" into main am: fb510be871
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2843703

Change-Id: I1d32fefcbc05e07d1898f2ffbb1888b2947a594b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06 12:29:22 +00:00
Aleksei Vetrov
fb510be871 Merge "Move NDK ABI monitoring enabling flag to release flags" into main 2023-12-06 11:11:35 +00:00
Aditya Choudhary
d798f5c879 Merge changes from topic "code_metadata" into main am: 4c3e2df157
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2852607

Change-Id: Icc9c1eda9b93e1ec897425b98cb8f16f83431409
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06 08:11:06 +00:00
Aditya Choudhary
7d37796d24 Add Code Metadata rule to soong/testing. am: 8094b6bf9d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2786121

Change-Id: I40154b3f9d2c170cb7aacbf6f0b9383b2e87f444
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06 08:11:01 +00:00
Aditya Choudhary
4c3e2df157 Merge changes from topic "code_metadata" into main
* changes:
  Add source file provider for genrule/srcs, python libraries and rust libraries.
  Add Code Metadata rule to soong/testing.
2023-12-06 07:37:50 +00:00
Jooyung Han
64a51889e8 Merge "Error if vendor apex adds an LLNDK library" into main am: 2588c54d01
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2858985

Change-Id: I05299415612f82859323831da1acf0c90943d2de
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06 02:33:55 +00:00
Jooyung Han
2588c54d01 Merge "Error if vendor apex adds an LLNDK library" into main 2023-12-06 01:45:48 +00:00
Cole Faust
37f8b661fe Add llvm-objcopy to android_sdk_repo_host's implicit tools am: df34caf8b5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2860767

Change-Id: Ic24df298c9c4444b59a8bf835e84af0afaa3ea18
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06 00:52:08 +00:00
Aleksei Vetrov
146e9824c5 Move NDK ABI monitoring enabling flag to release flags
Currently NDK ABI monitoring is enabled by switching boolean flag in
soong code. When this flag is switched, it will enable ABI monitoring in
all release configurations at once.

This change moves the flag from soong code to the trunk-stable flags
framework ("build/release/build_flags.scl") that allows to enable it
only in specific configurations like "trunk-staging".

Test: TH
Bug: 156513478
Change-Id: Ibb810a834c0d756b22782b1a2d8ec5a5e575a4b3
2023-12-05 23:52:46 +00:00
Vilas Bhat
b3d2d22a5d 16k: soong: Update DevicePageSizeAgnostic to DeviceNoBionicPageSizeMacro
This is part of a larger change to update the flag
PRODUCT_PAGE_SIZE_AGNOSTIC to PRODUCT_NO_BIONIC_PAGE_SIZE_MACRO.
This is to help clarify that this flag doesn't mean the device
will actually work end-to-end with any page size.

Bug: 312541564
Test:
```
source build/envsetup.sh
lunch aosp_cf_arm64_phone_pgagnostic-trunk-userdebug
m
cat out/soong/build.aosp_cf_arm64_phone_pgagnostic.ninja | grep __BIONIC_NO_PAGE_SIZE_MACRO
```

Change-Id: I33033876d0d4a276d1bb962d40315b71a3968c66
2023-12-05 23:49:50 +00:00
Cole Faust
df34caf8b5 Add llvm-objcopy to android_sdk_repo_host's implicit tools
llvm-strip is actually a symlink to llvm-objcopy. Since aosp/2850015,
rules must add both the symlink and the target of the symlink to
the sandbox to avoid a dangling symlink.

Fixes: 314994282
Test: m sdk sdk_repo dist
Change-Id: I72494596f3597e176222a44c822d0b12cdd4cde4
2023-12-05 14:44:42 -08:00
LaMont Jones
c71f79e3ff cc: export LOCAL_ACONFIG_FILES for printflags
Bug: 308625757
Test: manual
Change-Id: I211fe4736098bdca040c2a58b8b5e468c9d2e542
2023-12-05 20:46:06 +00:00
Aditya Choudhary
26df39fe44 Add source file provider for genrule/srcs, python libraries and rust libraries.
Change-Id: I2d7d4684a10c15aeecc27b8db800ab27a807d2e2
2023-12-05 19:56:26 +00:00
Hugo Drumond Jacob
567ed1b7b0 Merge "Revert "Sandbox chre_atoms_log.h and deqp_spvtools_update_build_version"" into main am: fe3777742a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2859245

Change-Id: I14f00114217c2153eb1f426c3a9bfb42d4804232
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-05 19:44:14 +00:00
Cole Faust
293162ec9e Merge "Handle symlinks in sbox" into main am: 14e1149195
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2850015

Change-Id: I6217d7c30cd45c02fcef77b9d29eb1cd56056f2d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-05 19:41:07 +00:00
Hugo Drumond Jacob
fe3777742a Merge "Revert "Sandbox chre_atoms_log.h and deqp_spvtools_update_build_version"" into main 2023-12-05 19:09:34 +00:00
Aditya Choudhary
8094b6bf9d Add Code Metadata rule to soong/testing.
This Cl adds a new rule to Soong to generate code ownership metadata. Also, this CL adds a provider in the Java SDK library to provide generated source files to the Code_metadata rule. Will add providers to other libraries in the future changes.

Bug: 296873595
Change-Id: Ic2e43aa9b161231fea4416d1f0d36b778361d7c5
2023-12-05 18:10:03 +00:00