Commit Graph

85231 Commits

Author SHA1 Message Date
Maciej Żenczykowski
d0ea163941 Merge "BPF: rename bpf_defaults to bpf_cc_defaults" into main 2024-09-13 22:15:27 +00:00
Treehugger Robot
ad6a20f3a1 Merge "Add links to partner docs for presigned apks" into main 2024-09-13 21:16:42 +00:00
Aditya Kumar
e5cb9c659b Merge "Disable -Wno-deprecated-dynamic-exception-spec until the warning is fixed in libc++abi header files" into main 2024-09-13 21:10:04 +00:00
Treehugger Robot
c2ea958b3d Merge changes from topic "flag_application_manifest" into main
* changes:
  Support multiple <application> or <uses-sdk> elements in manifest_*.py
  Fix manifest_fixer.py warnings
2024-09-13 19:52:44 +00:00
Cole Faust
ce6ddd6e24 Add links to partner docs for presigned apks
So if a partner gets this error they can find the script and see
links to documentation.

Test: Presubmits
Change-Id: I50cbe4770e9619fb67a7a586fa6d2210c67d4650
2024-09-13 11:51:02 -07:00
Colin Cross
e1ab849b39 Support multiple <application> or <uses-sdk> elements in manifest_*.py
Manifests may now have multiple copies of elements if they are
disambiguated with android:featureFlag attributes.  Remove the
restrictions on duplicate elements from manifest_check.py and
manifest_fixer.py, and instead iterate over all matching elements.

Test: manifest_check_test.py, manifest_fixer_test.py
Bug: 365170653
Flag: EXEMPT bugfix
Change-Id: Ib577439d03a808a20a5fcc3e15a3117e0970d729
2024-09-13 11:20:21 -07:00
Neill Kapron
dfc02f81fc BPF: rename bpf_defaults to bpf_cc_defaults
With the addition of defaults to the bpf soong module (see aosp/3249485
), the name `bpf_defaults` will be used to define defaults for bpf
program compilation. While there are separate soong namespaces for
module types and module names, rename the existing bpf_defaults
cc_defaults to bpf_cc_defaults for clarity.

While we're at it, add -Wextra, and cleanup unnecessary cflags in
clauses which use bpf_cc_defaults.

Test: TH
Change-Id: Ib5f453ce33b13c698e8b91088bc59f8c6719c892
Signed-off-by: Neill Kapron <nkapron@google.com>
2024-09-13 17:55:12 +00:00
Treehugger Robot
05d9069051 Merge "Fix reanalysis after full build" into main 2024-09-13 17:41:24 +00:00
Colin Cross
893528a4c9 Fix reanalysis after full build
Blueprint bootstrap and Soong each create rules to install
blueprint_go_binary modules to the same location, but with different
command lines.  Binaries used during bootstrap are installed using
the bootstrap rule, but then get reinstalled during a full build via
the blueprint_tools phony that is a dependency of droid.  This
changes the command line used for the rule stored in .ninja_log,
and then on the next bootstrap ninja will rerun the binaries,
triggering reanalysis.

As a quick fix, don't create install rules for loadplugins and
soong_build.  A more permanent fix may be to move the bootstrap
installation to a different location, but that will require more
testing.

Bug: 366291149
Test: m blueprint_tools && m blueprint_tools
Flag; EXEMPT bugfix

Change-Id: Ib7f2910976f4b5e6add2128ce0b2a5d10445a53c
2024-09-12 23:08:16 -07:00
Treehugger Robot
24627096c1 Merge "Add SOONG_DISABLE_CLIPPY environment variable" into main 2024-09-13 05:49:00 +00:00
Jihoon Kang
437f87f0c7 Merge "Find subdir aconfig_values from srcs" into main 2024-09-13 03:56:32 +00:00
Treehugger Robot
6c10c36d0a Merge "linker_config_src in filesystem may read filegroup" into main 2024-09-13 02:19:03 +00:00
Jihoon Kang
4fbee9af0b Find subdir aconfig_values from srcs
This change supports adding dependencies from the aconfig_value_set
module to the aconfig_values modules from `srcs`, which are the
paths to the Android.bp files where the aconfig_value modules are
defined.

