Commit graph

19122 commits

Author SHA1 Message Date
Ulyana Trafimovich
2aa8e0be11 Merge "Use two-column format for PRODUCT_BOOT_JARS components." 2020-05-04 08:57:47 +00:00
Jeongik Cha
5bc011b479 Remove networkstack-aidl-interfaces-unstable-java from the whitelist
networkstack-aidl-interfaces-*java has explicit apex_available now.
Accordingly, remove it from the whitelist

Bug: 133526962
Test: m nothing
Change-Id: If5427afb2470a7dffbd418e1c405af508577ad93
Merged-In: If5427afb2470a7dffbd418e1c405af508577ad93
2020-05-04 08:32:41 +00:00
Dan Willemsen
b5b2aba43b Don't tell make about modules in other namespaces
This was causing build breaks when different devices moved to Android.bp
at different times.

Bug: 150878976
Test: build *_hwasan targets
Change-Id: I68912bb6a5696809c318d1ec816a1bcfbe2df245
Merged-In: I68912bb6a5696809c318d1ec816a1bcfbe2df245
(cherry picked from commit 7b6af23db6)
2020-05-04 00:05:47 -07:00
Jiyong Park
af9539fd14 Dependencies of tests are also included in APEX
Shared lib dependencies of a test is included in the APEX regardless of
whether the test has test_per_srcs or not.

Bug: N/A
Test: m (apex_test.go amended)
Change-Id: I6b16843cc7467c42e250aba88d79d5580ba47324
2020-05-04 10:31:32 +09:00
Sasha Smundak
a4ef83b252 Canonicalize saved paths, Kythe cannot handle symlinks
Bug: 141385766
Test: build kzip
Change-Id: I87c4af719135ee89298d160bb8d6395ad7d6046c
2020-05-03 18:30:13 -07:00
Chris Gross
06c8036ac8 Allow bootjars in system_ext.
Bug: 148385042
Test: Built and booted Pixel 3a both with and without a boot jar in system_ext.
Change-Id: I0702aa8259478a71cf96a5cd3a425071ccdafdfb
2020-05-02 14:56:51 -07:00
Anton Hansson
75ac71eea2 Fix soong crashing when there's no baseline file
Soong was referencing the baseline file regardless of whether it was
valid or not.

Also update the lint message to match the one metalava itself prints,
which only suggests whitelisting the error if it's not possible to fix
it properly.

Bug: 154616909
Test: m (with lint error)
Change-Id: I4c6ec327a59aefe74825b4c4719393dd267ba3aa
Merged-In: I4c6ec327a59aefe74825b4c4719393dd267ba3aa
(cherry picked from commit 34ced82d2a)
2020-05-02 11:23:34 +01:00
Evgenii Stepanov
b39e15d3f3 Merge "[soong] Zero and pattern initialization of heap memory." 2020-05-01 23:58:48 +00:00
Dan Willemsen
1612e2641e nsjail: Always remount /tmp before src/out/dist
A user was trying to use OUT_DIR=/tmp/...-out DIST_DIR=/tmp/...-dist

Test: OUT_DIR=/tmp/test-out DIST_DIR=/tmp/test-dist m nothing
Change-Id: I811cc8e1bda8d766406603df47309a8637cef48c
2020-05-01 16:26:56 -07:00
Jaewoong Jung
243688ea1b Make android_app_import multi targets arch module.
This makes it consistent with android_app. Also, most android_app_import
modules with JNI libs target a single arch.

Test: TreeHugger
Bug: 154281342
Change-Id: I5bbb2d2b733bbd6b868898285683ba5ff45be10b
2020-05-01 15:50:08 -07:00
Songchun Fan
4b25e319e6 Revert "[soong] new field in Android.bp to request APK signing V4"
This reverts commit 17d69e3484.

Reason for revert: This new field is not useful without dependencies in aosp

Test: builds
Change-Id: I87bd820cd6dbc5274ce3d28c4578381718aa805d
Merged-In: I70d6f7dc751510311b03e245b2189a76b395a49c
2020-05-01 11:29:36 -07:00
Paul Duffin
0c83aba28e Report visibility errors in both check and gather phases
Previously, errors that were found when splitting visibility rules were
only reported in the check phase and simply ignored during the gather
phase. That was because every visibility property that was processed in
the gather phase had already been checked in the check phase. However,
that is not strictly true as it has always been possible to add a
mutator between the check and gather phases that creates a module with
invalid visibility properties that will just be ignored. Fortunately,
that has not happened.

