Commit Graph

83625 Commits

Author SHA1 Message Date
Inseob Kim
19fd1316b7 Sync gen_build_prop.py to sysprop.mk
Also fixes a bug on an if clause.

Bug: 322090587
Test: build and compare both build.prop files
Change-Id: Id0dfba98f5cd67c939594554b470e7fad9cfd518
2024-07-24 15:53:54 +09:00
Inseob Kim
bcc00559c6 Add TARGET_SYSTEM_PROP to system build.prop
System partition's build_prop output now contains TARGET_SYSTEM_PROP.
Soong needs to know paths to add them to ninja build dependency graph.

Bug: 322090587
Test: build and compare both build.prop files
Change-Id: Ide73e876d28eda0cced2ec08bd3c680115025ad8
2024-07-24 15:53:54 +09:00
Filip Zakrzewski
c9f487b0e8 Add android.car.builtin to the Code Coverage instrumented list.
BUG=339901608

TEST=no

Change-Id: I3457dd843f3ebcefda4253b128ed142a7fa13e82
2024-07-24 04:27:45 +00:00
Kiyoung Kim
e51cb36a48 Merge "Remove VSDK related code from build" into main 2024-07-24 03:31:43 +00:00
Spandan Das
02be101893 Allow C symbol file to be arch variant
The libclang_rt.* prebuilt libraries have an autogenerated map.txt for
each arch. e.g.
```
$ ls prebuilts/clang/host/linux-x86/clang-r530567/lib/clang/19/lib/linux/libclang_rt.asan*map.txt
prebuilts/clang/host/linux-x86/clang-r530567/lib/clang/19/lib/linux/libclang_rt.asan-aarch64-android.map.txt  prebuilts/clang/host/linux-x86/clang-r530567/lib/clang/19/lib/linux/libclang_rt.asan-riscv64-android.map.txt
prebuilts/clang/host/linux-x86/clang-r530567/lib/clang/19/lib/linux/libclang_rt.asan-arm-android.map.txt      prebuilts/clang/host/linux-x86/clang-r530567/lib/clang/19/lib/linux/libclang_rt.asan-x86_64-android.map.txt
prebuilts/clang/host/linux-x86/clang-r530567/lib/clang/19/lib/linux/libclang_rt.asan-i686-android.map.txt
```

These map.txt files are currently a noop, but will be used to compile
stub srcs. In preparation for that, make stubs.symbol_file and
llndk.symbol_file arch variant

Test: m nothing # no diff in ninja file
Bug: 220898484
Change-Id: I7316546905c1327c764ee67a48c77a2a68465d77
2024-07-24 01:21:53 +00:00
Treehugger Robot
562eaab091 Merge "Add C symbol file to module sdk snapshot" into main 2024-07-23 23:23:00 +00:00
Spandan Das
1f22939d81 Ingore CC prebuilts from cmake snapshots
The cmake snapshot scripts currently looks at the `cc.Module.compiler`
property to determine whether a cc_* module is a prebuilt. As part of
b/275273834. some cc_* prebuilt modules which provide APIs will have a
non-nil `compiler` to convert the API .txt file to stub .c files.

This CL updates the cmake generation script to ignore prebuilts using
the `IsPrebuilt` function rather than `cc.Module.compiler`

Bug: 275273834
Test: m nothing --no-skip-soong-tests
Change-Id: Id8ba22b1c5ad13fb31e75a407a25e97a8040d0b1
2024-07-23 22:36:10 +00:00
Spandan Das
e20c56cdf0 Add C symbol file to module sdk snapshot
cc_prebuilt_library_shared does not currently support generating stubs
from API symbol_files, and therefore the symbol file was removed from
the module sdk snapshots in https://ag.corp.google.com/11394495

As part of b/275273834, the stubs will be generated from the API files
for cc_prebuilt_library_shared, so add the symbol file back to the
module sdk

Bug: 275273834
Test: m nothing --no-skip-soong-tests
Test: m art-module-sdk and verified the map.txt is copied to the zip
next to the Android.bp file