Test: m nothing --no-skip-soong-tests
Bug: 365827715
Change-Id: Idd5f1d9c2625a6362dbaf3adba0a74406e3a9928
2024-09-12 23:48:19 +00:00
Dennis Shen
01efb83420 Treat system_ext as system container
Bug: b/365135457
Test: m
Change-Id: Ic8fd60c0e1045f190b6608931ca1d65a784026f0
2024-09-12 23:31:49 +00:00
Chris Wailes
abc17eac1a Add SOONG_DISABLE_CLIPPY environment variable
This environment variable will be used for testing the Rust toolchain
for correctness before updating the Android codebase to resolve new
lints.

Test: Introduce lint
Test: SOONG_DISABLE_CLIPPY=true m out/soong/.intermediates/frameworks/minikin/rust/libminikin_rust_ffi/android_arm_armv8-a_rlib_rlib-std/libminikin_rust_ffi.rlib.clippy
Change-Id: If7236c7f16a3e0a0b27a90577211549f2dc1a344
2024-09-12 15:37:34 -07:00
Treehugger Robot
d4771aa267 Merge "Allow multiple ninja implementations" into main 2024-09-12 22:09:58 +00:00
Treehugger Robot
c379ea0fd4 Merge "Don't evaluate the enabled property in a defaultable hook" into main 2024-09-12 20:15:20 +00:00
Aditya Kumar
2c6b4acb87 Disable -Wno-deprecated-dynamic-exception-spec until the warning is fixed in libc++abi header files
Test: mmma art/libnativeloader

Bug: b/366180429
Change-Id: Ie77f9dc674224044d5c7078db891f88e42a52a19
2024-09-12 20:15:07 +00:00
Spandan Das
a7b916b50c Merge "Use -language-version 1.9 in the kotlinKythe build rule" into main 2024-09-12 19:52:30 +00:00
LaMont Jones
ece626ccac Allow multiple ninja implementations
This permits easier testing and comparison between different ninja
implementations.

Bug: 362926979
Bug: 318434287
Test: manual
Change-Id: Ic058338d0a2fd8c988794a0781dcc93c0f4c03e3
2024-09-12 12:45:27 -07:00
Treehugger Robot
c5d2456d8b Merge "Fix a bug in the log directory cleanup logic." into main 2024-09-12 19:02:44 +00:00
Cole Faust
8eeae4bbbe Don't evaluate the enabled property in a defaultable hook
So that we can decide the configuration after defaults are evaluated.
Instead, pass the enabled property on to submodules.

Bug: 361816274
Test: m nothing --no-skip-soong-tests
Change-Id: I853d557ed022f7434287cea0a2a19e684b59e145
2024-09-12 11:51:04 -07:00
Spandan Das
3d6c6d9c76 Use -language-version 1.9 in the kotlinKythe build rule
There are some instances of .kt code in android platform that are not
fully compatible with kotlinc > 2. To account for this version skew when
generating xrefs, implicitly add `-language-version 1.9` to the args in
the .kzip file. The main kotlinc build rules remain the same.

This value has been picked manually by running
`external/kotlinc/bin/kotlinc -version` at ToT

Bug: 265428637
Test: verified that `-language-version 1.9` is added to the build
command of the .kzip files
Test: ran the indexer locally on the .kzip of `PermissionController-lib`
(this android_library contains .kt code that does not compile with
verison >2)

Change-Id: Icfb72800404d83f63204de23a1ec34b40ee05847
2024-09-12 18:20:59 +00:00
Spandan Das
6556d043bd Merge changes from topic "kotlin_kythe" into main
* changes:
  Add kotlin kzips to build_kzip.bash
  Create .kzip files for kotlin translation units
2024-09-12 18:14:14 +00:00
Yaowen Mei
d9108d2d34 Fix a bug in the log directory cleanup logic.
This CL fix the bug that shouldCleanupRBELogsDir() never return true.

The way how shouldCleanupRBELogsDir() use to work is it will return true only if `RBE_proxy_log_dir` flag is not set.

