Commit graph

105 commits

Author SHA1 Message Date
Kiyoung Kim
1db4a74a59 Remove VNDK information from Rust, etc, and sysprop tests
VNDK is deprecated in 24Q2, so soong should be tested with no device and
platform vndk versions. This change removes all VNDK related tests and
VNDK versions from soong-etc, soong-rust and soong-sysprop tests.

Bug: 330100430
Test: m nothing --no-skip-soong-tests passed
Change-Id: Ie34d23f0facab31078de54682f7cc78d37fcd4be
2024-04-01 15:53:58 +09:00
Andrew Walbran
acd75d2b50 Generate wrapper lib.rs with one module per sysprop file.
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
2024-03-18 19:02:04 +00:00
Andrew Walbran
d3f500da5b gen_parsers_and_formatters.rs is no longer generated.
Bug: 270547306
Test: m out/soong/.intermediates/system/libsysprop/srcs/platformproperties_rust_gen/gen/ApkVerityProperties/src/lib.rs
Change-Id: I9d8ead1a7c846d7bfcdafcd68f44763364dae368
2024-03-12 15:55:26 +00:00
Aleksei Vetrov
f4775ca238 Make syspropRustGenRule work with absolute paths
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
2024-03-11 14:02:08 +00:00
Andrew Walbran
a5deb7307d Revert^4 "Integrate Rust-specific System Properties into rules generation."
This reverts commit 2766baa922.

Reason for revert: Relanding after fix in I3b190ebc1a1096972d0a1273e490972e04684dd2

Change-Id: Ie34301c506d3469ec3306f433631b0842b66d032
2024-02-21 11:53:18 +00:00
Paul Duffin
a0f0bdbced Merge "Revert^3 "Integrate Rust-specific System Properties into rules generation."" into main 2024-02-15 12:45:47 +00:00
Paul Duffin
2766baa922 Revert^3 "Integrate Rust-specific System Properties into rules generation."
This reverts commit ac0c87311d.

Reason for revert: breaking the same bug, b/323833345 as before

Change-Id: I474c032148f22c4b98f7adf23be61807fa0500a0
2024-02-15 11:54:17 +00:00
Andrew Walbran
e38e2c0071 Merge "Revert^2 "Integrate Rust-specific System Properties into rules generation."" into main 2024-02-15 10:31:49 +00:00
Andrew Walbran
ac0c87311d Revert^2 "Integrate Rust-specific System Properties into rules generation."
This reverts commit be3ea4f149.

Reason for revert: Reland

Change-Id: Ic003c52a1477da9a6a70b82e4d4ae4a55edc584f
2024-02-14 10:25:55 +00:00
Rico Wind
444d6b68ae Merge "Revert "Integrate Rust-specific System Properties into rules generation."" into main 2024-02-05 14:41:56 +00:00
Rico Wind
be3ea4f149 Revert "Integrate Rust-specific System Properties into rules generation."
This reverts commit 65374edd0e.

Reason for revert: b/323833345

Change-Id: Ia722b68923617b4abfe3fd96b54b3fe108e9de74
2024-02-05 14:02:56 +00:00
Andrew Walbran
4b8e361b4c Merge "Integrate Rust-specific System Properties into rules generation." into main 2024-02-05 10:50:59 +00:00
LaMont Jones
b509938e4f Propagate AconfigFiles in ModuleBase.
Aconfig file dependencies are module-independent, and properly part of
ModuleBase.

Bug: b/308625757
Test: manual

Change-Id: I38c5907d1671cc69bb198345201316ae781fdc9f
2024-01-24 23:45:12 +00:00
Jiyong Park
7416d67f28 Revert "Revert "Limit System SDK to 34 for Java modules in the v..."
Revert submission 2897568-revert-2894701-limit_systemsdk-WNEMOTGMRS

Reason for revert: Forward fix was merged

Reverted changes: /q/submissionid:2897568-revert-2894701-limit_systemsdk-WNEMOTGMRS

Change-Id: Id857406513fbf33a20e5d3836742ebd8a0105516
2024-01-04 23:20:42 +00:00
Sebastian Pickl
1f1662217a Revert "Limit System SDK to 34 for Java modules in the vendor pa..."
Revert submission 2894701-limit_systemsdk

Reason for revert: might be breaking builds at 318695834

Bug: 318695834

Reverted changes: /q/submissionid:2894701-limit_systemsdk

