Commit Graph

85203 Commits

Author SHA1 Message Date
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
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
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
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
mrziwang
1842097928 Add framework for using provider on AndroidMKEntries
In the context of incremental soong, the inter-module communication
through AndroidMkEntries and AndroidMkData should be changed to
through the real provider.

This change adds the framework for the provider(AndroidMkInfoProvider).
A module will set its AndroidMkInfoProvider, which includes what's
in its AndroidMkEntries method, to be used in translateAndroidMkModule.

This change also changes module type vbmeta to use
AndroidMKInfoProvider.

The next step is to replace the AndroidMkEntries methods of all the
other module types to set the AndroidMkInfoProvider.

Test: m with tests and CI
Bug: 357907638
Change-Id: Icfd1363f97d31548bb78c6615e0f7076b22dcbe4
2024-09-11 10:38:41 -07:00
Charisee
037e1297d9 rustc-1.81.0 Build 12349086
Test: m rust
Change-Id: I036a8f459055343533c651f461cda1d71a921757
2024-09-11 16:45:49 +00:00
Krzysztof Kosiński
28b806c9eb Merge "Add missing pieces of ARMv9.2-A support." into main 2024-09-11 16:04:44 +00:00
Neill Kapron
f1d63b8b6d Merge "SOONG: BPF: add libbpf_prog soong module" into main 2024-09-11 15:41:14 +00:00
Justin Yun
2cc42505d9 Soong system image may update the $PRODUCT_OUT
A target must define "USE_SOONG_DEFINED_SYSTEM_IMAGE := true" and
"PRODUCT_SOONG_DEFINED_SYSTEM_IMAGE := <name of soong system image>"
to use the soong defined system image.
The system image must install the files to $PRODUCT_OUT for adb sync
and build verification. Instead of using 'update_product_out'
property in Android.bp, copy the files only if the name of the image
matches with PRODUCT_SOONG_DEFINED_SYSTEM_IMAGE.

Bug: 350599535
Bug: 365700376
Test: lunch aosp_x86_64-trunk_staging-userdebug && m &&
      m aosp_cf_system_x86_64
Test: lunch aosp_cf_x86_64_phone_soong_system-trunk_staging-userdebug
      && m
      and adb sync on the cf device
Change-Id: If8673ba2855a753a5559a588bd83068d950fd7e4
2024-09-11 14:34:44 +09:00
Treehugger Robot
1705fef470 Merge "Rerun globs when a dependency is missing" into main 2024-09-11 05:30:14 +00:00
Jim Tang
01c3234190 Merge "Support apk for product_variables.debuggable" into main 2024-09-11 02:56:11 +00:00
Cole Faust
69c78e9b6e Rerun globs when a dependency is missing
If you remove a folder that's part of a glob, soong will error out
currently. Instead treat it like an out-of-date dependency.

Bug: 364749114
Test: m nothing, rm glob folder, m nothing
Change-Id: I86ee755a0815b79192133223f8ef3ecd90669db1
2024-09-10 16:46:06 -07:00
Cole Faust
8ca2a80d27 Merge "Make globs compatible with hash-based ninja semantics" into main 2024-09-10 23:20:10 +00:00
Dan Albert
4e455c72b2 Add myself as an owner of the map files doc.
Bug: None
Test: None
Change-Id: I4ca8a28235295f1cf3c3a40ee1e61d9e36791bd3
2024-09-10 21:34:35 +00:00
Treehugger Robot
e97ec10a98 Merge "Add a check for -fno-integrated-as" into main 2024-09-10 20:38:55 +00:00
Cole Faust
dd46300414 Merge "Remove BUILD_BROKEN_USES_SOONG_PYTHON2_MODULES" into main 2024-09-10 19:33:04 +00:00
Treehugger Robot
864344a84f Merge "Revert "Add BUILD_BROKEN_PYTHON_IS_PYTHON2"" into main 2024-09-10 19:24:10 +00:00
Treehugger Robot
2545872a68 Merge "Improve docs about //visibility:public" into main 2024-09-10 18:48:06 +00:00
Spandan Das
8a847c409c Improve docs about //visibility:public
https://r.android.com/3252814 modified the visibility to
//visibility:public to account for visibility skew between development
and release branches.

Drop the comment about stub libraries being safe to use by any _rdep_.
There might be cases where this is not true.

