Commit graph

96545 commits

Author SHA1 Message Date
Dennis Shen
bb13bbb086 aconfig: update aconfig_storage_read_api
Previously we are ensuring that the public rust api to get mapped file
is safe as we are ensuring that the file being mapped has a permission
of 444. However, a file permission of 444 is not possible due to build
system needs to make file 644 while creating img files. Thus need to make the rust api to get mapped file unsafe.

In reality, this should have no impact. Because, even though the storage
files have a file permission of 644, they are on a RO partition like
system. So the files are not writable anyway. This is true for all the
containers (platform partitions and mainline modules) we know so far.

Bug: b/321077378
Test: atest aconfig_storage_read_api.test; atest
aconfig_storage_read_api.test.rust; atest
aconfig_storage_read_api.test.cpp

Change-Id: I643fe191e697a524e2303a32750f04c268f408fd
2024-03-21 01:44:02 +00:00
Cole Faust
d49454acab Remove BPTTOOL variable
This is unused since aosp/2654584

Test: Presubmits
Change-Id: Idf9b17d4d3b59f5a19ff544dd95d740892743303
2024-03-20 18:05:54 -07:00
Treehugger Robot
da552368e0 Merge "Add 'origin' parameter to flag declarations" into main 2024-03-21 00:50:36 +00:00
Elliott Hughes
7e7ff75042 Fix adb function.
It was broken by the last change (because unlike `which adb`, `command
adb` does not search $PATH if there's already an entry in the hash).
No-one's noticed in almost a year, but this has caused (rare) confusion
in the past.

Bug: http://b/24473359
Change-Id: I6bbb207992449132ba8563a8bcf298256c599c0d
2024-03-20 17:23:40 -07:00
LaMont Jones
9ee098e25b Add 'origin' parameter to flag declarations
This will reduce toil on separating the build flags.

Bug: 330386250
Bug: 328495189
Test: manual
Change-Id: I819184738bd3603534bb5e54c4b6a3ecd0a81a90
2024-03-20 16:22:53 -07:00
Treehugger Robot
d5d876a9a9 Merge "Fix typo" into main 2024-03-20 23:21:15 +00:00
LaMont Jones
96377be2a2 Merge "Defer "no such release config" error" into main 2024-03-20 23:08:27 +00:00
Kelvin Zhang
0669b8eac2 Fix typo
Test: th
Bug: 329678555
Change-Id: I952c19f93484dad9e273afe1cd45a043a36a34ee
2024-03-20 13:58:15 -07:00
LaMont Jones
76452d8b40 Defer "no such release config" error
This allows product-specific release config maps to declare release
configs.

Bug: 328495189
Test: manual
Change-Id: I862f167062ee647af00a4ec7d4af2966c6be44a8
2024-03-20 12:24:21 -07:00
Gurpreet Singh
497f02d8c0 Merge "Add respective modules to the list of individually toggleable modules." into main 2024-03-20 17:55:43 +00:00
Treehugger Robot
64134135c7 Merge "aconfig: update pb file location" into main 2024-03-20 17:46:35 +00:00
Jag
c6e96a6e96 Add respective modules to the list of individually toggleable modules.
This is safe since GTS tests already exist to check for mandatory modules, which these modulea are a part of.

Test: packages/modules/common/build/mainline_modules_sdks.sh
Bug: 238203992
Ignore-AOSP-First: changes in topics with internal-first/internal-only projects.
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:e14f4862bb439a73214bef4d909e9bdf35de8e40)
Merged-In: Ica19b306bdbd67a86d2cf73478d0f886f782118c
Change-Id: Ica19b306bdbd67a86d2cf73478d0f886f782118c
2024-03-20 17:12:28 +00:00
Luca Farsi
7ecb46b314 Merge "Remove extra test targets from inside build script" into main 2024-03-20 17:00:01 +00:00
Dennis Shen
5e909adbc8 aconfig: update pb file location
We have moved the storage records metadata pb file to the boot dir.

Bug: b/321077378
Test: atest aconfig_storage_read_api.test
Change-Id: Ic5bd89052e311ec5b1993ba1779d49be8451caa2
2024-03-20 16:38:09 +00:00
Michael Merg
fdaf4cf995 Merge "Write ide_qeury results to stdout" into main 2024-03-20 14:56:53 +00:00
Michael Merg
d8880abbdf Write ide_qeury results to stdout
All other output will be written to stderr.

