Commit graph

62839 commits

Author SHA1 Message Date
Treehugger Robot
60b3fed203 Merge "Remove unnecessary pass in validatePath." 2023-02-08 20:29:35 +00:00
Yi Kong
aa0833a8fb Merge "Migrate to the new clang lib dir" 2023-02-08 20:29:17 +00:00
Trevor Radcliffe
41d0539715 Merge "Add test for LTO edge case" 2023-02-08 20:18:15 +00:00
Treehugger Robot
aa97f1dc6b Merge "Don't ignore R8 warnings for optimized targets" 2023-02-08 20:15:37 +00:00
Sam Delmerico
e413f4046f Merge "mixed build targets need transitive tidy files" 2023-02-08 20:11:30 +00:00
Usta (Tsering) Shrestha
3a49e9a068 Merge "reduce forest generation to be incremental" 2023-02-08 18:46:16 +00:00
Jiakai Zhang
db15f9bab7 Merge "Install system server jar profiles into the APEX." 2023-02-08 17:39:51 +00:00
Ivan Lozano
e37e1578c1 Merge "Copy Rust fuzzer dependencies to /data." 2023-02-08 13:46:17 +00:00
Jiakai Zhang
3317ce725d Install system server jar profiles into the APEX.
After this change, if profile-guided compilation is enabled for an APEX
system server jar, the profile will be installed next to the jar with
the ".prof" suffix, ("javalib/<name>.jar.prof"). This file will later be
used by odrefresh and dexpreopt from prebuilt APEX.

Bug: 241823638
Test: m nothing
Test: -
  1. Patch ag/20581649 PS2.
  2. banchan com.android.btservices x86_64 && m
  3. Check that "javalib/service-bluetooth.jar.prof" exists in the APEX.
Change-Id: Ibcfc6257dade92bd40a6d4b7368148717d0863b9
2023-02-08 19:25:37 +08:00
Yi Kong
bd1888156a Migrate to the new clang lib dir
Test: presubmit
Change-Id: I7ac7eb415a5f5c3d8b6d9298c1b4ccf2839aaea6
2023-02-08 19:54:05 +09:00
Marco Loaiza
2411ffded8 Merge "Revert "Remove apex.apex_name"" 2023-02-08 10:28:44 +00:00
Marco Loaiza
d1209a89c7 Revert "Remove apex.apex_name"
This reverts commit df26332d50.

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_tm-qpr-dev-plus-aosp&target=aosp_sunfish-userdebug&lkgb=9578804&lkbb=9579062&fkbb=9578931, bug b/268301897

Change-Id: I819a416286cda63a6fa8d3d6b4343c86638b4dc9
BUG: 268301897
2023-02-08 10:14:01 +00:00
Jooyung Han
3ec4e2494b Merge "Remove apex.apex_name" 2023-02-08 06:41:31 +00:00
Colin Cross
1fecba1f72 Merge "Pass -C panic=abort to rustc linux bionic compilations" 2023-02-08 05:13:18 +00:00
Treehugger Robot
ad39ba8598 Merge "A nit of code comment" 2023-02-08 03:53:30 +00:00
Jason Wu
6c49a97d85 Merge "Temporary fix to make soong_metrics files get uploaded" 2023-02-08 03:52:31 +00:00
Jason Wu
7796b11726 Temporary fix to make soong_metrics files get uploaded
Test: ```m nothing``` and verify the data in local builds table
Bug: 268228148

Change-Id: Idb4b5305f19cf4a69a60896555357623a1ce4532
2023-02-08 01:34:20 +00:00
Jooyung Han
df26332d50 Remove apex.apex_name
apex_name was used to install symbol files under /apex/<apex name>,
which caused duplicate rules when there's two apexes with the same
apex_name. (e.g. override_apex or multi-install apexes)

Since symbol files can be looked up via ELF Build-Id, we don't have to
install symbol files with the actual "apex name", but instead we can
install them with soong module name.

Bug: 267581665
Test: m (soong test)
Change-Id: I1cbe5c86d287f180c7deef93ba85ea5552680011
2023-02-08 09:24:06 +09:00
Jared Duke
5c2a1f3bda Don't ignore R8 warnings for optimized targets
Ideally we'd stop ignoring warnings entirely, but this helps de-risk
optimized targets that may be more sensitive to side effects from
suppressing such warnings.

Test: m
Bug: 215530220
Change-Id: Iccd124a347d55cd8f9474ebca7e41eca27882066
2023-02-07 15:37:53 -08:00
zijunzhao
13b00771b6 A nit of code comment
This is not the correct bug link. It should be removed when enabling
-Wxor-used-as-pow in external. See: aosp/2356123

