This required moving to a SourceProvider for the Rust library. With the
previous approach only the first input file was being used.
Bug: 270547306
Test: Built libplatformproperties_rust, looked at output
Change-Id: I1070655abc071e099a42bc4be61cc080902e31c1
This rule should be able to work with OUT_DIR set as absolute path,
which is used in "development/tools/ndk/update_ndk_abi.sh".
The problem appears if sysprop file itself is generated and
"syspropFile.String()" returns an absolute path, which is not accepted
as path component for "PathForModuleGen".
The fix is to use "android.GenPathWithExt" like in "syspropJavaGenRule".
Fixes: 328506541
Test: TreeHugger
Test: development/tools/ndk/update_ndk_abi.sh
Change-Id: Ia1e9a0ad51ebd957be97c48f5e1cf0e06a0da0ee
This reverts commit 2766baa922.
Reason for revert: Relanding after fix in I3b190ebc1a1096972d0a1273e490972e04684dd2
Change-Id: Ie34301c506d3469ec3306f433631b0842b66d032
Aconfig file dependencies are module-independent, and properly part of
ModuleBase.
Bug: b/308625757
Test: manual
Change-Id: I38c5907d1671cc69bb198345201316ae781fdc9f
Convert all of the callers of SetProvider to use the type-safe
android.SetProvider API.
Bug: 316410648
Test: builds
Change-Id: If58f4b5355264ddab2045bc3591a4eac19cd58fc
Remove the ConvertWithBp2build implementations from all the module
types, along with the related code.
Bug: 315353489
Test: m blueprint_tests
Change-Id: I212672286686a318893bc7348ddd5a5ec51e77a7
All the necessary license data is already propagated through the license
metadata file, and the entries in Android-${TARGET_PRODUCT}.mk are not
used. Remove them, which should both reduce the size and parsing cost
of the Android-${TARGET_PRODUCT}.mk file and also removes a variable
that changes when dependencies are added or removed, which will
eventually allow running kati less often.
Bug: 309006256
Test: No change to out/Android-aosp_cf_x86_64_phone.ninja
Change-Id: Idfeb6fd10d77497ca274f8e74fe8e994ce1cafe6
Needed by some in order to build 16K compatible code
on projects shared with multiple Android branches.
Bug: 299403996
Test: build
Change-Id: I6224803d5ca014f98faf8b0a20f1d4fd3c2bcbe2
This no-op refactoring facilitates some upcoming functional changes for
"bp2build allowlist v2". The work requires that the bp2build conversion
mutator be changed from a TopDown mutator to a BottomUp mutator.
Refactoring all bp2build-related methods so that they use Bp2buildMutatorContext
makes it easier to make this functional change without touching tens of
files and multiple projects.
Bug: 285631638
Test: m bp2build
Change-Id: I3d1ef3064146e959c6f0dc315350fc9764bf2bd2
Set Bazel_module.Label for modules that are migrated and
Bazel_module.Bp2build_available: false for types that are not converted.
Test: CI
Test: m json-module-graph and inspect
Change-Id: I47b82d5055cdfd5ba6b2878e88f39447f1a50223
The first line of each section will be
```
include $(CLEAR_VARS) # <module type>
...
```
Bug: 257037252
Test: treehugger
Change-Id: Iba586155b682fe4e1e5817d8397eda8f9d9c8789
This CL essentially un-reverts aosp/2119952, now that the issue
has been resolved.
Bug: 226199990
Test: m
Change-Id: I3b828eb7f7cf54023c9e1d3229cf1ff7c85ab6dd
This reverts commit 2db49e3269.
Reason for revert: Break aosp build on git_tm-dev-plus-aosp and downstream branches
Change-Id: I0a86bf5e1e1f2ddf71308250f9110a9608ac2d8d
Bug: 246355583
This CL implements bp2build functionality for the cc outputs of
sysprop_library modules. cc_* modules depending on sysprop sources
will be handled in a later CL.
Bug: 244439349
Test: b build //system/libsysprop/srcs/...
Test: Inspect BUILD.bazel
Test: Unit tests
Change-Id: I6fa20661b984223347480c9afe0885b5db5a2807
This CL and its associated CLs point cc modules that rely on
sysprop_library modules to the auto-generated cc_library
module, and then remove the code in Soong which maps the
sysprop_library target to the generated target. This is being done
because Bazel will not be supporting the existing behavior in
Soong.
Bug: 226199990
Test: m
Change-Id: I117c5a4a9bf7c38e6fb7b92272a390df87507e30
This fixes a bug that apex_available and min_sdk_version properties of a
sysprop_library module are not forwarded to the generated cc or java
modules.
Bug: 181942475
Bug: 181940232
Test: m nothing
Change-Id: I03bcb5836f080aecd452021a3ffe003f36eb652e
Sysprop libraries use a global list to rewrite dependencies from
implementation libraries to public stub libraries when appropriate.
Remove the global list, and instead add a dependency from the
implementation to the public stub that forwards the JavaInfo.
Bug: 181367697
Test: sysprop_test.go
Change-Id: Ia7995feb3c079ca9bb6a403daaae3e3329fd7f6a
If sysprop library contains only internal properties, the API txt file
will be empty. This allows the API files to be missing in such cases to
turn off API-Review bit.
Bug: 177036449
Test: manual test
Change-Id: I8cb0b10e135cf211dae45ab14ccc9bc04e248634
Revert submission 1377717-metalics
Reason for revert: This has broken renderscript_mac target for aosp-master, see b/176909442
Reverted Changes:
I26ac54ca9:Define the standard license_kind rules.
I656486070:Export soong license data to make.
If9d661dfc:Export soong license data to make.
I97943de53:Add ability to declare licenses in soong.
Icaff40171:Rough-in license metadata support to make.
Ib8e538bd0:Add variables for notice deps, license kinds etc.
Change-Id: I51799c94a274eadab414abd80a07b5cda4584be9
Enable the RuleBuilder and RuleBuilderCommand methods to access
the BuilderContext by passing it to NewRuleBuilder instead of
RuleBuilder.Build.
Test: genrule_test.go
Test: rule_builder_test.go
Test: m checkbuild
Change-Id: I63e6597e19167393876dc2259d6f521363b7dabc
To make a module available to product variants, it must define
`product_available: true`. `vendor_available: true` will not create
product variants any more.
However, in this CL, we don't change the behavior of
`vendor_available` property. It still creates both variants. After we
update all Android.bp files that need to provide product variants
with `product_available: true`, we may upload the remaining patches.
Bug: 150902910
Test: lunch aosp_arm64-userdebug && m
Change-Id: I0fd5be7bbae2c45d5cab3c3c2ca49f53a9b6f975
Rather than the owner of sysprop, the install location is important when
choosing a stub for sysprop_library.
Bug: 171170584
Test: soong test
Change-Id: Iba934d14dd235bd85d0bd631ef6bad83c1b4f551
Enforce min_sdk_version for every payload dependency of updatable
APEX/APKs.
android.CheckMinSdkVersion() calls ApexModule.ShouldSupportSdkVersion
for every transitive dependency from APEX/APK modules to see if it
meets the min_sdk_version requirements.
The common implementation for apex/android_app is provided in
android/apex.go.
Bug: 145796956
Bug: 152655956
Bug: 153333044
Test: m nothing
Change-Id: I4a947dc94026df7cebd552b6e8ccdb4cc1f67170
Dependencies from property_contexts to sysprop_library now uses absolute
module path, and modules which are not exported to make are filtered
out.
Bug: 155148526
Test: add sysprop_library under any soong_namespace
Test: check build.ninja and see property_contexts inputs
Change-Id: Ib9456e8e5dfca74ce53da3cc947c8e6b1ed9a16b
min_sdk_version is the minimum version of the sdk that the compiled
artifacts will run against.
For example, when a module is used by two APEXes and their
min_sdk_versions are set to 29 and 30, then the module should support
both versions even if it is compiled against 30. Therefore,
min_sdk_version of the module needs to be set 29 in that case. In
general, this is set as the minimum value of min_sdk_vesions of APEXes.
For now, there's no build-time checks about this prop even if the prop
is set.
Bug: 145796956
Bug: 152655956
Bug: 153333044
Test: m nothing
Change-Id: I072ad8c317d2615e8b08e4e7ea2db8e7955b4b12
Added apex_available support to sysprop_library and copied it onto the
underlying cc_library.
Bug: 152762638
Test: m nothing
Change-Id: I8f4c539532b48f3a45c1fbf0f7287db11df69d2f
sysprop type checker compares a sysprop_library API file and
property_contexts files, and detects if there are any mismatches of
property types. For example, the following snippets are detected.
// foo.sysprop
prop {
prop_name: "ro.foo.bar"
type: Integer
...
}
// property_contexts
ro.foo.bar u:object_r:foo_prop:s0 exact string
"ro.foo.bar" is an Integer in .sysprop file, but it's a string in
property_contexts file.
Bug: 151879375
Test: sysprop_test
Test: run "m PlatformProperties" and see existing mismatches.
Change-Id: Iad86d0770011e13a6d8f3e9596e730200942e3fd
With Host_supported: true, C++ part of sysprop_library will create host
variant which can be used from host modules. As there are no native
system property support on host, libbase functions will be used instead.
Adding support on host will help reduce code complexity of other
host_supported modules.
Bug: 147708854
Test: m, sysprop_test, manually test host binary
Change-Id: I850d91fea298ef1a0c16c6a7a9ec1aca5cf37e69