Change-Id: Iefbd8292bb136e4723d5c168e4508ae183585c7c
2024-03-20 11:06:17 +00:00
Luca Farsi
2dc1701741 Remove extra test targets from inside build script
Due to branch constraints, remove the extra targets defined inside the
build script and revert to having them be passed in via command line.

Test: ./build/make/ci/build_test_suites_x86_64-trunk_staging --target_product aosp_x86_64 --target_release trunk_staging --with_dexpreopt_boot_img_and_system_server_only <extra_targets>
Bug: 314171817
Change-Id: I89a82e969d294104f587d778ad319a41905320f8
2024-03-19 17:24:40 -07:00
Daniel Zheng
6d5a509efa Merge "create_brick_ota: fix nonetype bug" into main 2024-03-19 19:29:49 +00:00
Daniel Zheng
0b7a685573 create_brick_ota: fix nonetype bug
If devkeys are present, we don't need to specify a serialno. In this
case we should conditionally add serial no to our metadata

Test: create_brick_ota
Change-Id: I9c93aa0f9ec5752693a9ddde5b76be4c12d6fc3b
2024-03-19 12:29:13 -07:00
Luca Farsi
b0dfb70381 Merge "Change the build test suites script to be noop" into main 2024-03-19 00:25:03 +00:00
Luca Farsi
11767d5dca Change the build test suites script to be noop
In preparation of switching over the git_main test suites target to
using this script change it to a no-op first to insure there's no
initial impact.

Test: ./build/make/ci/build_test_suites-trunk_staging --target_product aosp_x86_64 --target_release trunk_staging --with_dexpreopt_boot_img_and_system_server_only
Bug: 314171817
Change-Id: I7afab933143e4b617866b1975b1cbc71107f5b2f
2024-03-18 14:19:01 -07:00
Alexander Koskovich
d65b625cc5 Allow installing fake [odm|product|system_ext] packages
This is required to use the install_symlink module on these
partitions.

Test: Create install_symlink module on /system_ext
Change-Id: I78e93c5df12bae8fc23b378a30d43bf6c0b67d53
2024-03-18 15:38:18 -04:00
Treehugger Robot
afac5b33ac Merge "Allow duplicate release config maps and build flag declarations" into main 2024-03-18 15:30:29 +00:00
LaMont Jones
451abd6a06 Allow duplicate release config maps and build flag declarations
Only include a release_config_map.mk file the first time it appears in
the list.

If the flag declaration is identical to one already declared, do not
raise an error.

This eases the process of migrating where flags are declared.

Bug: b/328781415
Bug: b/328495189
Test: manual, TH
Change-Id: I18316e769438f62071723771762d6e89be98b813
Merged-In: I18316e769438f62071723771762d6e89be98b813
2024-03-18 07:43:04 -07:00
Kiyoung Kim
d826a2355d Merge "Remove reference to VNDK current APEX" into main 2024-03-18 11:40:52 +00:00
Kadir Çetinkaya
f6e76b6566 Merge "Make sure ninja keeps going after errors" into main 2024-03-18 07:36:16 +00:00
Kiyoung Kim
fec5986a8c Remove reference to VNDK current APEX
VNDK Current APEX is being removed because VNDK is deprecated with
202404 and VNDK current APEX is no more available. This change removes a
reference to the VNDK current APEX so it won't look for removed module.

Bug: 328994089
Test: AOSP CF build succeeded
Change-Id: Id3c65b1e9a403847f43d2fa344c832ae43c2051d
2024-03-18 15:36:10 +09:00
Treehugger Robot
9ba9e0a71e Merge "Move frameworks/base/Android.mk to build/core" into main 2024-03-18 03:21:47 +00:00
Jeongik Cha
784f2a899c Merge "Use soong modules for init.*.rc" into main 2024-03-18 01:25:16 +00:00
Treehugger Robot
7665dbccdb Merge "Disable WITHOUT_CHECK_API for SDK products" into main 2024-03-15 20:28:51 +00:00
Cole Faust
b5f63e65d7 Merge "Add staging dir stamp files for all partitions" into main 2024-03-15 17:34:26 +00:00
Treehugger Robot
6c63da3ce7 Merge "aconfig: c++ read api to return an android::base::Result and cargo fmt" into main 2024-03-15 14:16:27 +00:00
Kadir Çetinkaya
874e12be43 Make sure ninja keeps going after errors
Language services builds are usually executed in a non-building state of the codebase as the user is actively editing the code.

