Commit graph

93014 commits

Author SHA1 Message Date
Jiyong Park
885b004547 Revert^2 "Add BUILD_BROKEN_DONT_CHECK_SYSTEMSDK"
5ef2634d5a

Change-Id: I4430ac4b2411baf3f33695ba3b1520345d7f493d
2024-01-04 23:23:38 +00:00
Jiyong Park
7a66924a60 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: Ia103db05bfaebdfd301dbf84183a89d01f58eb67
2024-01-04 23:20:49 +00:00
Sebastian Pickl
04591b6315 Merge "Revert "Limit System SDK to 34 for Java modules in the vendor pa..."" into main 2024-01-04 19:30:31 +00:00
Sebastian Pickl
78c6e1368b 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: Idfaec65ddfbb0091672993d6c857a06e9cfdfb13
2024-01-04 19:28:02 +00:00
Sebastian Pickl
8d0d963070 Merge "Revert "Add BUILD_BROKEN_DONT_CHECK_SYSTEMSDK"" into main 2024-01-04 19:27:24 +00:00
Sebastian Pickl
5ef2634d5a Revert "Add BUILD_BROKEN_DONT_CHECK_SYSTEMSDK"
Revert submission 2897682-dont_limit_systemsdk

Reason for revert: blocking revert for 318695834

Bug:318695834

Reverted changes: /q/submissionid:2897682-dont_limit_systemsdk

Change-Id: Ic4a63fe81434ddb9cb57519bd11c1924224111c6
2024-01-04 19:01:29 +00:00
Joe Onorato
3309714a2a Merge "Add BUILD_BROKEN_DONT_CHECK_SYSTEMSDK" into main 2024-01-04 17:40:50 +00:00
Treehugger Robot
7968bc4f39 Merge "Set BOARD_SYSTEMSDK_VERSIONS even if PRODUCT_SHIPPING_API_LEVEL is unset" into main 2024-01-04 17:39:28 +00:00
Dennis Shen
e59313185f aconfig: create flag.map storage file
Add flag_table module for the creation of flag.map file. This is a hash
table in file similar to package.map hash table in file. This is created
per each container. It stores a mapping from a composite key (package id
and flag name) to its flag id (within package index of a flag).

This hash table allows us to look up the within package offset for a
specific flag. Along with the package offset obtained from package.map,
we will be able to find the global offset of a flag in the flag value
file.

Added unit tests to lock down the table creation and serialization.

Bug: b/312243587
Test: atest aconfig.test
Change-Id: I6e9d07bef05131cb06cfb4aa2ef29985578a6949
2024-01-04 16:17:34 +00:00
Dennis Shen
b65b350fc1 aconfig: update storage unit test case
merge storage_test_1_part_1.aconfig and storage_test_1_part_2.aconfig
into one aconfig file: storage_test_1.aconfig

remove two flags from test_1 package so the total number of flags across
three aconfig package is now 8, which is easier to test in unit test.

Bug: b/312243587
Test: atest aconfig.test
Change-Id: Idd249a8dcddfbae09b211e6310d74697763618f4
2024-01-04 16:08:17 +00:00
Jiyong Park
7a0e042276 Add BUILD_BROKEN_DONT_CHECK_SYSTEMSDK
https://android-review.git.corp.google.com/q/topic:limit_systemsdk
introduced a new check for preventing the use of system SDKs above 34
from Java modules in the vendor partition.

As this may break some unprepared targets, introduce
BUILD_BROKEN_DONT_CHECK_SYSTEMSDK as a temporary escape hatch.

This flag will be deleted eventually.

Bug: 314011075
Test: Add BUILD_BROKEN_DONT_CHECK_SYSTEMSDK := true to BoardConfig.mk
Change-Id: Ie70ce428ec3df8580099efd99e5c7c9c4f9daecb
2024-01-04 23:48:27 +09:00
Jiyong Park
0284ba297c Set BOARD_SYSTEMSDK_VERSIONS even if PRODUCT_SHIPPING_API_LEVEL is unset
Previously, we checked if PRODUCT_SHIPPING_API_LEVEL >= 28, but that no
longer is needed because upgrading from 29 to 35 is not expected. All
devices running Android V are expected to be shipped after 28.