Test: N/A
Bug: 239189932
Change-Id: I74ca661a40384d480148f5e18f76495e837c58e3
2024-09-10 17:51:36 +00:00
Treehugger Robot
58e82f6c9c Merge "Sandbox com.google.pixel.camera.hal.manifest" into main 2024-09-10 17:29:40 +00:00
Cole Faust
527dc30f42 Revert "Add BUILD_BROKEN_PYTHON_IS_PYTHON2"
This reverts commit b1fbc79206.

Removing the build broken flag to progress the python3 migration. It's been here for over a year and I haven't heard of any users.

Bug: 203436762
Test: Presubmits
Change-Id: Icfd2d25986abda934c60fd868ed5525dc384fbf3
2024-09-10 10:04:19 -07:00
Jim Tang
914832444e Support apk for product_variables.debuggable
Bug: 365707065
Test: m FactoryOtaPrebuilt
Change-Id: I880b9d48b52d49cbf8c1eca6a67d3ffadc8ea0fc
2024-09-10 18:06:22 +08:00
Treehugger Robot
3507a28d75 Merge "Update $PRODUCT_OUT from the soong system image files" into main 2024-09-10 01:27:05 +00:00
Cole Faust
4ce4f8893e Remove BUILD_BROKEN_USES_SOONG_PYTHON2_MODULES
It's been available for over a year, lets progress the python3 migration
by removing it.

Bug: 203436762
Test: Presubmits
Change-Id: I46a6477ec65e98b7e6df5cc1359f676dcbd0f08e
2024-09-09 18:08:49 -07:00
Treehugger Robot
47d151befe Merge "Remove zeros from build number" into main 2024-09-10 00:52:26 +00:00
Cole Faust
2fec4128e0 Make globs compatible with hash-based ninja semantics
Previously, globs worked by having soong_build rewrite a ninja file
that ran the globs, and then dependended on the results of that ninja
file. soong_build also pre-filled their outputs so that it wouldn't
be immediately rerun on the 2nd build.

However, the pre-filling of outputs worked for ninja, because although
it updated their timestamps, the soong ninja file was then touched
by soong_build after that, so the soong_build ninja file was newer
and ninja wouldn't rerun soong. But N2 reruns actions if their inputs'
mtimes change in any way, not just if they're newer. Similarly,
hashed-based ninja implementations could not enforce an order on
file contents, so they would have the same problem.

To fix this, lift the glob checking out of ninja and into soong_ui.
Soong_build will output a globs report file every time it's run, and
every time soong_ui is run it will check the globs file, and if any
globs change, update an input to soong_build. soong_ui is essentially
doing what was done in ninja with bpglob actions before.

Bug: 364749114
Test: m nothing, m nothing again doesn't reanalyze, create a new file under a glob directory, m nothing again reanalyzes
Change-Id: I0dbc5ec58c89b869b59cd0602b82215c4972d799
2024-09-09 17:42:49 -07:00
Cole Faust
3ae36f42dc Remove zeros from build number
The zeros were kept in place of the timestamp in case people were
parsing it. Let's try to remove the zeros now and see what breaks.

Test: Presubmits
Change-Id: Ic52168f6be05a74323d8e47935de5c6a5cf15516
2024-09-09 16:54:16 -07:00
Cole Faust
65922b20fa Sandbox com.google.pixel.camera.hal.manifest
It's now taking advantage of the uses_order_only_build_number_file
feature of genrules, and doesn't need to be excempted from sandboxing.

Bug: 307824623
Test: Presubmits
Change-Id: I6ae5da7518990fbf4083aeac1aaba770210a4be1
2024-09-09 16:50:37 -07:00
Spandan Das
ca9ccec822 Remove extra space in error message
Change-Id: I45420afc37736ec8fecd0c489c35c14b377a71a5
Test: N/A
2024-09-09 22:58:11 +00:00
Krzysztof Kosiński
b8c5e95e26 Add missing pieces of ARMv9.2-A support.
aosp/3255916 didn't add all of the required infrastructure.
Refactor it to be more like x86_64 so it requires less
boilerplate code.

Bug: 364383722
Test: presubmit
Change-Id: Idc5279ffc5fe964bea9f98873c01468944d90091
2024-09-07 03:11:25 +00:00
Xin Li
aa8ceca851 Merge "Merge 24Q3 to AOSP main" into main 2024-09-07 01:12:30 +00:00
Treehugger Robot
2618069b9f Merge "Fix ravenizer when transitive classpath is enabled" into main 2024-09-06 23:06:52 +00:00