Commit Graph

36292 Commits

Author SHA1 Message Date
Roman Kiryanov 5796db599f Merge "Remove libqemu_pipe from minSdkVersionAllowlist" 2021-04-27 21:54:58 +00:00
Roman Kiryanov fc48433640 Remove libqemu_pipe from minSdkVersionAllowlist
libqemu_pipe was retired.

Bug: 175046060
Test: presubmit
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: I4ac17966ad2a7609a9d71b8884351d70b5996b9d
2021-04-27 13:05:48 -07:00
Liz Kammer 2b50ce669c Make GetDirectDep implementation match comment
The comment on the interface of GetDirectDep states if there are
multiple deps with different tags, the first will be returned; however,
the current behavior is to panic if there are multiple deps. The
behavior now:
* a single dep, return the module and tag
* a single module with different tags: return module with first tag
* multiple modules: panic
* no module: return nil, nil

Bug: 186488405
Test: ~/aosp/build/bazel/ci/bp2build.sh
Test: m nothing
Change-Id: Id1e7315e7874b4a683ad7357ed2793822315821f
2021-04-27 15:53:51 -04:00
Chris Parsons f60ecf081e Mixed builds: propagate includes from cc_* targets
This allows us to remove libasync_safe from the mixed builds denylist.

Test: mixed_libc.sh CI script
Change-Id: Ibafd231284864078bf30340f919d39e5098843ce
2021-04-27 15:04:37 -04:00
Steven Moreland f36a3ac8b8 more no include_dir
Add a few more paths.

Bug: N/A
Test: N/A
Change-Id: Ib9503c2c792c4e93e30be631406e7e8314e6af31
2021-04-27 18:03:55 +00:00
Paul Duffin 29b18b8c17 Merge "Extract default image specific logic from buildBootImage" am: 6d4de43833
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686149

Change-Id: I1cd64a036c7c00d7937e9801b309e2aefb459e04
2021-04-27 17:21:38 +00:00
Paul Duffin c7cf6ac1e7 Merge "Simplify missing deps handling in buildBootImage" am: c42a738bc4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686148

Change-Id: If3ba77102465471104e3f001f878c4bb1615a257
2021-04-27 17:21:29 +00:00
Paul Duffin b49dae2874 Merge "Remove panics from reportMissingVariationDependency" am: a75af16878
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686147

Change-Id: I837996812cb588662631bbc35badb88a2a6301a3
2021-04-27 17:20:41 +00:00
Paul Duffin 6d4de43833 Merge "Extract default image specific logic from buildBootImage" 2021-04-27 17:01:23 +00:00
Paul Duffin c42a738bc4 Merge "Simplify missing deps handling in buildBootImage" 2021-04-27 17:00:42 +00:00
Paul Duffin a75af16878 Merge "Remove panics from reportMissingVariationDependency" 2021-04-27 17:00:22 +00:00
Colin Cross 2e9f993439 Merge "Add support for cc_library_headers to replace llndk_headers" am: 8fb66f48c7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1687471

Change-Id: Id427b137b951f53dd1d70d26ad41755311819d95
2021-04-27 16:53:43 +00:00
Colin Cross e125ff0d7b Merge "Skip default dependencies for header libraries" am: 4ba70ab48e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1687468

Change-Id: I2e40e73ea5099e88ed65bb8eaf6bea0c51b9ee42
2021-04-27 16:53:33 +00:00
Steven Moreland 294019346e Merge "start eating include_dirs from both ends" am: ac9dc817b8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1687472

Change-Id: I4438c69719e627c40b459e5c2fb2351649b93876
2021-04-27 16:52:51 +00:00
Colin Cross 8fb66f48c7 Merge "Add support for cc_library_headers to replace llndk_headers" 2021-04-27 16:40:48 +00:00
Colin Cross 4ba70ab48e Merge "Skip default dependencies for header libraries" 2021-04-27 16:40:37 +00:00
Steven Moreland ac9dc817b8 Merge "start eating include_dirs from both ends" 2021-04-27 16:34:24 +00:00
Lukács T. Berki 39997be8de Merge "Reorganize and cull cc_library_static denylist." am: c860588763
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1687871