Furthermore, this fixes non-device targets (like sdk) where
PRODUCT_SHIPPING_API_LEVEL is unset.

Bug: 318634417
Test: build with sdk target
Change-Id: I8f8337fb76312334777e621ae5870d953167ad49
2024-01-04 21:14:58 +09:00
Justin Yun
95d89d961d New LLNDK libvendorsupport.so for vendor api level
To handle the vendor API level, provide a new LLNDK library.

Bug: 315056516
Test: atest libvendorsupport-tests
Change-Id: Ide8a88aa22e7722b82faf3a71b62c3cf90fe05bd
2024-01-04 18:39:49 +09:00
Jiyong Park
e67e0dda48 Merge "Limit System SDK to 34 for Java modules in the vendor partition" into main 2024-01-04 09:37:36 +00:00
Jooyung Han
aaab9b5026 Merge "Pass LOCAL_MIN_SDK_VERSION to clang triple" into main 2024-01-04 06:43:11 +00:00
Jooyung Han
358875fbe6 Pass LOCAL_MIN_SDK_VERSION to clang triple
Like soong modules, pass LOCAL_MIN_SDK_VERSION to clang when it's set.

Bug: 317676192
Test: manual check (set LOCAL_MIN_SDK_VERSION as 34 for wpa_supplicant
  and see if generated build commands has android34)
Change-Id: I48928e54417f47f2e0c2417f04e5893764c3edb9
2024-01-04 10:48:51 +09:00
Treehugger Robot
3f5f02b287 Merge changes I7953020c,I960cfdb8 into main
* changes:
  Skip metrics upload when doing benchmarks.
  Fix formatting string in benchmark pretty printer
2024-01-04 00:28:49 +00:00
Zhi Dou
f7c585604a Merge "aconfig: add ForceReadOnly mode to aconfig c/c++ codegen" into main 2024-01-03 23:00:57 +00:00
Zhi Dou
758cb81194 Merge "aconfig: add ForceReadOnly mode to aconfig rust codegen" into main 2024-01-03 23:00:44 +00:00
Zhi Dou
f659f75231 Merge changes from topic "fro" into main
* changes:
  aconfig: add ForceReadOnly mode to aconfig java codegen
  aconfig: add new codegen mode force_read_only
2024-01-03 23:00:34 +00:00
Joe Onorato
7eba158c59 Skip metrics upload when doing benchmarks.
metrics-uploader runs asynchronously, and causes a race condition where
the out dir can't be deleted because metrics uploader is busy in it.

Has the side effect of not polluting the local developer metrics with
benchmark runs too.

Test: treehugger
Change-Id: I7953020cd9c69fb10745facd22648f931fc94477
2024-01-03 12:38:55 -08:00
Joe Onorato
519c9dab25 Fix formatting string in benchmark pretty printer
Test: th
Change-Id: I960cfdb897ed140b90caa765b1be6892d2ed208e
2024-01-03 12:37:25 -08:00
Colin Cross
7f91599457 Merge "Support Soong-generated module-info.json entries" into main 2024-01-03 17:55:47 +00:00
Roland Levillain
c9104b3392 Merge "Update OWNERS files under build/make." into main 2024-01-03 16:56:32 +00:00
Colin Cross
01ede583ea Merge "Don't install vintf and init.rc from Soong" into main 2024-01-03 16:53:45 +00:00
Zhi Dou
5e64029bcd aconfig: add ForceReadOnly mode to aconfig rust codegen
This commit adds ForceReadOnly mode to rust codegen.

Bug: 316357759
Test: atest aconfig.test aconfig.prod_mode.test.rust
aconfig.test_mode.test.rust aconfig.exported_mode.test.rust
aconfig.force_read_only_mode.test.rust

