Commit graph

62872 commits

Author SHA1 Message Date
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
Jihoon Kang
42b589cd61 Prevent dynamically created java_api_contribution from inheriting
parent modules' visibility

By default, dynamically created module inherits the parent module's
visibility. When the parent module's visibility is set to
"//visibility:private" or has any other specified visibility
restrictions in the module definition,  the created
java_api_contribution module is not visible to java_api_library.
Thus, override any inherited visibility properties and set the visiblity
of the created java_api_contribution module to public.

Test: m
Change-Id: I5db60a5a1800e2ae28c9650eeb9a2f1c3b4f8989
2023-02-04 00:29:33 +00:00
Chris Wailes
b85d7d459b rustc-1.66.1 Build 9561314
Bug: https://issuetracker.google.com/issues/263153841
Test: m rust
Change-Id: If7d96b940269d7be0bafc972ce78b4e14f8be09e
2023-02-03 15:52:51 -08:00
Chris Parsons
3a8d0fbede Only write soong_injection files if changed
This also fixes determinism of these files (by ensuring that bazel
requests and their configurations are sorted, as these are used in the
soong_injection file output)

Bug: 266983462
Test: Manually verified soong_injection files are the same among
multiple runs
Test: Unit test
Test: m nothing

Change-Id: I1568930549cff0bc5676825434cc448d16ebdd4e
2023-02-03 18:29:02 -05:00
Sorin Basca
1fbf7f21a4 Reland "Target Java 17"
This reverts commit 384250c7c4.

Reason for revert: Relanding the feature.

Bug: 233029164
Change-Id: Ib66deabbf6e9604798c70edaf581f46db848e6ca
2023-02-03 18:20:03 +00:00
Romain Jobredeaux
0bffcb8ad2 Allowlist MusicKotlin, jsr305. No manual BUILD for jsr305 and QuickSearchBox.
Allowlisting MusicKotlin gives us CI coverage on android apps with kotlin code.
jsr305's auto-generated BUILD file is working for us for now.
QuickSearchBox has been migrated to Kotlin and now has an unsupported dependency.

Change-Id: I9d9e6abf49875b0f5981fbcefdbd70a1bff62a83
2023-02-03 10:21:44 -05:00
Almaz Mingaleev
8b04d82ff1 Add jdk.internal.util.jar in the allowed package list.
This is part of OpenJDK17 update. sun.misc.JarIndex was moved to
jdk.internal.util.jar.

Bug: 260718199
Test: m
Change-Id: I7107f980d6afe500acff88164b1e6cb04cded896
2023-02-03 11:42:46 +00:00
Chris Wailes
28f4af7955 Merge "Turn stable-features error into a warning" 2023-02-03 09:36:02 +00:00
Chris Wailes
0152dd9d69 Turn stable-features error into a warning
This CL turns the stable-features lint into a warning.  This is
necessary to complete toolchain updates until we finish enforcing the
"no unstable features policy".

Test: ./test_compiler --prebuilt-path ../../dist/rust-1.66.1.tar.gz
Bug: 267698452
Bug: 263153841
Change-Id: Ib095dea045111ad3d89327a694aa5fa5b7f3128c
2023-02-02 22:05:19 -08:00
Treehugger Robot
69ef681c13 Merge "bp2build kt for android_binary" 2023-02-02 23:34:59 +00:00
Cole Faust
aa5b377ee9 Dynamically assemble the list of python launcher shared libs for precompiling
Still fall back to the hardcoded list for what to put in LOCAL_SHARED_LIBRARIES,
because I couldn't figure out a good way to get those modules at the moment.

Bug: 259718110
Test: Presubmits
Change-Id: Ia992ffea8819d8c67280b08bc45505f77af09de0
2023-02-02 13:47:56 -08:00
Alix
0856f9e227 bp2build kt for android_binary
Test: bp2build tests and locally built MusicKotlin
   (cannot allowlist yet due to soong/bazel custom_package differences)
Change-Id: I1cbd0fe2af0e6eeed65cf8d57dc85c1f54646c50
2023-02-02 20:26:01 +00:00
Kelvin Zhang
d60722c204 Merge "Revert "Target Java 17"" 2023-02-02 18:51:26 +00:00
Sorin Basca
384250c7c4 Revert "Target Java 17"
This reverts commit d6be9e51ca.

Reason for revert: b/267608166.

Change-Id: Ie07caa5ace3bcb290829e6fa476c5e1d47b975ba
Fixed: 267608166
2023-02-02 17:56:19 +00:00
Dennis Shen
a928c8dae1 Merge "Add soong unit test for trimmed apex build" 2023-02-02 14:39:53 +00:00
Sam Delmerico
1978fdf9b2 Merge "clean up CL for androidmk variables" 2023-02-02 14:11:12 +00:00
Sorin Basca
24bfad66be Merge "Use a stub doclet instead of Doclava" 2023-02-02 11:38:32 +00:00
Sorin Basca
ac9938dddc Merge "Target Java 17" 2023-02-02 11:38:32 +00:00