Commit Graph

32954 Commits

Author SHA1 Message Date
Paul Duffin
714a66dfdd Merge "Refactor the hiddenAPI() method for reusability" am: b71a8de0d5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1578284

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idc65c3755267c37f2054cbd7db053927b239846a
2021-02-09 14:25:01 +00:00
Paul Duffin
36d3011783 Merge "Extract initHiddenAPI() from hiddenapi()" am: abe1abd224
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1578283

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic575a7d2025e400b63c24a03cf8a5eb5796c99d6
2021-02-09 14:24:26 +00:00
Ivan Lozano
86af4b576f Merge "rust: Add rust_ffi_static vendor ramdisk Support" am: 4ccfcc2ee4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1578523

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0eafe95c73a0a3799243ae1cde6b1c9ef71891d2
2021-02-09 14:23:17 +00:00
Paul Duffin
b71a8de0d5 Merge "Refactor the hiddenAPI() method for reusability" 2021-02-09 13:57:52 +00:00
Paul Duffin
abe1abd224 Merge "Extract initHiddenAPI() from hiddenapi()" 2021-02-09 13:57:37 +00:00
Ivan Lozano
4ccfcc2ee4 Merge "rust: Add rust_ffi_static vendor ramdisk Support" 2021-02-09 13:49:28 +00:00
Jingwen Chen
45f0a42ceb bp2build: rename generated files to BUILD am: bb483cbcf5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1580824

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5828b0784227e2cb6b681c24ed5056a4814baafd
2021-02-09 12:32:38 +00:00
Jingwen Chen
bb483cbcf5 bp2build: rename generated files to BUILD
The checked in files are named BUILD.bazel, while bp2build files are
named BUILD.

Test: GENERATE_BAZEL_FILES=true m nothing
Change-Id: If226f581b5075088f774dc4f5f9ee88259821835
2021-02-09 04:26:18 +00:00
Treehugger Robot
ecc705e58e Merge "bp2build: refactor BazelTargetModule naming boilerplate." am: 198158b9f7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1580023

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifa05079e435ea8af71396e799ef7d8bc4f4c40bd
2021-02-09 03:43:13 +00:00
Treehugger Robot
f085577d59 Merge "Pass list of module libraries to gen_ndk_backed_by_apex.sh" am: d85d058820
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1580725

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia4a5d6e7bdd71b07a39845cf8d91cbf643b38d70
2021-02-09 03:42:14 +00:00
Treehugger Robot
198158b9f7 Merge "bp2build: refactor BazelTargetModule naming boilerplate." 2021-02-09 03:21:44 +00:00
Treehugger Robot
d85d058820 Merge "Pass list of module libraries to gen_ndk_backed_by_apex.sh" 2021-02-09 03:21:36 +00:00
Colin Cross
69f0a24762 Pass list of module libraries to gen_ndk_backed_by_apex.sh
Running find on the entire module directory can lead to flaky failures
when a directory is modified by another rule while find is traversing
it.  Pass a list of libraries in the module into the script instead
of finding them on disk.