Change-Id: I71a87d0a026a444ea9d26f889b3421162e13fea9
2024-01-04 19:28:16 +00:00
Jiyong Park
ec47e99b4d Limit System SDK to 34 for Java modules in the vendor partition
This change disallows Java modules in the vendor partition to use System
SDK that is newer than API level 34; 34 is the latest allowed.

Background 1: with Trunk Stable, the system/vendor interface is released
at Q2 whereas the system/app interface is released at Q3. In other
words, at Q2, the APIs which will be added to the system SDK at Q3 are
not available. Since the system/vendor interface (which is fronzen at
Q2) is what the modules in the vendor partition will be building
against, they can't and shouldn't use those new APIs that will be added
in the future (Q3). Using those APIs is risky because there's a chance
that those APIs get removed or changed between Q2 and Q3. For example,
2024 Q2 is technically still Android U, not Android V.

Background 2: The use of Java APIs in the vendor partition had many
issues. Most significantly, those "vendor" Java apps are categorized as
part of the system partition because all Java app processes require
access to platform internal libraries that are prohibited to vendor
processes. Furthermore, since the Project Treble, the vendor partition
was re-purposed to a partition to host SoC-dependent bits - usually
HALs. Implementing HALs in Java has never been officially supported and
has had many loop holes.

We'd like to use both background 1 and 2 as a chance to disallow any
Java code in the vendor partition. However, since there are already some
Java modules in the partition, we can't suddenly ban it. The deprecation
will be made gradually, and this CL is the start.

Note that sdk_version: "current" or "system_current" is automatically
overridden into 34 or system_34. This is to prevent sudden breakage of
vendor modules that have been targetting the latest (i.e. current) API
level. They will however fail if they use APIs newer than API level 34.

Bug: 314011075
Test: m blueprint_tests
Change-Id: I59f5ac15ce9ac2ff7cc89e9c110169359077c37c
2024-01-04 13:29:04 +09:00
Colin Cross
402130276c Convert SetProvider to generic providers API
Convert all of the callers of SetProvider to use the type-safe
android.SetProvider API.

Bug: 316410648
Test: builds
Change-Id: If58f4b5355264ddab2045bc3591a4eac19cd58fc
2023-12-14 16:12:20 -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
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
Colin Cross
a16bd6b714 Don't write license data to Android-${TARGET_PRODUCT}.mk
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
2023-11-21 15:27:44 -08:00
Steven Moreland
c43a4acc8b sysprop_library: cflags + ldflags
Needed by some in order to build 16K compatible code
on projects shared with multiple Android branches.

Bug: 299403996
Test: build
Change-Id: I6224803d5ca014f98faf8b0a20f1d4fd3c2bcbe2
2023-10-24 21:51:05 +00:00
Trevor Radcliffe
e3e930d260 Merge "Implement bp2build for Sysprop Java" into main 2023-10-05 15:59:53 +00:00
Trevor Radcliffe
9b81d79ef6 Implement bp2build for Sysprop Java
Bug: 297356813
Test: bp2build and inspect BUILD files
Test: Conversion Unit Tests
Change-Id: Ib70400eb91bca946df1d99d953d7a0e7e63fb7cf
2023-09-29 15:42:00 +00:00
Justin Yun
af1fde43f9 Generate product variants by default
PRODUCT_PRODUCT_VNDK_VERSION is set to 'current' by default. Now, we
can generate product variants without checking the
PRODUCT_PRODUCT_VNDK_VERSION build variable. Remove reading the
PRODUCT_PRODUCT_VNDK_VERSION variable from soong and generate product
variants by default.

Bug: 302255959
Test: m
Change-Id: I9a9b2076f4367c5ce9a393bbb206f8dee3884bd8
2023-09-27 16:36:40 +09:00
Chris Parsons
637458d326 Have ConvertWBp2build use Bp2buildMutatorContext
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
2023-09-20 14:49:35 +00:00
Dzmitry Shmatkou
65374edd0e Integrate Rust-specific System Properties into rules generation.
Bug: 270547306

Test: Build rust-specific System Properties rules to check the
generated code.

Change-Id: I3d102f96f3b676cde576d270c5090c1707ec1dd7
2023-09-11 21:16:53 +00:00
Liz Kammer
12dc96ebe1 Set Bazel_module for (un)converted sysprop libs
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
2023-08-14 11:03:07 -04:00
Sasha Smundak
5c4729df93 Show module type in a module section of the Android-TARGET.mk
The first line of each section will be
```
include $(CLEAR_VARS)  # <module type>
...
```