Change-Id: I9551e7b8a76ceb9db3ed0434d315b6839f5e3d54
2024-07-23 22:18:00 +00:00
Jared Duke
8f1340eb8a Merge "Support symbolized odex preopt output" into main 2024-07-23 22:10:26 +00:00
Treehugger Robot
b137e55a39 Merge "Specify Is_stubs_module property in top level sdk library" into main 2024-07-23 19:42:06 +00:00
Treehugger Robot
b359e61d2a Merge "Pass config files to metalava" into main 2024-07-23 19:38:09 +00:00
Yabin Cui
44ee7a690e Merge "Update Bindgen clang to clang-r530567" into main 2024-07-23 17:53:55 +00:00
Jared Duke
9c17ad6ec3 Support symbolized odex preopt output
Add support for generating symbolized .odex output alongside existing
stripped .odex output for dexpreopt'ed targets. This creates the
symbolized artifact in the same output intermediate directory as its
stripped counterpart with a `.symbols.odex` suffix.

A follow-up change will collect and archive these symbolized artifacts
alongside other comparable preopted artifacts.

Bug: 342009826
Test: m CredentialManager + inspect intermediate `symbols.odex` output
Change-Id: I1bf25932ee47d6cb10a89132441aaab593de9c1a
2024-07-23 17:04:30 +00:00
Treehugger Robot
9a2f01b762 Merge "Drop module sdk MakeUninstallable special case" into main 2024-07-23 16:23:45 +00:00
Paul Duffin
278193669e Pass config files to metalava
Adds a filegroup "metalava-config-files" whose contents are passed to
Metalava using the `--config-file` option.

Bug: 354699349
Test: m checkapi
Change-Id: I1e246517c2ef678e41214c975aecee97f9faca67
2024-07-23 10:38:01 +01:00
Nelson Li
154e05ba51 Enable select syntax support for phony_deps in phony_rule
Previously, `phony_deps` in `phony_rule` was a simple []string type, so
the select syntax was not supported. This change modifies it to a
Configurable[[]string] type to enable select syntax support.

Bug: 354850153
Test: Add select syntax in the Andorid.bp
Change-Id: Ibc5e5ee5d8fb9c19dc45d744a71b625fe94c9d88
2024-07-23 15:26:01 +08:00
Jiyong Park
c25dea9d73 Merge "Update visibility according to the change AVF directories layout" into main 2024-07-23 07:21:23 +00:00
Inseob Kim
f223702f3f Make the vintf_fragments property configurable
This allows using select statements with it.

Bug: 354824866
Test: m
Change-Id: I9080c14b8342868d842670c65386582552b32d46
2024-07-23 14:03:12 +09:00
Inseob Kim
f4889dbc88 Make the defaults property configurable
This allows using select statements with it.

Bug: 354824866
Test: m
Change-Id: I673df0869a68c2e79b19c577d0ae1ff2249388db
2024-07-23 14:03:03 +09:00
Kiyoung Kim
a7510851ea Remove VSDK related code from build
Remove leftover VSDK related code from build, as they are no longer in
use.

Bug: 332986564
Test: AOSP CF build succeeded
Change-Id: I7dcec66ddf6ee9a563ac09a3fa8a282c9e00258a
2024-07-23 12:18:45 +09:00
Spandan Das
2f68f1903a Drop module sdk MakeUninstallable special case
Platform variants of module sdk libraries were marked as uninstallable
originally in https://r.android.com/1974259. This special case is no
longer necesssary - android.MutateApexTransition will call
MakeUninstallable on the platform variant on both the source and
prebuilt soong modules when the following conditions are met
- //apex_available:platform is not listed in apex_available (explicitly
  or via the default implicit)
- the soong module is included in an apex that exists in the tree
  (listed in native_shared_libs)

Since MakeUninstallable is set by apex specific mutators, the relevant
unit test has been moved to the apex package. The Android.bp of the test
has also been extended with an apex that includes the shared library.

Test: m nothing --no-skip-soong-tests
Test: no diff in out/soong/Android-$product.mk
Test: added prebuilt_libdexfile to art's apex_contributions locally, no
diff in out/soong/Android-$product.mk

Bug: 220898484
Change-Id: I43a324882d486451bb921028853508d7ec3d76bf
2024-07-22 23:13:20 +00:00
Jihoon Kang
e4a9017327 Specify Is_stubs_module property in top level sdk library
java_sdk_library's "magic" will always resolve to stubs when either of
the following conditions are met:
- the module sets `api_only` property to "true": this signifies that
  the module does not create an implementation library, thus the "magic"
  always returns stubs
- the module sets `default_to_stubs` property set to "true": this
  signifies that the reverse dependencies outside of the same apex will
  always get the stubs, even when the rdep does not specify the
  sdk_version.