A follow up commit will add the capability to create modules after the
defaults have been applied which means the chances of invalid visibility
properties being ignored will increase.

This change makes both phases report any errors they find. It will not
have any impact on existing code as if any errors are reported in the
check phase then the build will exit before the gather phase. It will
prevent any invalid visibility errors from being ignored.

Bug: 155295806
Test: m nothing
Change-Id: I101fa6b03d2530b16e4394a9e466fead48be0ff0
2020-05-01 18:35:07 +01:00
Paul Duffin
5ec73ecc08 Reduce duplication in visibility property management
Adds a couple of new methods to manage visibility property instances to
reduce duplication and encapsulate the implementation slightly better.

The AddVisibilityProperty method is exported as it will be needed by
other packages in follow up commits.

Bug: 155295806
Test: m nothing
Change-Id: Ic1a9bb1e151fc6ae65761344fd210b4e4ba74fbc
2020-05-01 18:35:05 +01:00
Ivan Lozano
f752c21f09 Merge "Test for rust install path regressions." 2020-05-01 17:16:52 +00:00
Nicolas Geoffray
b8bb5d05ce Merge "Fix dex2oat symlink now that we generate dex2oat32/dex2oat64." 2020-05-01 13:49:51 +00:00
Nicolas Geoffray
d2a61c8752 Fix dex2oat symlink now that we generate dex2oat32/dex2oat64.
Test: m
Bug: 155257660
Change-Id: I466feabc64c0fb77fcf652be81bc0c4944b84ac0
Merged-In: I466feabc64c0fb77fcf652be81bc0c4944b84ac0
(cherry picked from commit 101a7622fe)
2020-05-01 11:04:59 +01:00
Yabin Cui
74d25e39f0 Merge "Switch to clang-r383902 (11.0.1)." 2020-05-01 05:28:39 +00:00
Dan Willemsen
6dfe30a5e2 Disallow OUT_DIR on the command line
By the time we do argument parsing, we've already written to $OUT_DIR or
the default, so don't allow overriding the output directory on the
command line.

Test: m OUT_DIR=newdir
Change-Id: I6f8c07cbef3a71d393b766dc5a01ae9c3df8631c
2020-05-01 02:23:31 +00:00
Treehugger Robot
c57d39cade Merge "[cc_fuzz] Collect shared deps by name, not by module." 2020-04-30 22:26:22 +00:00
Jaewoong Jung
32335f90b1 Merge "Add defaults support to runtime_resource_overlay." 2020-04-30 17:43:37 +00:00
Ivan Lozano
a812062d0d Merge "Provide 32-bit and 64-bit Rust libs by default." 2020-04-30 15:14:53 +00:00
Ulya Trafimovich
50c4a4b19f Use two-column format for PRODUCT_BOOT_JARS components.
The first component is the apex name, or a special name "platform"
if the boot jar is a platform jar rather than a part of some apex.
This is a prerequisite change for moving core-icu4j to a separate
com.android.i18n apex.

Old one-column format is still supported, but all unqualified
components of PRODUCT_BOOT_JARS get "platform:" prepended to them
after reading the product makefiles.

Test: aosp_walleye-userdebug boots
Bug: 138994281
Change-Id: Ic229159fdcdaf6182210a53b63850a389dd786fc
2020-04-30 14:42:32 +01:00
Ramy Medhat
427683cad7 Add support for the remote execution of metalava actions.
Test: built aosp crosshatch userdebug with RBE_METALAVA=1
Change-Id: I3d42d75b4522f99ff95ce8c997ead782e4322f6e
2020-04-30 03:24:48 -04:00
Evgenii Stepanov
19ff3c9bb8 [soong] Zero and pattern initialization of heap memory.
Bug: 155227507
Test: build with and without MALLOC_PATTERN_FILL_CONTENTS, MALLOC_ZERO_CONTENTS
Change-Id: I79a675e1b20897e8f88e89b1b2d6758e8b91f0be
2020-04-29 15:33:07 -07:00
Treehugger Robot
b407131a0e Merge changes I7bc54dc4,I4e9bfebd
* changes:
  java_sdk_library: Correct stubs source generation classpath
  Fix definition of android_stubs_current in sdk tests