Fixes: 178509901
Test: TARGET_BUILD_APPS=com.android.runtime dist
Change-Id: Ie4bf288f0e3d99cbbed5ca8770687a9bbe5377e4
2021-02-08 16:52:07 -08:00
Jingwen Chen
204163bd91 Merge "bp2build: make generated BUILD files publicly visible." am: ff8f1ce7d7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1577623

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1793619cf099486af709f1a34588c6aafd2a9a62
2021-02-09 00:45:18 +00:00
Jingwen Chen
ff8f1ce7d7 Merge "bp2build: make generated BUILD files publicly visible." 2021-02-09 00:38:03 +00:00
Treehugger Robot
5df2206de0 Merge "Turn missing jarjar output files into errors" am: ed7bfd9726
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1580883

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1bb716eec0f02cada272c00f852ca05109953348
2021-02-09 00:31:48 +00:00
Treehugger Robot
ed7bfd9726 Merge "Turn missing jarjar output files into errors" 2021-02-08 23:47:13 +00:00
Treehugger Robot
65ad4a4570 Merge "Remove Use_lmkd_stats_log from product variables" am: 3b9b0a11e9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1580147

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5074b2fdb167e9cb20d53ee15aad4211722d4231
2021-02-08 21:06:39 +00:00
Treehugger Robot
3b9b0a11e9 Merge "Remove Use_lmkd_stats_log from product variables" 2021-02-08 20:58:19 +00:00
Bill Peckham
50b395b740 Merge "Enable android_app_import to supply framework-res." am: 5c2406bde9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1543901

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8276945ef421ff6af6a58d39160e3a77ef4d6abf
2021-02-08 19:40:45 +00:00
Bill Peckham
5c2406bde9 Merge "Enable android_app_import to supply framework-res." 2021-02-08 19:15:10 +00:00
Paul Duffin
4fd997bc13 Refactor the hiddenAPI() method for reusability
A follow up change needs to be able to contribute to the information
the hiddenapi process collates without having a dex file encoded. This
change pushes all the functionality related to information gathering
into the hiddenAPIGenerateCSV() method and then renames it and the
hiddenAPI() method to make it clearer what they do.

Bug: 178361284
Test: m droid
      Verified that hiddenapi files (both aggregated ones and for the
      individual modules) are not affected by this change.
Change-Id: I04417720216a0fbadcd88e6185e7de6570af6216
2021-02-08 19:10:50 +00:00
Paul Duffin
4103e92c4b Extract initHiddenAPI() from hiddenapi()
Previously, the hiddenapi() method combined both checks to determine
whether a module contributed to/was modified by the hiddenapi process
and logic to create ninja rules to perform those tasks. This change
separates the former out into a new initHiddenAPI() method.

The main purpose of this is to simplify the process of allowing the
CSV generation to be separated from the encoding. That is required
because when a java_import retrieves its dex file from the apex it
has already been encoded.

The initHiddenAPI() method is only called for java.Library (and
indirectly for java.SdkLibrary) and java.Import modules which means
that the hiddenapi() method does nothing for any other module type.
That is consistent with the previous behaviour because while the
hiddenapi() method is called for other module types they fail because
the boot image jars only support java_library, java_sdk_library,
and java_import at the moment. While it will need to support
java_sdk_library_import once any of the libraries that are currently
provided as java_sdk_library modules switches to providing prebuilts
that is outside the scope of this work.

Bug: 178361284
Test: m droid
      Verified that hiddenapi files (both aggregated ones and for the
      individual modules) are not affected by this change.
Change-Id: Iaa91e0a8e2bffec03296dd894e9662556f4464c0
2021-02-08 19:10:50 +00:00
Paul Duffin
bd74e3d616 Merge "Integrate hiddenapi processing into boot jars test" am: 5d0572b7eb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1577724

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id4858151b7ba225b56e8c78ad766f5bb802820e5
2021-02-08 18:48:38 +00:00
Paul Duffin
d3cbf8531a Merge "Exclude exported_java_libs dependencies from visibility checks" am: 1a75902832
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1580146

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2886b5bedbee97ee489b14a27dfc21d7cecf7219
2021-02-08 18:48:32 +00:00
Treehugger Robot
d32e59bb54 Merge "Remove duplicate entries from hiddenapi files" am: c6fcf29872
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1575170

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic8714d72adfaa77eeac26edaa1d1e0378404d674
2021-02-08 18:48:25 +00:00
Treehugger Robot
32282da48a Merge "bp2build: add bazel_module: { bp2build_available } prop." am: 41905bf733
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1577067

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8fb9d84bf90e951404e8dc5a31976b309209ec5b
2021-02-08 18:47:51 +00:00
Paul Duffin
5d0572b7eb Merge "Integrate hiddenapi processing into boot jars test" 2021-02-08 18:43:10 +00:00
Paul Duffin
1a75902832 Merge "Exclude exported_java_libs dependencies from visibility checks" 2021-02-08 18:40:46 +00:00
Treehugger Robot
c6fcf29872 Merge "Remove duplicate entries from hiddenapi files" 2021-02-08 18:16:38 +00:00
Treehugger Robot
41905bf733 Merge "bp2build: add bazel_module: { bp2build_available } prop." 2021-02-08 18:14:20 +00:00
Colin Cross
d97cf63cdf Turn missing jarjar output files into errors
Jarjar doesn't exit with a nonzero return code when there is a syntax
error in a rules file and doesn't write the output file.  Without a
nonzero return code ninja prints a warning but continues, which leads
to stale results on incremental builds where the output file already
exists, or delayed errors on clean builds whre the output file didn't
exist.