Change-Id: Id022b9a4cdd05f7141e978f6b50832e53908c334
2021-04-27 15:00:23 +00:00
Paul Duffin 5861242a78 Extract default image specific logic from buildBootImage
Previously, buildBootImage had to be called for the default boot image
config before the art boot image config as it created some rules which
were specific to default boot image. The creation of these rules was
encapsulated in Config().Once(..) to ensure that they were only ever
created once.

This change extracts that functionality out of buildBootImage to the
calling method which means that they are only called once and so no
longer need protecting against being called again.

Bug: 177892522
Test: m droid
Change-Id: I464477de1a08df15e577873a9accf7db2bc088d1
2021-04-27 15:56:47 +01:00
Paul Duffin 57e2e7d199 Simplify missing deps handling in buildBootImage
Previously, the buildBootImage function maintained a list of
missingDeps that was returned from findAndCopyBootJars and was passed
to various other methods that created ninja rules that depended on the
files created by findAndCopyBootJars. The purpose of that list was
basically to record that findAndCopyBootJars could not find some files
so that the subsequent ninja rules could be marked as being in error.

This changes avoids having to explicitly propagate the missing deps to
each rule by instead having findAndCopyBootJars generate an error rule
instead of a Cp rule for any missing file. That means that any attempt
to build any rule that depends on the missing file will fail when the
missing file is created.

Bug: 177892522
Test: Add an unknown module to PRODUCT_BOOT_JARS
      lunch art_module_arm64
      - Run each of the following targets and made sure it failed with a
        message indicating that the unknown module was missing.
      m SOONG_ALLOW_MISSING_DEPENDENCIES=true out/soong/module_arm64/dex_bootjars/boot.prof
      m SOONG_ALLOW_MISSING_DEPENDENCIES=true out/soong/generic_arm64/dex_bootjars/boot.bprof
      m SOONG_ALLOW_MISSING_DEPENDENCIES=true out/soong/generic_arm64/dex_bootjars/updatable-bcp-packages.txt
Change-Id: Ib7196c128419fbffdfeb61c1c5d47a3b08d1e132
2021-04-27 15:56:47 +01:00
Paul Duffin 81667c8c11 Remove panics from reportMissingVariationDependency
The code that has been removed triggers in many cases when it should
not, e.g. an unknown module on the bootclasspath. The code was
originally added to try and ensure that if the attempt to add useful
error messages failed it would help debug the issue. However, it ended
up just creating more failures.

If this does become an issue then this will be revisited.

Bug: 177892522
Test: Add an unknown module to PRODUCT_BOOT_JARS
      m SOONG_ALLOW_MISSING_DEPENDENCIES=true
Change-Id: I08dbd4b29d301f3f1f78a0fb396687062b47deb8
2021-04-27 15:56:47 +01:00
Lukács T. Berki c860588763 Merge "Reorganize and cull cc_library_static denylist." 2021-04-27 14:42:00 +00:00
Treehugger Robot cc2142c684 Merge "bp2build: fix exclude_srcs in subpackages." am: 6de44e74c8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1687510

Change-Id: Idb05de2922c7d8fcd24ba08b604168ea6e044ac0
2021-04-27 14:07:03 +00:00
Treehugger Robot 6de44e74c8 Merge "bp2build: fix exclude_srcs in subpackages." 2021-04-27 13:48:46 +00:00
Jingwen Chen ced8f4de70 bp2build: arch-specific exclude_srcs and srcs. am: e32e9e07d7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1684590

Change-Id: Ic10b59039b567fd1b36882a0438b3b00c7f869c8
2021-04-27 13:03:43 +00:00
Lukacs T. Berki b5ac5af618 Reorganize and cull cc_library_static denylist.
Take two: this time, put libasync_safe on the mixed build denylist
because it seems to break things.