This change ensures we can build as many dependencies as possible for language services by ninja.

Note that this doesn't change the error-limit for soong itself, i.e. we can still fail-early if we encounter errors while generating ninja files.

Change-Id: I594e2ae4591d2e75db082486f28f705833ceb4a8
2024-03-15 07:27:30 +00:00
Treehugger Robot
605346e5c8 Merge "Remove SignApk output limitation of 2GiB" into main 2024-03-15 02:31:43 +00:00
Cole Faust
25a2aa8eea Add staging dir stamp files for all partitions
So they can be used from soong-built partitions.

Bug: 329146343
Test: Manually
Change-Id: I1d0d2f26ffeb60512368d02ce5c054f613f92230
2024-03-14 17:24:13 -07:00
Tomasz Wasilczyk
4045ae7871 Remove SignApk output limitation of 2GiB
Bug: 302112430
Test: build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_x86_64 TARGET_RELEASE=trunk_staging CLANG_COVERAGE=true NATIVE_COVERAGE_PATHS="art external/aac external/boringssl external/conscrypt external/cpu_features external/dlmalloc external/fdlibm external/libaom external/libavc external/libcxx external/libfuse external/libgav1 external/libgsm external/libhevc external/libmpeg2 external/libopus external/libtextclassifier external/libvpx external/libxaac external/oj-libjdwp external/sonivox external/speex external/tremolo external/vixl frameworks/av frameworks/base/media libcore libnativehelper packages/modules/Bluetooth packages/modules/Connectivity packages/modules/DnsResolver packages/modules/ExtServices packages/modules/NetworkStack packages/modules/NeuralNetworks packages/modules/SdkExtensions packages/modules/StatsD packages/providers/MediaProvider system/core/base system/core/libcutils system/core/libstats system/media/audio_utils system/netd/resolv" com.android.art.testing
      apksigner verify --in $OUT/../generic_x86_64/system/apex/com.android.art.testing.apex --print-certs -v --min-sdk-version 23
Change-Id: Id31eae0f221dd7ef333bd12aeef591463e1c931a
2024-03-14 14:57:04 -07:00
Jihoon Kang
c4dc1f69c5 Disable WITHOUT_CHECK_API for SDK products
SDK products, which are required to build the SDK, require checkapi
to run in order to generate the exportable artifacts, which are copied
to the dist directory. Thus, this change adds a conditional to emit an
error when WITHOUT_CHECK_API environment variable is set when the target
product is a SDK variant.

Test: lunch sdk-trunk_staging-eng && m WITHOUT_CHECK_API=true and observe the expected error being emitted
Bug: 329374072
Change-Id: I0dc628742c49845792b03f9af1ea60cd9eb4b8c3
2024-03-14 20:43:37 +00:00
Peiyong Lin
7bbfeb147e Merge "Clean up ANGLE on system build configuration." into main 2024-03-14 20:43:18 +00:00
Peiyong Lin
cc63340cd1 Clean up ANGLE on system build configuration.
Now that ANGLE on system is in fully released, clean up the build file
configuration and remove the flags.

Bug: b/293503000
Test: atest CtsAngleIntegrationHostTestCases
Change-Id: Ie8294b6494e2fad44ff102ecf0018916d61b082a
Merged-In: Ie8294b6494e2fad44ff102ecf0018916d61b082a
2024-03-14 19:26:24 +00:00
Dennis Shen
435fe14146 aconfig: c++ read api to return an android::base::Result and cargo fmt
Bug: b/312444587
Test: atest aconfig_storage_read_api.test.rust; atest
aconfig_storage_write_api.test.cpp

Change-Id: I6beb6e8d43b6f5418476101a929374e97832e27f
2024-03-14 19:25:07 +00:00
Dennis Shen
aa0287641e Merge "aconfig_storage: create aconfig storage c++ flag value write api" into main 2024-03-14 19:21:38 +00:00
Yu Liu
5e6cae4997 Merge "Validate aconfig libs are built with the correct modes." into main 2024-03-14 18:39:13 +00:00
Treehugger Robot
4e5aa5d0f5 Merge "Remove fs_get_stats." into main 2024-03-14 17:13:26 +00:00
Dennis Shen
1fdb6cc456 aconfig_storage: create aconfig storage c++ flag value write api
Bug: b/312444587
Test: atest aconfig_storage_write_api.test.cpp
Change-Id: Ib08575b7e6ca23141ebbf739bf604a66da472dc2
2024-03-14 16:06:03 +00:00
Elliott Hughes
b904c27e12 Remove fs_get_stats.
This was only used by the tarball-building support that was removed
in 2019.