Bug: None
Test: None
Change-Id: I6bc1d35e07ed11fc0c70a625b0035348a6428678
2023-02-07 23:36:11 +00:00
Treehugger Robot
de39330dd7 Merge "Create OWNERS file for compliance teams." 2023-02-07 22:27:16 +00:00
Jooyung Han
d7d179a0e8 Merge changes from topic "multi_install_skip_symbol_files"
* changes:
  Remove apex.multi_install_skip_symbol_files
  VNDK APEX doesn't use "apex_name" property
2023-02-07 22:12:44 +00:00
Treehugger Robot
667200e25b Merge "Call hook in java_sdk_library after droidstubs generation" 2023-02-07 21:59:20 +00:00
Sam Delmerico
4ed95e263f mixed build targets need transitive tidy files
Previously in mixed builds, only the tidy files for the boundary module
were built, whereas all of its transitive dependencies' tidy files were
not being built. Instead we should export the list of transitive tidy
files for a module so that we can run clang-tidy for the boundary module
as well as its dependencies.

Bug: 195029134
Test: WITH_TIDY=1 DISABLE_ARTIFACT_PATH_REQUIREMENTS=true mss tidy-packages-modules-NeuralNetworks --bazel-mode-dev
Change-Id: I463646d2ae1fc4aa075a54c264e1c34571c3fd5c
2023-02-07 16:50:30 -05:00
Trevor Radcliffe
07cf4ed90d Add test for LTO edge case
This test confirms the behavior when LTO is disabled generally but
then enabled for a specific target.

Bug: 261733821
Test: Unit test
Change-Id: I415cd0146f2b83d85654239550d129f87e9001bc
2023-02-07 19:46:51 +00:00
Sam Delmerico
db23e22835 Merge "export allowlist of environment variables to Bazel" 2023-02-07 19:25:39 +00:00
Jihoon Kang
d48abd566b Call hook in java_sdk_library after droidstubs generation
Currently, droidstubs module create java_api_contribution module, but
when a java_sdk_library module dynamically creates a droidstubs module,
java_api_contribution is not created as the hook inside droidstubs get
lost. Therefore, call hook inside sdk_library after creating the
droidstubs module.

Test: m
Change-Id: I68bf1d796f6f9a6f81011ae35e4991b6ed1421ea
2023-02-07 18:45:38 +00:00
Colin Cross
91c8f259eb Pass -C panic=abort to rustc linux bionic compilations
Pass -C panic=abort to rustc when targeting linux bionic to match
device bionic builds.  Fixes building on master-art-host when a
rust dependency is added to the linux bionic target.

Bug: 268035710
Test: master-art-host linux bionic build
Change-Id: I411a8622002709030dfd207b9decb8846a1ccef3
2023-02-07 09:55:25 -08:00
Pedro Loureiro
87c88176fe Improve documentation around go/allowed-deps-error
Bug: 264349293
Change-Id: I64e95938e53fb26c104e0daece4939f97744a344
2023-02-07 17:08:38 +00:00
Jingwen Chen
24d0c56350 Remove unnecessary pass in validatePath.
Perform a single pass over pathComponents in both validatePath and
validateSafePath instead.

Test: presubmits
Change-Id: I1499183e345ca180900c54a18f9dc8bd534f2588
2023-02-07 09:29:36 +00:00
Zijun Zhao
1b1febdf1c Merge "Disable -Wformat-insufficient-args for external code." 2023-02-07 06:59:45 +00:00
Usta (Tsering) Shrestha
c4c07b12b6 reduce forest generation to be incremental
Previously, symlink forest generation involved removing the entire
symlink forest and recreating it from scratch. With this change,
a) symlinks which need not change are untouched,
b) symlinks pointing to the wrong location are fixed, and
c) symlinks which should no longer exist are removed.

On AOSP on my local machine, this reduces the symlink forest generation
step from 2.5s to 1.1s clean, and 0.6s when a single file is added to
a source directory.

Bug: 257528847
Test: m bp2build, touch `fakefile` under the forest, remove a file
from the source tree, rerun m bp2build. Manually verify the new forest
does not retain the link to the deleted source file, and that fakefile
no longer exists in the forest.

Change-Id: I481371ae487e9419af6a3a4370c552578b07d650
2023-02-07 06:23:43 +00:00
Jooyung Han
88b057efaa Remove apex.multi_install_skip_symbol_files
This has been a workaround to avoid duplicate build rules for
multi-install apexes. The reason for duplicate errors was that apex_name
was used to install symbol files.

We don't need to rely on apex_name for symbol files, hence no need for
the workaround.

Note that symbol files for apexes are still available via the paths
based on "soong module name".

Bug: 267581665
Test: cuttlefish (which uses multi-apex) build & run
Change-Id: Icaca667e139ef2aca32339a75b54b12a00449c2d
2023-02-07 14:13:24 +09:00
Jooyung Han
2cd2f9ad89 VNDK APEX doesn't use "apex_name" property
VNDK APEX has been using "apex_name" property to set "name" field in
apex_manifest. But setting apex_name had a side-effect of emitting
duplicate rules for symbol files for VNDK APEX and its override_apex.
(Please see the removed comments for more details about error)