Test: Presubmits + testing the offending action using a Ninja
invocation. "m droid dist" also running.

Change-Id: I7912b6670980776d981d874dab157b0268693ab2
2021-04-27 15:00:45 +02:00
Jingwen Chen e32e9e07d7 bp2build: arch-specific exclude_srcs and srcs.
OS-specific exclude_srcs and srcs will be done in a follow-up, due to
complexities from merging multiple select statements together.

Test: TH
Bug: 186153868
Change-Id: I01b881e9a5a7cd41b4a507f8be7e9e65eab37bdc
2021-04-27 11:02:07 +00:00
Jingwen Chen 4ecc67d3c5 bp2build: fix exclude_srcs in subpackages.
In a non-top level Android.bp file, exclude_srcs was not working at all
due to a bug in expandSrcsForBazel. GlobFiles was expanding a glob
relative to root, but the expandedExcludes list was relative to the
module dir, causing the glob function to not consider the
expandedExcludes list at all.

Add tests to demonstrate that this is working now.

Test: TH
Bug: 186388919
Change-Id: Ice8254231d085b39126e91b823a09ec328ee0ae0
2021-04-27 09:51:08 +00:00
Jingwen Chen 40079e7151 bp2build: remove header globs in generated srcs. am: 882bcc1c1c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1687508

Change-Id: I1eda934fe14d6c2be94dcac94efe7c2cbced7fa4
2021-04-27 08:27:10 +00:00
Jingwen Chen 882bcc1c1c bp2build: remove header globs in generated srcs.
Not needed anymore for bp2build-incremental since https://android-review.googlesource.com/q/topic:no-include-check.

Not needed for mixed builds either, since cc compile actions aren't sandboxed.

Fixes: 186488830
Test: treehugger and go tests

Change-Id: Ib5d4908dcce6bf910a653c457bb251d726e717d4
2021-04-27 06:26:40 +00:00
Colin Cross 7541409e7c Merge "Fix and test vendor public libraries for product modules" am: c30d7beb8f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1687467

Change-Id: If9aec5161f8ab54f497b74466473c552cdd84cf1
2021-04-27 04:12:44 +00:00
Colin Cross 406b79a250 Merge "Move TestVendorPublicLibraries into vendor_public_library_test.go" am: e3f2869573
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1687466

Change-Id: I6b683635f02386ef4b437a324e31c20fb316dbf0
2021-04-27 04:12:08 +00:00
Colin Cross c30d7beb8f Merge "Fix and test vendor public libraries for product modules" 2021-04-27 03:40:27 +00:00
Colin Cross e3f2869573 Merge "Move TestVendorPublicLibraries into vendor_public_library_test.go" 2021-04-27 03:39:21 +00:00
Steven Moreland 8fc8dbf70c start eating include_dirs from both ends
Further restrictions on a restricting build configuration. Before, we
restricted certain paths from being included. Now, we restrict certain
paths from including.

This adds system/libfmq for now, but I'm planning to add more in the
future, as they are cleaned up.

Bug: 35624006
Test: m nothing
Change-Id: I913f190f93ab63059ee0372d342daa8f5584806b
2021-04-27 02:56:03 +00:00
Treehugger Robot 73ec83be2c Merge "Drop DexPreoptImages field in dexpreopt config" am: bdae1e5765
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686011

Change-Id: Id42910b1adfbe4601b5a7a9d7739feac921635a4
2021-04-27 02:38:31 +00:00
Treehugger Robot bdae1e5765 Merge "Drop DexPreoptImages field in dexpreopt config" 2021-04-27 01:53:45 +00:00
Colin Cross 203b421043 Remove obsolete llndk_library
Remove llndk_library in favor of cc_library with llndk.symbol_file.