Bug: 257037252
Test: treehugger
Change-Id: Iba586155b682fe4e1e5817d8397eda8f9d9c8789
2022-12-01 21:12:11 -08:00
Trevor Radcliffe
cee4e056aa Enable bp2build for cc modules relying on sysprop
Bug: 244439349
Test: m bp2build
Test: Inspect BUILD.bazel files
Test: Unit tests
Change-Id: I85bfb9fa69cb3f96b15bdbeb797dba86b3349804
2022-09-19 23:38:33 +00:00
Trevor Radcliffe
d82e8f6858 Delete SyspropMutator (again)
This CL essentially un-reverts aosp/2119952, now that the issue
has been resolved.

Bug: 226199990
Test: m
Change-Id: I3b828eb7f7cf54023c9e1d3229cf1ff7c85ab6dd
2022-09-15 17:41:58 +00:00
Silvia Vinyes
d4b8f7eb0b Merge "Revert "Delete SyspropMutator"" 2022-09-14 14:00:10 +00:00
Chung-Kai (Michael) Mei
6a777b856f Revert "Delete SyspropMutator"
This reverts commit 2db49e3269.

Reason for revert: Break aosp build on git_tm-dev-plus-aosp and downstream branches

Change-Id: I0a86bf5e1e1f2ddf71308250f9110a9608ac2d8d
Bug: 246355583
2022-09-14 13:16:50 +00:00
Trevor Radcliffe
4c56946644 Merge "Delete SyspropMutator" 2022-09-12 18:59:24 +00:00
Trevor Radcliffe
ad3d123fb6 cc bp2build for sysprop_library modules
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
2022-09-02 18:27:39 +00:00
Trevor Radcliffe
2db49e3269 Delete SyspropMutator
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
2022-08-15 20:10:58 +00:00
Colin Cross
abc0dab477 Move proguard test files to java package
The proguard test files are duplicated in apex and sysprop and will
be needed by app tests, move them to the java package.

Test: run all soong tests
Change-Id: Ie13817dcda8d98801d16a97ffceef1100c7d5380
2022-04-11 11:44:32 -07:00
Inseob Kim
9da1f81382 Add ramdisk_available to sysprop_library
Bug: 187196593
Test: build
Change-Id: Ib8d92904a9004ccbc18634a97f9d75c2093ac2ae
2021-06-18 05:26:33 +00:00
Colin Cross
203b421043 Remove obsolete llndk_library
Remove llndk_library in favor of cc_library with llndk.symbol_file.

Bug: 170784825
Test: m checkbuild
Test: TestLlndkLibrary
Change-Id: I43580976589a7a2a176d7442be53fa043c0c8324
2021-04-26 18:41:00 -07:00
Jiyong Park
f58c46e36f Don't use incorrect version names like VER or BOARD even in tests
All version names will go through ApiLevelFromUser which triggers an
error when the name is not a valid one.

Bug: 175678607
Test: m
Change-Id: Id33bf64085603914d45ad7942cb8908a4734493f
2021-04-05 09:32:06 +09:00
Jiyong Park
f1691d2a2c Move java.sdkSpec to the android package
... in preparation for making the handling of sdk versions consistent
across java and cc modules.

Bug: 175678607
Test: m
Change-Id: I598f0454bce9b7320621022115412fbe97403945
2021-04-03 08:25:12 +09:00
Paul Duffin
89648f98fa Remove usages of FixtureFactory from misc packages
These packages have already been migrated to use per test build
directory so have no need for a FixtureFactory.