Change-Id: I4cf98a6e9fc908fc372d4e68098a516808718c57
2024-01-03 15:56:24 +00:00
Zhi Dou
e567abdf3e aconfig: add ForceReadOnly mode to aconfig java codegen
This commit adds ForceReadOnly mode to java codegen.

Bug: 316357759
Test: atest aconfig.test aconfig.test.java

Change-Id: I10cd60def9ea20f7d56d87d18f680afeac61dc9d
2024-01-03 15:56:18 +00:00
Zhi Dou
8410cf4476 aconfig: add ForceReadOnly mode to aconfig c/c++ codegen
This commit adds ForceReadOnly mode to c/c++ codegen.

Bug: 316357759
Test: atest aconfig.test aconfig.test.cpp aconfig.test.cpp.test_mode
aconfig.test.cpp.exported_mode aconfig.test.cpp.force_read_only_mode

Change-Id: I4842dd69993fe4fc1f504358f59513cf064919d9
2024-01-03 15:56:10 +00:00
Zhi Dou
1a8281ccc2 aconfig: add new codegen mode force_read_only
The "force_read_only" mode is designed for libraries shared among
multiple containers for the following two scenarios where:
1. The library must be built with read_only flags or
2. Different containers requires different values for the same flags.

In this mode, the library includes only non-exported flags, adhering to
the concept that exported flags should maintain consistent values across
containers. Additionally, regardless of their original permissions, all
flags within this mode will be set to read_only.

Bug: 316357759
Test: atest aconfig.test
Change-Id: I65df39416c96404d84044a46bbcfe1bc8ce9ba8f
2024-01-03 15:53:01 +00:00
Jiyong Park
e3c278844d 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.

This CL implements the "Make" part of the restriction. The "Soong" part
will follow.

Note that LOCAL_SDK_VERSION := current or LOCAL_SDK_VERSION :=
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: The following Android.mk module fails as expected.
some/Android.mk:

include $(CLEAR_VARS)
LOCAL_MODULE := example_module
LOCAL_VENDOR_MODULE := true
LOCAL_SDK_VERSION := system_35
LOCAL_SRC_FILES := Foo.java
include $(BUILD_JAVA_LIBRARY)

FAILED:
some/Android.mk: error: example_module: Incompatible
LOCAL_SDK_VERSION 'system_35'. System SDK version '35' is not supported.
Supported versions are: 28 29 30 31 32 33 34

Change-Id: I44c29c6dc45b91a9a30b8a21cd2baae685fa27fb
2024-01-03 16:35:08 +09:00
Treehugger Robot
2e137a9963 Merge "dist-one flag should be a boolean, not a string" into main 2024-01-03 01:31:49 +00:00
Colin Cross
3b89c6532a Support Soong-generated module-info.json entries
Allow Soong modules to generate their own module-info.json entries
by merging Soong's module-info.json file into the one generated in
Make.

Skip collecting unnecessary ALL_MODULES.$(my_register_name).*
that are only used for module-info.json if the module was already
handled by Soong via the LOCAL_SOONG_MODULE_INFO_JSON property.

Bug: 309006256
Test: Compare module-info.json
Change-Id: I2c9db3c7c7bae7bd6cb889d7ebc2e383c278c82d
2024-01-02 17:21:22 -08:00
Joe Onorato
60c36ade0f dist-one flag should be a boolean, not a string
Test: th
Change-Id: I99a22011518b4a7a7f506b93d6a5ac9c7c4a2ef5
2024-01-02 16:36:31 -08:00
Colin Cross
b2063049f8 Don't install vintf and init.rc from Soong
Soong is now handling installing init.rc and vintf fragment files,
don't install them in Make for Soong modules.