This change utilize this information and mark the top level sdk_library
as a stubs module when any of the above conditions are met, in order to
minimize the false positives in container violation errors.

Test: Run container enforcement and observe results
Bug: 354029496
Change-Id: I04b52c5662f635ab1837eb33a39f187ae8998238
2024-07-22 22:31:50 +00:00
Yabin Cui
aca752647e Update Bindgen clang to clang-r530567
Bug: 342023558
Test: presubmit
Change-Id: I9ff1ee32f99728a982f4982121f86e94d4d98f91
2024-07-22 13:45:46 -07:00
Treehugger Robot
39d3883500 Merge "Fix afind command" into main 2024-07-22 14:05:18 +00:00
Treehugger Robot
e69b3218f3 Merge "Add jarjar_rename property to java modules." into main 2024-07-22 14:04:06 +00:00
Jiyong Park
f6736c714f Update visibility according to the change AVF directories layout
Bug: 352458998
Test: m nothing
Change-Id: I594301a48ad224d10ee0f3030f4c7dbd179b82ba
2024-07-22 11:22:35 +09:00
Joe Onorato
451ceec4dd Fix afind command
afind "*.foo" didn't work because "*.foo" got expanded inside afind

Change-Id: Ia479ed6e50e64fe2ffdf1983050a6da91d6a06f0
2024-07-20 17:46:15 -07:00
Joe Onorato
a5d171773d Add jarjar_rename property to java modules.
It's the same mechanism that aconfig uses, but now it's exposed directly
to Android.bp files.  (I had wanted to test it out there before making
it a property just in case it didn't work well)

Bug: 352385368
Test: go test -v -run TestJarJar.*
Change-Id: I72d797d08a250be93779ee4b038a1b8fc62123b7
2024-07-20 17:46:15 -07:00
Elliott Hughes
081aaa9571 Remove armv7-a.
Non-neon armv7 hasn't been supported for OS builds for many years now.

Change-Id: I230cd0b20cc166a59b622c9cd82b7f06ef3ca3b0
2024-07-19 20:49:08 +00:00
Zhuoyao Zhang
ed4c8f344b Fix run_tool_with_logging_test in CI
Export the TMPDIR env variable so that the tool_event_logger writes log files under the test TMPDIR.

Test: ABTD
Bug: 346391441
Bug: 346391241
Change-Id: Ib1e4b57fe355da6f4e0611446e70dc3bf29f4fa1
2024-07-19 17:08:31 +00:00
Treehugger Robot
dd9b0c1be8 Merge "Remove allowlist for updatable modules with current min_sdk_version" into main 2024-07-19 17:04:57 +00:00
Spandan Das
ad2aa3d220 Merge "Add all compile deps to module_bp_java_deps.json" into main 2024-07-19 16:22:57 +00:00
Treehugger Robot
00abdc02de Merge "Add 'use_debug_art' to product_variable" into main 2024-07-19 03:21:23 +00:00
Treehugger Robot
66884937f8 Merge "Fix DISPLAY_BUILD_NUMBER" into main 2024-07-19 01:25:17 +00:00
Spandan Das
8aac993b94 Add all compile deps to module_bp_java_deps.json
`Dependencies` in module_bp_java_deps.json currently only contains the
`libs` and `static_libs` of the corresponding module. This is only a
subset of the dependencies which are required to compile the java
module. Most notably, the SDK deps (determined using `sdk_version`) are
missing.

This CL adds all the compile dependencies to the json file. Implementation
details:
1. Add a `compileDepNames` to java.Module in base.go. Almost all the
   module types in java package are composed with the java.Module
struct.
2. Populate this property in java.Module.collectDeps. This function is
   used by java.Module.compile to determine the classpath used for
compilation.
3. Return `compileDepNames` in java.Module.CompilerDeps.

Since `compileDepNames` is populated in `GenerateAndroidBuildActions`,
update existing unit tests that check for correctness of IDEInfo.Deps

Bug: 353811607
Test: m nothing --no-skip-soong-tests
Test: cat out/soong/module_bp_java_deps.json | jq '."DebuggingRestrictionController".dependencies'
[
  "android_system_stubs_current", <-- missing previously
  "core-lambda-stubs", <-- missing previously
  "core-public-stubs-system-modules", <-- missing previously
  "com.google.android.material_material",
  ...
  ...
]

Change-Id: I166c0eaf6e87ca7adc98bb4e21447cf82612d103
2024-07-19 01:03:27 +00:00
Inseob Kim
51d3a6d2d3 Fix DISPLAY_BUILD_NUMBER
The dot was accidentally removed.

Bug: 353425495
Test: build
Change-Id: Id0c08f3c98d5b2f56e49180baf98bb8847f6bebd
2024-07-19 09:26:36 +09:00
Atneya Nair
8a66409462 Merge "dirmods: Update to take absolute paths" into main 2024-07-18 23:27:17 +00:00
Treehugger Robot
bd3fd1daca Merge "Populate java_api_libray's IDEInfo" into main 2024-07-18 22:29:17 +00:00
Spandan Das
4ae68018a0 Populate java_api_libray's IDEInfo
Adding the srcjar to module_bp_java_deps.json is useful for IDE
autocompletion of rdeps.

Bug: 353806911
Test: cat out/soong/module_bp_java_deps.json | jq '."core.current.stubs.from-text"'
{
  "dependencies": [
    "stub-annotations"
  ],
  "srcjars": [
    "out/soong/.intermediates/build/soong/java/core-libraries/core.current.stubs.from-text/android_common/metalava/core.current.stubs.from-text-stubs.srcjar"
  ],
  "path": [
    "build/soong/java/core-libraries"
  ],
  "libs": [
    "stub-annotations"
  ]
}

Change-Id: Ie4ad985a7da40b478453735dfdb10d0ac63ab8f4
2024-07-18 21:35:28 +00:00
Treehugger Robot
c7eb3bdae7 Merge "Highlight build failures in soong output" into main 2024-07-18 20:13:15 +00:00
Atneya Nair
30f3662693 dirmods: Update to take absolute paths
Dirmods currently expects a path relative to the top of the build. If
an abs path is passed, it will never match anything.

Modify so that if path is absolute, we fix-up the path relative to
ANDROID_BUILD_TOP.

Test: manual
Bug: trivial
Change-Id: Iad99228078dc693ab5f7957e007fe1bd5cea07d2
2024-07-18 12:28:11 -07:00
Treehugger Robot
c003b63aa1 Merge "Document how resources are built with and without resource processor" into main 2024-07-18 18:05:15 +00:00
Colin Cross
ea1b3b78b8 Merge changes from topic "elide_empty_variants" into main
* changes:
  Convert sdk mutator to TransitionMutator
  Convert link mutator to TransitionMutator
  Convert version mutator to TransitionMutator
  Convert python_version mutator to TransitionMutator
  Convert rust_libraries and rust_stdlinkage mutators to TransitionMutators
2024-07-18 17:37:38 +00:00
Ivan Lozano
e9871abe44 Merge "android: Use slices.DeleteFunc for filtering" into main 2024-07-18 17:27:34 +00:00
Treehugger Robot
16afb50a6a Merge "Update run-ckati.sh to use JDK 21" into main 2024-07-18 16:45:03 +00:00
Devin Moore
aa4f1c20c2 Merge "Support phony_output as a BuildParam Arg in RuleBuilder" into main 2024-07-18 15:21:12 +00:00
Ivan Lozano
03b717d3f1 android: Use slices.DeleteFunc for filtering
Clean-up two filters in arch.go by using slices.DeleteFunc

Bug: 353739440
Test: m blueprint_tests
Change-Id: I3738bb7961830e2c287257cceb64194f048514d3
2024-07-18 15:13:50 +00:00
Ivan Lozano
a0258d8b3f Merge "android: Add host_cross_supported prop" into main 2024-07-18 14:31:02 +00:00
Ivan Lozano
c7eafa7a41 android: Add host_cross_supported prop
Some modules are only intended to be build for the build host,
e.g. rust_library modules only used in rust_proc_macro or
code generators.

These should not be expected to be built for or supported on non-build
host platforms. Thus, add a host_cross_supported property to disable
the HostCross target.

Test: m blueprint_tests
Test: Modules with host_cross_supported: false don't build for HostCross
Change-Id: Ia15f55776e04d86aee19bb0dd0d27e1b985b2b75
2024-07-18 13:28:27 +00:00
Sorin Basca
6b805b9384 Update run-ckati.sh to use JDK 21
Bug: 342332820
Change-Id: Id6dd630a78ac790e682f6c839b6ab26cc3a5671b
Test: TH
2024-07-18 09:39:00 +00:00