Not using "apex_name" fixes the duplicate errors.

There're a few more vendor apexes with the same issue, which I will
handle in follow-ups.

Bug: 267581665
Test: m (soong test) && boot
Change-Id: I00f617cef8af4d21880d4e8b9c0b9ab9322ba15c
2023-02-07 13:58:19 +09:00
Kevin Dagostino
2c3be41226 Removing libutils_test which depends on libunwindstack.
Test: b test //system/...
Change-Id: Iceeaa5302931bb45aae4077677ceeee2f86d27a0
2023-02-07 04:11:29 +00:00
Jiyong Park
1bb18bb2ac Merge "Symbol files for Rust binaries in APEXes are exported" 2023-02-07 02:55:02 +00:00
Jooyung Han
e732271cc5 Merge "apexer: remove --do_not_check_keyname" 2023-02-07 01:15:54 +00:00
zijunzhao
aeb73f8e57 Disable -Wformat-insufficient-args for external code.
Bug: 191699019
Test: presubmit
Change-Id: I8af5ccdca4078468d6de2f6212045875d7c6541b
2023-02-06 23:34:18 +00:00
Christopher Parsons
a9242e32d5 Merge "Only write soong_injection files if changed" 2023-02-06 22:23:54 +00:00
Chris Wailes
bae5f4c472 Merge "Revert "rustc-1.66.1 Build 9561314"" 2023-02-06 21:09:55 +00:00
Colin Cross
676e15a452 Merge "Use platform libc++ for riscv64 sdk variants" 2023-02-06 20:56:17 +00:00
Chris Wailes
83ed187b2a Revert "rustc-1.66.1 Build 9561314"
Revert submission 2421642-rust-update-prebuilts-1.66.1

Reason for revert: Missing riscv support and out of date base64 crate causing brekages

Reverted changes: /q/submissionid:2421642-rust-update-prebuilts-1.66.1

Change-Id: I6c0d6c3539e766012570e4542f529706fe49928c
2023-02-06 20:36:37 +00:00
Sam Delmerico
cb3c52c766 export allowlist of environment variables to Bazel
Previously, Bazel was invoked during mixed builds with a stripped down
environment. This CL adds an allowlist of environment variables that are
passed to Bazel.

Test: WITH_TIDY=1 DISABLE_ARTIFACT_PATH_REQUIREMENTS=true mss tidy-packages-modules-NeuralNetworks --bazel-mode-dev
Change-Id: I23147bec59f6522953cf623e7bcaa0f1f99a75a3
2023-02-06 14:34:43 -05:00
Alix Espino
ade518ad6e Merge "refactor android_app bp2build" 2023-02-06 19:13:02 +00:00
Ivan Lozano
0f9963e9e4 Copy Rust fuzzer dependencies to /data.
Fix an issue where rust_fuzz modules were
not correctly packaging and copying their
dependencies.

This is done by extending the CC fuzz packager
to simply handle both Rust and CC modules,
ensuring this doesn't get out of sync again.
Fuzzer related functions are added to the
Linkable interface to facilitate this.

There was a bug where the Make definitions for
Rust fuzzers were not being created as well,
and that is addressed here.

Bug: 249551848
Test: m android_log_fuzzer #check $OUT/data/fuzz/arm64/libs
Change-Id: I9b41153e0cf08ab510476b75003c3a3baccc3858
2023-02-06 13:48:23 -05:00
Chris Wailes
ee46ca29c4 Merge "rustc-1.66.1 Build 9561314" 2023-02-06 18:16:21 +00:00
Jihoon Kang
800f64078c Merge "Prevent dynamically created java_api_contribution from inheriting parent modules' visibility" 2023-02-06 17:31:10 +00:00
Almaz Mingaleev
e0cab5c47f Merge "Add jdk.internal.util.jar in the allowed package list." 2023-02-06 16:52:43 +00:00
Alix
733110e745 refactor android_app bp2build
Test: bp2build tests and locally built MusicKotlin
Change-Id: Ia5a58b26717a0252e3ae87ea68182e6f2b5c60cf
2023-02-06 15:39:16 +00:00
Jooyung Han
dc6f9c74c6 apexer: remove --do_not_check_keyname
Since fe4ff29b4d47fa8ae242fb7e084215d3afada4b5 (in system/apex), apexer
doesn't check keyname (--key vs --manifest.name). So, passing
--do_not_check_keyname doesn't make any sense.

This is a preparation to remove (or deprecate) "apex_name" property from
"apex" module.

Bug: 267581665
Test: m
Change-Id: I3737d1e36d305375a523a23a6bbeb2d23586e578
2023-02-06 17:33:25 +09:00