Bug: 170784825
Test: m checkbuild
Test: TestLlndkLibrary
Change-Id: I43580976589a7a2a176d7442be53fa043c0c8324
2021-04-26 18:41:00 -07:00
Colin Cross 627280f091 Remove llndk_headers
Replace llndk_headers with cc_library_headers with
llndk.llndk_headers: true.

Bug: 170784825
Test: m checkbuild
Test: compare out/soong/build.ninja
Test: TestLlndkHeaders
Change-Id: I33b411cd4d474318796c2073375176b82dd8c216
2021-04-26 18:40:53 -07:00
Colin Cross 1f3f130e29 Add support for cc_library_headers to replace llndk_headers
Set llndk.llndk_headers: true to allow a cc_library_headers
module to be used by a cc_library module with llndk.symbol_file set.

Bug: 170784825
Test: TestLlndkHeaders
Change-Id: Ib65a4b70717dc9a54ae30f2991485bb1bb9b8409
2021-04-26 18:37:44 -07:00
Colin Cross be763f7b16 Skip default dependencies for header libraries
Header libraries don't compile anything, so they don't need the
default stl and libclang_rt dependencies.  Trimming the dependencies
simplifies using header libraries for LLNDK libraries, which need
extra variants that don't exist for the default dependencies.

Test: m checkbuild
Change-Id: Ib9864c3cc7048b2cc52acf304830777b65a51877
2021-04-26 18:23:45 -07:00
Colin Cross b719c0194e Fix and test vendor public libraries for product modules
Vendor public libraries are checked for product modules, but never
reached because the VNDK check occurs first, and wouldn't work anyways
because vendor_public_library did not have the product_available
property.  Reorder the rewrite checks and add VendorProperties, and
add a test.

Bug: 178231622
Test: vendor_public_library_test.go
Change-Id: Idbd2802fbd134d22c30600762cb0465633703506
2021-04-26 18:23:45 -07:00
Colin Cross f12db530d0 Move TestVendorPublicLibraries into vendor_public_library_test.go
Bug: 178231622
Test: TestVendorPublicLibraries
Change-Id: Ic57202a7e4e186483506ceca3125f3d6a855f3ff
2021-04-26 17:43:32 -07:00
Treehugger Robot 429d1d9d5b Merge "Revert "Reorganize and cull cc_library_static denylist."" am: 1f8a7f06d9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1687146

Change-Id: Ib7c69606da30a67da1e4476b1a6511b5b144d61e
2021-04-27 00:05:47 +00:00
Treehugger Robot 1f8a7f06d9 Merge "Revert "Reorganize and cull cc_library_static denylist."" 2021-04-26 23:46:42 +00:00
Paul Duffin 817d462f97 Merge "bootclasspath_fragment: Always output contents property in snapshot" am: aef7fcfa7e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686127

Change-Id: Ia0074f40dc513aef2bb0079b6faf5eb476c663fc
2021-04-26 22:50:06 +00:00
Paul Duffin 7d43ff1fd8 Merge "Automatically add bootclasspath_fragment contents to sdk" am: 56d3ea4998
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686126

Change-Id: Iddcb0575e9de21689f0c7ccdcd6f51cbbdc3c2eb
2021-04-26 22:49:00 +00:00
Paul Duffin 1081c7d85e Merge "Allow contents and image_name to be specified together" am: 3d14889c5b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686066

Change-Id: Icf6a58e6b53d42fc9b5ae6d2c16a22ab27ff5ed9
2021-04-26 22:47:26 +00:00
Liz Kammer cc86ac88a8 Revert "Reorganize and cull cc_library_static denylist."
This reverts commit cba7b0c43c.

Reason for revert: mixed_droid failing: libbacktrace fails due to libasync_safe, linkerconfig (and others) due to duplicate symbols

Change-Id: Ib6dd6bbb6f76048a7abd0970d457cf75921beae6
2021-04-26 22:17:48 +00:00
Paul Duffin aef7fcfa7e Merge "bootclasspath_fragment: Always output contents property in snapshot" 2021-04-26 22:05:59 +00:00