Test: treehugger
Change-Id: I719364699d426d21010c3ab913d12f15128f2538
2024-03-14 15:32:24 +00:00
Dennis Shen
7c30411d3d Merge changes from topic "read_api" into main
* changes:
  aconfig: update aconfig_storage_read_api c++ lib
  aconfig: update aconfig_storage_read_api
2024-03-14 14:43:12 +00:00
Treehugger Robot
be19783c7a Merge "Replace some ByteBuffers with DataSource" into main 2024-03-13 23:57:51 +00:00
Tomasz Wasilczyk
4b114c29ec Replace some ByteBuffers with DataSource
This avoids ByteArray 2GiB limit in a few places, but requires more
changes to SignApk to fully support large archives.

Bug: 302112430
Test: build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_x86_64 TARGET_RELEASE=trunk_staging CLANG_COVERAGE=true NATIVE_COVERAGE_PATHS="art external/aac external/boringssl external/conscrypt external/cpu_features external/dlmalloc external/fdlibm external/libaom external/libavc external/libcxx external/libfuse external/libgav1 external/libgsm external/libhevc external/libmpeg2 external/libopus external/libtextclassifier external/libvpx external/libxaac external/oj-libjdwp external/sonivox external/speex external/tremolo external/vixl frameworks/av frameworks/base/media libcore libnativehelper packages/modules/Bluetooth packages/modules/Connectivity packages/modules/DnsResolver packages/modules/ExtServices packages/modules/NetworkStack packages/modules/NeuralNetworks packages/modules/SdkExtensions packages/modules/StatsD packages/providers/MediaProvider system/core/base system/core/libcutils system/core/libstats system/media/audio_utils system/netd/resolv" com.android.art.testing
Change-Id: Ie7fc0bbce9ef43b6331143703ac5568cf1b2186a
2024-03-13 21:43:13 +00:00
Dennis Shen
808bf915a8 aconfig: update aconfig_storage_read_api c++ lib
Now the read api lib no longer owns the memory mapped file. The rust lib
aconfig_storage_read_api api to get memory mapped file just returns an
Mmap rust struct. However cxx does not support Mmap data type, so we
cannot export the api to get memory mapped file from rust to c++. This
means we have to implement c++ apis to get memory mapped files.

This change is basically implementing c++ api to get memory mapped files,
mirroring the rust implementation. In addition, the integration test is
also updated to lock down the new c++ api implementation.

Bug: b/321077378
Test: atest aconfig_storage_read_api.test.cpp
Change-Id: I5e93a220cdd05cc0e5b0eb441284ac3e9dc34da7
2024-03-13 20:29:13 +00:00
Dennis Shen
71f9303dc0 aconfig: update aconfig_storage_read_api
Right now, aconfig_storage_read_api rust lib would own mapped files. So
individual flag lib does not need to. The original intent is that all
these flag lib can dynamically link against this lib. So say we have
different variants of flag lib for one flag package, there is just one
unique memory mapped file. In addition, the exposed rust apis hides the
memory mapped files. So when exporting these apis to c++/java, we don't
have to implement memory mapping in c++/java flag read api lib.

However, this design has its own downside. The biggest being that these
memory mapped files are stored in a mutable static hash map. For rust,
it must be protected by a mutex lock. The real effect on the lock is
mostly minimal as it immediately unlocks when the clone of memory
mapping is returned. But still we could get more performance out of it
in exchange of having more c++/java side implementation of mapping
files. (Note, apis that interpret mapped files are still exported by
Rust, so no c++/java implementation needed).

In this change, aconfig_storage_read_api give away its ownership of
memory mapped file in its api to get memory mapped file. The memory
mapped file is supposed to be owned by generated flag lib. By doing so,
no more mutex lock is needed. Also, since each flag lib has one flag
package, which maps to a single owning container. The flag lib can have
the memory mapped files as non mutable static variables. So no mutex
lock penalty on flag lib side.

Bug: b/321077378
Test: atest aconfig_storage_read_api.test; atest
aconfig_storage_read_api.test.rust

Change-Id: I29060bae90db6f7d296252ed73f7e312143f4b7e
2024-03-13 18:10:19 +00:00