Delete the output file before running jarjar, and then check if it
exists after running jarjar.

Fixes: 119516143
Test: m out/target/common/obj/APPS/TeleService_intermediates/classes.jar
Change-Id: I7e9f7ff34de565a986ab0dc6e375f606c91c3846
2021-02-08 10:14:04 -08:00
Jingwen Chen
aecadbabcd Merge "queryview: blocklist package module type." am: 033bfa6e29
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1580343

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I97ca4c472504e4100440d71d79ebd36661f097a9
2021-02-08 17:47:53 +00:00
Jingwen Chen
033bfa6e29 Merge "queryview: blocklist package module type." 2021-02-08 15:18:19 +00:00
Jingwen Chen
6c793e3179 Merge "bp2build: Refactor CreateBazelTargetModule API." am: 1a0485b34e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1577066

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I08d5440e93a5ab422ff896ae18e2476cc8a94f84
2021-02-08 14:50:33 +00:00
Ivan Lozano
e6d3098c1b rust: Add rust_ffi_static vendor ramdisk Support
Similar to our vendor support, this adds support for linking rust static
libraries to vendor ramdisk cc modules.

A bug fix is also included where a restriction against setting rust_ffi
vendor-specific was not being enforced.

Bug: 179397942
Test: Example modules link, Soong tests pass.
Change-Id: I737cdf0c2f49ab349bcea2a0429e6298ebc1313e
2021-02-08 09:36:26 -05:00
Jingwen Chen
1a0485b34e Merge "bp2build: Refactor CreateBazelTargetModule API." 2021-02-08 14:08:05 +00:00
Paul Duffin
a7139425bc Exclude exported_java_libs dependencies from visibility checks
Test: m nothing
Change-Id: Iba45580c0711d48034898e9d42832c7e2b0e6284
2021-02-08 13:13:02 +00:00
Paul Duffin
e510de2f58 Add test for hiddenAPI index file generation am: 01289a2407
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1575169

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia3bf986b4419a0f66cc0f1adf9995c4327a93a4f
2021-02-08 12:10:37 +00:00
Ioannis Ilkos
09ab9b4679 Remove Use_lmkd_stats_log from product variables
Use_lmkd_stats_log used to control LMKD_LOG_STATS when compiling lmkd.

However, for newer Android releases, we mandate that lmkd informs statsd of process kills (change id I8cb123b9488fbc6e88863c2f0e75f1422bcd282e)
After aosp/1555318 we compile lmkd with statsd by default, so this setting is a noop.

Change-Id: Ibcf661e205b3ed2a4a520a42952aaece503e9350
Test: build
Bug: 177985094
2021-02-08 11:18:51 +00:00
Jingwen Chen
fb4692a743 bp2build: refactor BazelTargetModule naming boilerplate.
This CL replaces the "__bp2build__" name prefix boilerplate with a props
creation function, and centralizes the prefixing in there.

Test: TH
Test: soong tests
Change-Id: Ic963199ab60dcce0d3361abff111cfa9acd4c21b
2021-02-08 04:10:18 -05:00
Jingwen Chen
96af35bec6 queryview: blocklist package module type.
The package module type was recently introduced, and its module name is
the full package path. queryview uses the module name as the eventual
target name in the generated BUILD files, so this causes a crash as seen
in b/179605762.