But CI build always got this flag from gcl file, and developer build always got this flag set from ui/build/rbe.go (http://shortn/_K604iWNYkd). So there is never a case this shouldCleanupRBELogsDir() return true. That is to say, we never clean up
RBELogsDir by ourselves.

The reason why this is not a concern is that soong will automatically delete the out/soong/.temp folder every time when user run `m` or `lunch`, and the default RBELogsDir use to be `out/soong/.temp/rbe`. So soong is helping us to clean the logs before.


Previously, I merged this CL: https://r.android.com/3192211 to support running `lunch` in two terminals. In that CL, I moved the auto created RBELogsDir one level up to `out/soong/rbe`. This is causing a problem because RBELogsDir never get cleaned.

This CL will fix the shouldCleanupRBELogsDir() method, after this merged in, 1) if a user didn't set the `RBE_proxy_log_dir` flag, the logs in `out/soong/rbe` will be cleaned each time when running `m`, but `lunch` will not touch `out/soong/rbe`, so we still support running `lunch` in different terminals. 2) If user set `RBE_proxy_log_dir` flag to anything rather than `out/song/rbe`, the directory will not be cleaned by running `m`; 3) we have updated our doc everywhere that `out/soong/rbe` is re-client's default log dir, so I think it should be expected if user set `RBE_proxy_log_dir=out/soong/rbe`, then the logs will be deleted when next time `m` invoked, same as if they set `RBE_proxy_log_dir=out/soong/.temp/rbe` before.


Test: abtd run is green: http://shortn/_KqTvQelstP, local build with multiply lunch is not affected, and running m after a build can clean the out/soong/rbe directory.
Bug: 362798954
Change-Id: I38a7ad650fc59ad06716c5be7de6ecc61ead8eef
2024-09-12 18:08:06 +00:00
Treehugger Robot
167230037c Merge "Introduce a util method PrettyConcat" into main 2024-09-12 17:10:11 +00:00
Treehugger Robot
82e99ce373 Merge "Wrap blueprint_go_binary and bootstrap_go_package into android.Modules" into main 2024-09-12 15:46:51 +00:00
Charisee Chiw
3cee551577 Merge "rustc-1.81.0 Build 12349086" into main 2024-09-12 15:36:28 +00:00
Justin Yun
903856e3e8 linker_config_src in filesystem may read filegroup
Add "path" annotation to the linker_config_src property in filesystem
module to read a filegroup as a source.

Bug: 365670526
Test: lunch aosp_cf_x86_64_phone_soong_system-trunk_staging-userdebug
      && m
Change-Id: I96abb376640eea009f03841866b8c7b5d95917fa
2024-09-12 15:14:06 +09:00
Colin Cross
1496fb1675 Wrap blueprint_go_binary and bootstrap_go_package into android.Modules
Depending on a blueprint_go_binary from a Soong module requires hacks
that allow Soong to support both blueprint.Module and android.Module.
Wrap the blueprint Go module types with ones that implement
android.Module, and delete all the related hacks.

Bug: 319288033
Test: m checkbuild
Flag: EXEMPT refactor
Change-Id: I9b62b450de09bd10288333fbc66aa71c867ae0b3
2024-09-11 21:16:25 -07:00
Treehugger Robot
8996dbc91c Merge "Remove unused property naming_scheme in java_sdk_library" into main 2024-09-12 01:43:15 +00:00
Treehugger Robot
6fab06d56b Merge "Soong system image may update the $PRODUCT_OUT" into main 2024-09-12 00:25:21 +00:00
Jihoon Kang
6e0280d795 Introduce a util method PrettyConcat
The method can be used when printing string list in a well-formated way
in user-facing messages.
This will be used in a follow up change.

Test: m nothing --no-skip-soong-tests
Change-Id: I77e3445a5333f82067dd8f1bb6ad892c69754ece
2024-09-12 00:11:34 +00:00
Jihoon Kang
2261a82dbd Remove unused property naming_scheme in java_sdk_library
The property was introduced as an interim solution, and is currently
unused.

Test: m nothing --no-skip-soong-tests
Bug: 366071058
Change-Id: I57abdb64fabdb34fbbd1190851bc528dbb88c7f8
2024-09-12 00:10:37 +00:00
Cole Faust
7351875acb Merge "Add HasMutatorFinished" into main 2024-09-12 00:02:10 +00:00
Dan Albert
252ec5a5f4 Merge "Add myself as an owner of the map files doc." into main 2024-09-11 23:08:01 +00:00
Dan Albert
04e52144b6 Merge "Improve the docs about when to use introduced." into main 2024-09-11 23:07:50 +00:00
Zi Wang
6ad2e30de3 Merge "Add framework for using provider on AndroidMKEntries" into main 2024-09-11 23:02:33 +00:00
Spandan Das
53a230b2fe Merge "Delete multitree api imports code" into main 2024-09-11 22:20:52 +00:00
Treehugger Robot
b269e32d09 Merge "Remove apex_available allowlist" into main 2024-09-11 21:50:57 +00:00
Cole Faust
4e2bf9fb2d Add HasMutatorFinished
To enforce that selects are only evaluated after a certain point
in a followup cl.

Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: Ib215fedb904aa2e5f4d65cfd26a23f527eb4983e
2024-09-11 14:48:50 -07:00
Treehugger Robot
7873049d98 Merge "Remove prebuilt_visibility from sdk" into main 2024-09-11 21:40:55 +00:00
Colin Cross
6cb462b38c Fix manifest_fixer.py warnings
Fix a few warnings showing up in manifest_*.py