Bug: 309006256
Test: Compare installed files
Change-Id: Ied43c207c6ae158d3f41d81c7fe16688331bf13c
2024-01-02 14:33:20 -08:00
Steven Moreland
ec74316f8f Merge "PRODUCT_FULL_TREBLE disabled warning" into main 2024-01-02 21:45:58 +00:00
Dennis Shen
68570f67c1 Merge "aconfig: add assign_flag_ids function" into main 2024-01-02 21:17:50 +00:00
Dennis Shen
ba72cc7ae1 aconfig: add assign_flag_ids function
Add a function to assign flag id for flags in a package. We first assert
that the flags should have been sorted by its name, then assign a u32 id
to each flag in order. Note this cl adds the function, it will be used
in later cls.

Bug: b/312243116
Test: atest aconfig.test
Change-Id: I843433305abecbe0cc78988fe23dcf35c6a03358
2024-01-02 19:00:44 +00:00
Roland Levillain
3a442cc088 Update OWNERS files under build/make.
Test: n/a
Change-Id: I91e6eb90c2709e64a27f069f522a11374b99c91e
2024-01-02 18:40:38 +00:00
Steven Moreland
fb1160d0b8 PRODUCT_FULL_TREBLE disabled warning
Treble is like so 2016, but it's 2023.

Bug: 307369186
Test: build
Change-Id: Icb24e218d0dbc5f76f0c83f809728d33dc67719e
2023-12-28 21:39:10 +00:00
Seungjae Yoo
a79329678d Merge "Append root digest information of microdroid vendor into vendor.img" into main 2023-12-28 01:17:36 +00:00
Steven Moreland
6b5b3b40bd Merge "Force PRODUCT_NOTICE_SPLIT." into main 2023-12-27 18:40:17 +00:00
Steven Moreland
5c11308f60 Force PRODUCT_NOTICE_SPLIT.
Bug: 307369186
Test: N/A
Change-Id: I9d7810422cd8c34e84d755cfc14aded633a5baad
2023-12-27 01:09:36 +00:00
Seungjae Yoo
939d37b88c Append root digest information of microdroid vendor into vendor.img
Instead appending public key information into vendor partition,
append root digest of microdroid-vendor's hashtree descriptor. The root
digest would be extracted in build time with avbtool.

Bug: 285855436
Test: avbtool info_image --image $ANDROID_PRODUCT_OUT/vendor/etc/avf/microdroid/microdroid_vendor.img
Test: avbtool info_image --image $ANDROID_PRODUCT_OUT/vendor.img
Change-Id: I930b09774a1024a2e5d30f474f1589fc1b8aa25a
2023-12-26 17:21:41 +09:00
Treehugger Robot
c77d458a7e Merge "Quote the backslash in the hmm output." into main 2023-12-22 17:44:19 +00:00
Martin Stjernholm
a73fe8da4b Quote the backslash in the hmm output.
Otherwise it becomes a single line with an ugly long stretch of spaces
in the middle.

Test: hmm
Bug: 179779520
Change-Id: Ia095b75248952d9bee0d6417028d04460e74ad33
2023-12-22 13:32:42 +00:00
Treehugger Robot
d7298ff414 Merge "Change sepolicy version format for vFRC" into main 2023-12-22 02:25:15 +00:00
Treehugger Robot
38fcbf3c8e Merge "Allow filtering and sorting by tag in benchmark result formatting" into main 2023-12-21 22:26:54 +00:00
Joe Onorato
67c944b351 Allow filtering and sorting by tag in benchmark result formatting
Test: build/make/tools/perf/format_benchmarks --tags n2d-standard-128 n2-standard-80 n2d-standard-48
Change-Id: Ie4a4e36d4bc2aab50a017acbaf3ef0e23ddae958
2023-12-21 13:29:48 -08:00
Treehugger Robot
df7014c202 Merge "aconfig: adjust integration tests to correctly set flag values" into main 2023-12-21 18:56:15 +00:00
Treehugger Robot
eb1e02a098 Merge "aconfig: call Vec::retain instead of Vec::retain_mut" into main 2023-12-21 14:15:26 +00:00