2020-04-29 21:31:21 +00:00
Matthew Maurer
f5be9a6ad4 Switch rustc to 1.43.0
Bug: 154947284
Test: cd external/rust/crates; mm
Change-Id: I684e9ee5d44029806d48a271970f8ef28e793195
2020-04-29 13:33:40 -07:00
Ivan Lozano
f900f4b848 Test for rust install path regressions.
Bug: 153423714
Test: Soong tests pass.
Change-Id: Ica4d2c7e47f1c325fa387a91f6c476dfa4f93710
2020-04-29 15:31:42 -04:00
Ivan Lozano
9d1df10e2a Provide 32-bit and 64-bit Rust libs by default.
CC libraries which depend on Rust libraries get missing dependency
errors when building 32-bit variants dependent on Rust modules which
don't explicitly have "multilib: both" declared.

Because CC libraries use MultilibBoth by default, Rust should do the
same.

This also fixes a bug where the ARM32 toolchain incorrectly embedded
toolchain64Bit instead of toolchain32Bit.

Bug: 154730212
Test: Rust libraries provide both variants by default.
Change-Id: Ia545fe069d3c6b77c3d18f4f10267e2c72ee0bab
2020-04-29 15:31:34 -04:00
Paul Duffin
7b78b4d404 java_sdk_library: Correct stubs source generation classpath
The stubs source should be generated using the same classpath that is
used to compile the implementation library, i.e. sdk_version,
system_modules and libs/static_libs.

Previously, the sdk_version used to generate the stubs was different.
It provided access to a wider API surface than was necessary. This
change fixes that.

Test: m checkapi
Bug: 155164730
Change-Id: I7bc54dc4ad12a7d6c7503111d1322ee35c56d713
2020-04-29 19:03:45 +01:00
Paul Duffin
260bd316bf Fix definition of android_stubs_current in sdk tests
This change fixes an issue with the definition of the
android_stubs_current (and similar) modules in the sdk tests. They were
incorrectly defined as java_sdk_library_import and not java_import.

Test: m nothing
Bug: 155164730
Change-Id: I4e9bfebdd2ff0a374e12284ccdf5ee5518968969
2020-04-29 18:59:56 +01:00
Treehugger Robot
6e2fb5c0cd Merge "soong: Add support for override_runtime_resource_overlay" 2020-04-29 17:30:00 +00:00
Liz Kammer
8e25bcb895 Merge "Document Instrumentation_for android app tests." 2020-04-29 16:06:49 +00:00
Roshan Pius
4df2bc76d5 soong: Add support for override_runtime_resource_overlay
Bug: 154960712
Test: go test ./... -test.v -run TestOverrideAndroidApp
(cherry-picked from ag/11270710)

Change-Id: I8ca9d173b6ab7f9306c83c2b434107111aa2ca88
Merged-In: I8ca9d173b6ab7f9306c83c2b434107111aa2ca88
2020-04-29 09:01:51 -07:00
Nicolas Geoffray
71d105ce41 Merge "Use FORCE_BUILD_LLVM_COMPONENTS." 2020-04-29 09:22:25 +00:00
Liz Kammer
6b0c55263c Document Instrumentation_for android app tests.
Test: m soong_docs

Change-Id: I84fd20ea563fc75dc04ac41f44f2f53df994925f
2020-04-28 16:45:51 -07:00
Jaewoong Jung
bf13546f54 Add defaults support to runtime_resource_overlay.
(This is a cherry-pick change.)

Bug: 154956723
Test: app_test.go
Change-Id: Ida29035ef45ec188c95a07a8bccaaa77eea486d7
Merged-In: Ida29035ef45ec188c95a07a8bccaaa77eea486d7
2020-04-28 20:49:17 +00:00
Anton Hansson
6affb1f4fe Remove obsolete var apiFileMakeVariableSuffix
Not used anymore, as the make variables have been deleted.