Test: manifest_fixer_test.py
Test: manifest_check_test.py
Flag: EXEMPT refactor
Change-Id: I144100d6d4aa7f5dff7eec79b4bd2d9d5da52153
2024-09-11 14:22:34 -07:00
Spandan Das
600afbe381 Add kotlin kzips to build_kzip.bash
Test: Built the phony xref_kotlin target locally
Bug: 265428637
Change-Id: Ib5d6679f17ea45beea8302bc2257e1e4bd0ed7eb
2024-09-11 21:16:24 +00:00
Spandan Das
1028d5a53f Create .kzip files for kotlin translation units
This CL creates the build rules to invoke the standalone kotlin
extractor and create .kzip files for each kotlin translation unit. These
will be indexed by the internal g3 kotlin indexers

Implementation details
- Create a `kotlinKytheExtract` static rule. Its inputs will be source
  .kt/.srcjar files and other verbatim args passed to kotlinc. The
extrator will serialize this information into a .kzip file. The .kzip
file should contain the necessary information to "replay" the
compilation
- Create a xref_kotlin phony rule to build all .kzip files corresponding
  to kotlin translation units.

This implementation has one limitation. Since the kotlin indexers
"replay" the compilation using its own version of kotlinc-jvm, there
might be indexing issues caused by kotlinc version skew between android
builds and indexing builds. `-kotlin-home` can likely solve that, but
this CL defers that for now.

Bug: 265428637
Test: Built the phony `xref_kotlin`, and ran the indexer locally using go/kythe-git-local-run#indexing-to-local-xrefs-server

Change-Id: Ifb370f2df8aa46f71df3fe1ae7d7aa5da773cc8b
2024-09-11 21:16:24 +00:00
Treehugger Robot
ba841f8155 Merge "Add directories below to Android.mk denylist:" into main 2024-09-11 20:36:53 +00:00
Spandan Das
cebc5db946 Remove prebuilt_visibility from sdk
This property was introduced for inter module dependencies in the
prebuilt module sdk. https://r.android.com/3252814 changed the visibilty
of all prebuilts in module sdk to //visibility:public. This property is
a noop now, and can be removed.

Test: go test ./sdk
Bug: 365111645
Change-Id: I186a201895fc2b33a65bbedae8a8326e087feb2b
2024-09-11 20:21:38 +00:00
Wei Li
7df32b1f69 Add directories below to Android.mk denylist:
device/common/
device/google_car/
vendor/google_contexthub/
vendor/google_data/
vendor/google_elmyra/
vendor/google_mhl/
vendor/google_pdk/
vendor/google_testing/
vendor/partner_testing/
vendor/partner_tools/
vendor/pdk/

Bug: 318428689
Test: CIs
Change-Id: I2242c84aaea844ed19bafd20a68c506c99859fea
2024-09-11 19:36:41 +00:00
Spandan Das
ff66518da2 Delete multitree api imports code
The mutltiree workflow has not been in use for a while. This CL cleans
up the code that was added to support multitree.

Details
- Delete cc_api_library, cc_api_headers, cc_api_variant module types.
  These module types contain build rules for prebuilt stub .so and .h
files
- Update the DepsMutator of cc.Module to not create a dependency on a
  sibling cc_api_* module if it exists. e.g. do not create a dependency
on libfoo.apiimports if libfoo is listed in `shared_libs`.
- Remove cc_api_library from the stub/impl selection logic for cc
  modules

Test: m nothing --no-skip-soong-tests
Test: presbumits
Change-Id: Ie194157fb3bbc630f384cdd9b694b0fba6786ded
2024-09-11 19:19:33 +00:00
Cole Faust
e8a8783154 Rename ConfigAndErrorContext to ConfigurableEvaluatorContext
I'm going to be adding some methods to this interface, give it
a name based on how it's going to be used, not based on what methods
it contains.

Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I9bba04ba756c4dbe00625e2d04af81e78a11cae9
2024-09-11 11:35:46 -07:00