Workaround this by not generating package modules in the queryview
directory.

Test: m queryview && bazel query --config=queryview //...
Fixes: 179605762
Change-Id: Iac2bd79d02bec47d6271583d106c184fb2f16e68
2021-02-08 00:49:32 -05:00
Paul Duffin
215001cb5a Ensure subtest failures are reported on subtest am: 89886cbdb0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1577723

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2d6ad0fd97b196054bc873930cf91eca7319907c
2021-02-07 22:03:46 +00:00
Paul Duffin
3c4acc4279 Merge changes I9e94662d,I4b4e0dc8 am: 254aee4843
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1574746

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I996cffec92935fdfca054231d87777696a4420b6
2021-02-07 11:34:52 +00:00
Paul Duffin
f38931c287 Integrate hiddenapi processing into boot jars test
This change registers the hiddenapi singleton so that hiddenapi
processing is performed as part of
TestBootDexJarsFromSourcesAndPrebuilts so that additional hiddenapi
related tests can be added later.

The hiddenapi singleton uses the BootJars/UpdatableBootJars properties
from productVariables not the dexpreopt.GlobalConfig so this change
makes sure that they are consistent.

Performing hiddenapi processing causes the dex file used in "prebuilt
with source apex preferred" test to be encoded with hiddenapi
information which changes the path in the test.

Bug: 178361284
Test: m nothing
Change-Id: I2eb3d8cf11f6fb3bf4a34d6e4ae0c397c890191e
2021-02-07 10:58:24 +00:00
Paul Duffin
219b177279 Remove duplicate entries from hiddenapi files
Prevents the hiddenapi files index and metadata files from including
duplicate entries.

Bug: 178361284
Test: m droid
      Compared hiddenapi files before and after change
      Verified that the only differences were due to the removal of duplicates
      Used sort -u to remove duplicates from before file and compared with after file
Change-Id: I0b9e420aec42cdcf4584099a7ffd2ed9c3715d6d
2021-02-07 10:58:24 +00:00
Paul Duffin
01289a2407 Add test for hiddenAPI index file generation
The index file and the metadata file both currently include duplicate
entries due to them including both the <x> and <x>.impl libraries
created by java_sdk_library in their inputs, plus including both source
and prebuilt versions of the same named module. This change adds a test
to illustrate that behavior. A follow up change will correct the problem
and update the test accordingly.

This change only adds a test for the index file because the metadata
file depends on files from frameworks/base which makes it difficult to
test. Bug 177317659 will fix that and allow the metadata file
generation to be tested too.

Bug: 178361284
Test: m nothing
Change-Id: I33921d7267c9f4bb42726343d73f8a396d536aaa
2021-02-07 10:58:24 +00:00
Paul Duffin
89886cbdb0 Ensure subtest failures are reported on subtest
A subtest (code inside the func passed to t.Run(...)) are passed their
own t *Testing pointer to use to report errors in order to ensure that
they are treated as errors of the subtest and not the containing test.

This change ensures that the subtests in the following tests use the
correct t *Testing.
* TestPrebuiltExportDexImplementationJars
* TestBootDexJarsFromSourcesAndPrebuilts

Bug: 178361284
Test: m nothing
Change-Id: I4e8b166051cb6098c89d8e68a450c81a714f7677
2021-02-07 10:58:24 +00:00
Paul Duffin
254aee4843 Merge changes I9e94662d,I4b4e0dc8
* changes:
  Export implementation class jars for java_boot_libs
  Improve module filtering in hiddenapi stubFlagsRule()
2021-02-07 10:52:01 +00:00
Ivan Lozano
79ebcb94cd Merge "rust: Only pass "-lstatic" for rlibs." am: a707092636
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1577823

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia647662e3596eb2e4aac76a3b2dda9a8cb432857
2021-02-06 05:39:45 +00:00