Test: m
Change-Id: I1b29ec33951588ab479fc3e14f85e9aa189b971b
2020-04-28 20:30:25 +01:00
Treehugger Robot
0b3b3db525 Merge "Refactor RBE support for Javac/R8/D8 to use the remoteexec package." 2020-04-28 17:53:50 +00:00
Treehugger Robot
c869812b04 Merge "runtime_resource_overlay can be included in APEXes" 2020-04-28 17:13:26 +00:00
Ramy Medhat
1dcc27e47c Refactor RBE support for Javac/R8/D8 to use the remoteexec package.
Test: build with and without RBE_JAVAC/RBE_R8/RBE_D8 set.
Change-Id: I1607f8cfb4d2c3cbb3672152bbeb561d9968bc60
2020-04-28 11:37:20 -04:00
Nicolas Geoffray
7cad0f860b Use FORCE_BUILD_LLVM_COMPONENTS.
And remove the allow missing dependencies flag.

Test: build-mainline-modules.sh
Change-Id: I6ba8892ef66eeb42c7bd3abc989a80ad4b6a1cf9
2020-04-28 15:54:59 +01:00
Jiyong Park
69aeba9982 runtime_resource_overlay can be included in APEXes
runtime_resource_overlay is put to an APEX via 'apps' property. It is
placed under ./overlay directory in it.

Bug: 154822536
Test: m
Change-Id: I8edf4a26c26368c52fb7b327b2ecc829f21ea148
2020-04-28 22:55:54 +09:00
Treehugger Robot
a6c19f792d Merge "Do not propagate dynamic dependencies for stub libs." 2020-04-28 12:10:26 +00:00
Treehugger Robot
ef98e291be Merge "Allow building unsigned APEXs payload for testing." 2020-04-28 09:33:15 +00:00
Ulyana Trafimovich
e3b49c69da Merge "Fix host path for dexpreopted system server modules defined in Make." 2020-04-28 08:19:34 +00:00
Kousik Kumar
3fb6126309 Add implicit outputs to link actions
Change-Id: I9b6ae97f5bbfe8f9c4b9c089544a768982794f32
Bug: b/154733231
Test: Built the failing action with / without this change
2020-04-27 21:53:43 -07:00
Robert Shih
4a748c99f0 Merge "Removing filter to allow widevine fuzzers addition" 2020-04-28 01:49:48 +00:00
Jaewoong Jung
bf5ed2d676 Merge "Add overrides to runtime_resource_overlay" 2020-04-28 01:19:50 +00:00
Mitch Phillips
c0b442f8a7 [cc_fuzz] Collect shared deps by name, not by module.
cc_fuzz relies on an invariant that's not exactly true. We assume that
for each fuzz target, we'll only have a dependency on a single sanitized
variant of a shared library. In a few instances, this is proven not to
be true, as we end up with a transitive dependency on a shared library
with sanitizer coverage instrumentation, and one without sancov.

This results in breaking the packaging for some fuzz targets. This then
goes on to break `make haiku` in some scenarios.

While this isn't a completely technically correct solution (as we
basically resolve one of the sanitized variants pseduorandomly), it does
resolve the issue for now. Realistically, we should select *both* of
them, and set the DT_RUNPATHS on the shared libraries to point to the
dependencies that have the sanitization that they're expecting. In
practice - this shouldn't break sancov (we might just silently drop some
coverage) or hwasan (we might just silently drop some hwasanification).

I believe that the walk order of VisitDirectDeps is deterministic, and
as such this shouldn't affect the reproducability of fuzz target builds
(and thus won't blow up the Soong rebuilds). ccross@ or dwillemsen@ can
speak better to this than I can though.

Bug: 148306195
Bug: 151102177
Bug: 155123587
Test: lunch flame_hwasan-userdebug && make haiku
Change-Id: I8d4001d93da33e4e5d21f740beb88a20fcc26e2a
2020-04-27 17:06:58 -07:00
Jaewoong Jung
ad0177b1fb Add overrides to runtime_resource_overlay
(This is a cherry-pick change.)

Bug: 154928457
Test: app_test.go
Change-Id: Ia52bb9fd18c22b1a02d7b36afd41561cec0473f0
Merged-In: Ia52bb9fd18c22b1a02d7b36afd41561cec0473f0
2020-04-27 16:44:33 -07:00