Bug: 183235980
Test: m nothing
Change-Id: I667d1d992caaf0f615de91f89efdae11c44986c2
2021-03-22 18:31:53 +00:00
Paul Duffin
9cbbbb8137 Convert sysprop package to fixtures
Bug: 182885307
Test: m nothing
Change-Id: I2e69e7b5eb3bad579df39c9dd49f2d670881a265
2021-03-18 00:21:41 +00:00
Paul Duffin
6e3ce72b3c Add preparers for sysprop
Bug: 181070625
Test: m nothing
Change-Id: I3c9c36e7270b68ff7d354acb239b47441335a931
2021-03-18 00:21:38 +00:00
Jiyong Park
5e914b286f sysprop_library correctly supports apex_available and min_sdk_version
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
2021-03-08 10:11:00 +09:00
Colin Cross
75ce9eccf3 Remove global state from sysprop libraries
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
2021-02-26 16:28:12 -08:00
Bob Badour
02040de891 Add LOCAL_LICENSE_KINDS to build/soong
Added SPDX-license-identifier-Apache-2.0 to:
  Android.bp
  android/Android.bp
  android/soongconfig/Android.bp
  androidmk/Android.bp
  apex/Android.bp
  bazel/Android.bp
  bp2build/Android.bp
  bpf/Android.bp
  bpfix/Android.bp
  cc/Android.bp
  cc/config/Android.bp
  cc/libbuildversion/Android.bp
  cc/libbuildversion/tests/Android.bp
  cc/ndk_api_coverage_parser/Android.bp
  cc/ndkstubgen/Android.bp
  cc/symbolfile/Android.bp
  cmd/dep_fixer/Android.bp
  cmd/diff_target_files/Android.bp
  cmd/extract_apks/Android.bp
  cmd/extract_jar_packages/Android.bp
  cmd/extract_linker/Android.bp
  cmd/fileslist/Android.bp
  cmd/host_bionic_inject/Android.bp
  cmd/javac_wrapper/Android.bp
  cmd/merge_zips/Android.bp
  cmd/multiproduct_kati/Android.bp
  cmd/path_interposer/Android.bp
  cmd/pom2bp/Android.bp
  cmd/pom2mk/Android.bp
  cmd/sbox/Android.bp
  cmd/soong_build/Android.bp
  cmd/soong_env/Android.bp
  cmd/soong_ui/Android.bp
  cmd/zip2zip/Android.bp
  cmd/zipsync/Android.bp
  cuj/Android.bp
  dexpreopt/Android.bp
  dexpreopt/dexpreopt_gen/Android.bp
  env/Android.bp
  etc/Android.bp
  filesystem/Android.bp
  finder/Android.bp
  finder/cmd/Android.bp
  genrule/Android.bp
  jar/Android.bp
  java/Android.bp
  java/config/Android.bp
  kernel/Android.bp
  linkerconfig/Android.bp
  linkerconfig/proto/Android.bp
  makedeps/Android.bp
  partner/Android.bp
  phony/Android.bp
  python/Android.bp
  python/tests/Android.bp
  remoteexec/Android.bp
  rust/Android.bp
  rust/config/Android.bp
  scripts/Android.bp
  sdk/Android.bp
  sh/Android.bp
  shared/Android.bp
  symbol_inject/Android.bp
  symbol_inject/cmd/Android.bp
  sysprop/Android.bp
  tradefed/Android.bp
  ui/build/Android.bp
  ui/logger/Android.bp
  ui/metrics/Android.bp
  ui/metrics/proc/Android.bp
  ui/status/Android.bp
  ui/terminal/Android.bp
  ui/tracer/Android.bp
  xml/Android.bp
  zip/Android.bp
  zip/cmd/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to:
  finder/fs/Android.bp
  third_party/zip/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work

Change-Id: Ia47ca14f16b8c9f84f9d533a07e5b00e2c04e8d4
2021-02-06 04:23:21 +00:00
Paul Duffin
c059c8c9a0 Add java.RegisterRequiredBuildComponentsForTest function
Insulate tests that exercise code in the java package from having to
register the build components provided by the java package by providing
a single function that registers them all. This follows the pattern
currently used in the cc and rust packages.

This change is in preparation for switching the dex_bootjars singleton
from a singleton, which does not require a module definition in order
to be instantiated, to a singleton module which does. That will require
adding a module definition into java.GatherRequiredDepsForTest() and
this change ensures that the required components will have been
registered in every test.

Bug: 177892522
Test: m nothing
Change-Id: I6475db8240894947dd07c89a940a3e4f201aa598
2021-01-21 11:47:32 +00:00
Inseob Kim
c9770d6a9c Allow sysprop library API files to be missing
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
2021-01-15 18:10:05 +09:00
Bob Badour
b499922acc Revert^2 "Export soong license data to make."
61a55a0344

Change-Id: I5fb017c683df18bad42a8e27fb2d7c7c510514e5
2021-01-06 20:49:11 -08:00
Jerome Gaillard
61a55a0344 Revert "Export soong license data to make."
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
2021-01-06 19:00:05 +00:00