Commit Graph

36812 Commits

Author SHA1 Message Date
Paul Duffin
d0a7be3222 Improve error reporting when a rule cannot be found am: 4dbf6cfbae
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1736223

Change-Id: Ida5552db4748838406f41d66f101aff1a7b3443c
2021-06-14 20:20:22 +00:00
Paul Duffin
4dbf6cfbae Improve error reporting when a rule cannot be found
Outputs the list of available rules on separate lines.

Test: m nothing
Change-Id: I845064e032f0a47d00883ff775c4f7b4fee7631e
2021-06-14 17:23:52 +01:00
Paul Duffin
174d9c7eec Merge "Make copyBootJarsToPredefinedLocations simpler and less fragile" am: cc1bd8364a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1731414

Change-Id: If96e0287db7e2ef86fb12f14f278dc669bf9682d
2021-06-14 08:24:53 +00:00
Paul Duffin
cc1bd8364a Merge "Make copyBootJarsToPredefinedLocations simpler and less fragile" 2021-06-14 08:20:50 +00:00
Paul Duffin
87cbe1b100 Merge "Ensure primary boot image files are created before they are used" am: a11b8707f1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1731413

Change-Id: I4d5c86d67488e8892ccf0c7237177040448703ef
2021-06-14 08:19:18 +00:00
Paul Duffin
a11b8707f1 Merge "Ensure primary boot image files are created before they are used" 2021-06-14 08:01:27 +00:00
Liz Kammer
e684a554ca Merge "Append _alwayslink to prebuilt whole static deps" am: 5f16b3d03e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1734255

Change-Id: I59610a5c0a4df44f2f736bc5267c8e8b191d07fa
2021-06-11 19:59:09 +00:00
Liz Kammer
5f16b3d03e Merge "Append _alwayslink to prebuilt whole static deps" 2021-06-11 19:47:12 +00:00
Liz Kammer
2d7bbe3883 Append _alwayslink to prebuilt whole static deps
This allows us to support prebuilt archives that are part of whole
static deps.

Test: build/bazel/ci/bp2build.sh
Bug: 190716727

Change-Id: I913dbd8f85a1974fbd53c0cbaa49211db18ea45f
2021-06-11 08:10:50 -04:00
Paul Duffin
c279ca845c Merge "Make bootclasspath_fragment_sdk_test.go tests more realistic" am: 4ebad6aa89
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1731419

Change-Id: Idef290f1cfafc8fea10760dc1da87c1e9658b8ad
2021-06-11 04:50:45 +00:00
Paul Duffin
e599574c92 Merge "Make TestPlatformBootclasspath_Fragments more realistic" am: baa8e55dec
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1731417

Change-Id: Ie932deddef1bd9bf181c26278a4fd8482a750514
2021-06-11 04:50:38 +00:00
Paul Duffin
0d2a3ad17d Merge "Move TestPlatformBootclasspath_Fragments to apex package" am: 2eddb50fd5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1731416

Change-Id: Ia1f9004d5f214aff94012f95dcaaa840a4babac9
2021-06-11 04:50:29 +00:00
Paul Duffin
a6752bb7ed Merge "Export hidden api related types and fields" am: 5e1073b7cd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1731415

Change-Id: I3a24d55d95460bbebb7378411d8b5d449ffce628
2021-06-11 04:49:38 +00:00
Paul Duffin
4ebad6aa89 Merge "Make bootclasspath_fragment_sdk_test.go tests more realistic" 2021-06-11 04:41:28 +00:00
Paul Duffin
baa8e55dec Merge "Make TestPlatformBootclasspath_Fragments more realistic" 2021-06-11 04:40:46 +00:00
Paul Duffin
2eddb50fd5 Merge "Move TestPlatformBootclasspath_Fragments to apex package" 2021-06-11 04:40:04 +00:00
Paul Duffin
5e1073b7cd Merge "Export hidden api related types and fields" 2021-06-11 04:39:05 +00:00
Colin Cross
20a0efc544 Merge "Always propagate some environment variables to RBE" am: 7b4bda29fc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1732493

Change-Id: I378f28c316327166becefd16ca7d3c10a2438f0c
2021-06-10 16:15:39 +00:00
Yuntao Xu
bdafba2af6 Merge "Support LOCAL_CERTIFICATE_LINEAGE for androidmk" am: 7a93bffd76
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1729631

Change-Id: I1f678ccdb63ebb02bfb8acff8ef43d404f4e61d5
2021-06-10 16:13:57 +00:00
Colin Cross
7b4bda29fc Merge "Always propagate some environment variables to RBE" 2021-06-10 15:57:22 +00:00
Yuntao Xu
7a93bffd76 Merge "Support LOCAL_CERTIFICATE_LINEAGE for androidmk" 2021-06-10 15:57:17 +00:00
Jingwen Chen
a0bc3f955e Merge "bp2build: support strip properties." am: 62d8b1ed43
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1730118

Change-Id: I78615ca55f489feaeb648557e684904c808aaa88
2021-06-10 13:50:22 +00:00
Liz Kammer
7bd07b7193 Merge "Handle simple symlinks in mixed builds" am: 6ae5658387
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1729716

Change-Id: I362915f928012498f9d215590a54c2f2cca5021e
2021-06-10 13:49:22 +00:00
Jingwen Chen
62d8b1ed43 Merge "bp2build: support strip properties." 2021-06-10 13:36:13 +00:00
Liz Kammer
6ae5658387 Merge "Handle simple symlinks in mixed builds" 2021-06-10 13:35:13 +00:00
Paul Duffin
5f148ca7cf Make copyBootJarsToPredefinedLocations simpler and less fragile
Previously, copyBootJarsToPredefinedLocations relied on all its
parameters having the same length and the same order. That made it
quite fragile as changes to one of the parameters without corresponding
changes to the other would cause failures. It also combined the
retrieval of the boot dex jars from the modules, handling of missing
boot dex jar files and the generation of the rules to copy the files.

This change separates the retrieval of boot dex jars and handling of
missing files from the copying of those files while at the same time
making the function less fragile by replacing the three ordered
parameters with two maps that shared common keys.

Bug: 179354495
Test: m nothing
Change-Id: Idbcd24a7e8af89f7895a20aeddc58502dcbaad03
2021-06-10 14:28:10 +01:00
Paul Duffin
bff50e2b80 Ensure primary boot image files are created before they are used
Previously, when building a framework boot image variant it added an
implicit dependency onto the first file in the primary boot image
variant to ensure that the primary boot image variant files that the
dex2oat command needs have been created. That works when generating
from source as in that case all the files for a boot image variant are
created by a single command. However, it does not work for prebuilts as
each prebuilt file will be copied into the required location by
separate copy commands.

This change adds all the files that the dex2oat command uses implicitly
when building an extension boot image as implicit dependencies.

Bug: 177892522
Test: m SOONG_CONFIG_art_module_source_build=false droid
      - the previous command only works in combination with a number of
        other build changes.
Change-Id: I183748fd17f8f3003890675b8c6bb9fcab331443
2021-06-10 13:40:33 +01:00
Paul Duffin
95d8ad47f0 Maintain header order in merge_csv am: 84c1cdf31f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1731412

Change-Id: I593e0e23c166a1752c5419637579718b6a894232
2021-06-10 11:51:33 +00:00
Paul Duffin
7c47515c7f Make bootclasspath_fragment_sdk_test.go tests more realistic
In the input test fixture this makes sure that every
bootclasspath_fragment is part of an apex and every content module for
the fragment is listed in the appropriate boot jars config property. It
also adds a platform_bootclasspath fragment that references the
fragment.

In the snapshot test fixtures this adds a prebuilt_apex that exports
the fragment so that the platform_bootclasspath has access to the dex
implementation files.

Bug: 177892522
Test: m nothing
Change-Id: I6c73651a359052858232b06229b4433799dd94db
2021-06-10 12:36:44 +01:00
Paul Duffin
dc3f9566a2 Make TestPlatformBootclasspath_Fragments more realistic
Move the bootclasspath_fragment to be part of an apex to match how they
are expected to be used. Also adds the bar library to the boot jars
config as every module in a bootclasspath_fragment that is referenced
from a platform_bootclasspath module is expected to be in the config.

Bug: 179354495
Test: m nothing
Change-Id: I6f826dce9c006d630ee31d4171fe6fb458cc9442
2021-06-10 12:36:43 +01:00
Paul Duffin
ffa8375f07 Move TestPlatformBootclasspath_Fragments to apex package
This test checks that fragments which are referenced from a
platform_bootclasspath module contribute their hidden API flags to those
used by platform_bootclasspath module. Previously, it was unrealistic
because the bootclasspath_fragment does not belong in an APEX.

This change moves the test from the java package to the apex package to
allow it to be modified to make the bootclasspath_fragment part of an
apex.

Bug: 179354495
Test: m nothing
Change-Id: Icb57f2e1eaea4b14aab5f47f3af7d05ea0555816
2021-06-10 12:36:43 +01:00
Paul Duffin
524c82c01a Export hidden api related types and fields
This will export some hidden api related types and fields so they can
be used from outside the java package. This is needed to allow a follow
up change to move the TestPlatformBootclasspath_Fragments from the java
to the apex package.

Bug: 179354495
Test: m nothing
Change-Id: Ib69eea9d79cc83b8e3fc29919a29f071e1ec17b5
2021-06-10 12:36:43 +01:00
Jingwen Chen
3d383bbeb9 bp2build: support strip properties.
This CL adds support to bp2build for generating all strip-related
properties into a strip dictionary as a parameter in the cc_library
macro.

With the dictionary, it's easy to organize related attributes and
directly expand into a stripped_shared_library's attributes.

Test: //build/bazel/tests/bionic:compare_libc_stripping
Test: TH
Fixes: b/187928597
Change-Id: Ifea68d48fe295e71a43b12876cb168c475a62187
2021-06-10 05:22:50 +00:00
Colin Cross
95fad7a56e Always propagate some environment variables to RBE
Always propagate LANG, LC_MESSAGES and PYTHONDONTWRITEBYTECODE
to RBE to get more consistent behavior between local actions and
RBE.

Bug: 182415460
Bug: 190593001
Test: treehugger
Change-Id: I726e6f02fd3ef77e158baf6fde77ffb7247a1375
2021-06-09 15:05:40 -07:00
Liz Kammer
c49e682f37 Handle simple symlinks in mixed builds
Bug: 180945121
Test: build/bazel/ci/mixed_libc.sh
Change-Id: I49fba569a41dcb8cd4c2e58560817443697f58f1
2021-06-09 10:40:32 -04:00
Paul Duffin
84c1cdf31f Maintain header order in merge_csv
Previously, if the --header property was not specified then merge_csv
would use a header constructed by sorting all the fields in the input
files. That required that any use of merge_csv which did not already
have headers in the required order would have to explicitly specify the
headers. That made it harder to use merge_csv as a generic tool as each
invocation needed to be aware of what headers were exported in the
output.

This change causes merge_csv to simply use the headers in the order in
which they are encountered in the input files. That removes the need to
specify the --header option when generating the index files.

Bug: 179354495
Test: m out/soong/hiddenapi/hiddenapi-index.csv out/soong/hiddenapi/hiddenapi-unsupported.csv
      - make sure that they are not changed by this change.
Change-Id: I420b7d07aea85af6372cd7580a8be5e2cc82a513
2021-06-09 14:02:03 +01:00
Jingwen Chen
1d6904e37d Merge "bp2build: build libc.so." am: a4d9b86c8b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1726611

Change-Id: Ibc1397d23f3b033507caf6540b4b38db817b951b
2021-06-09 08:21:14 +00:00
Jingwen Chen
a4d9b86c8b Merge "bp2build: build libc.so." 2021-06-09 08:05:20 +00:00
Treehugger Robot
f026cd57df Merge "Only store what's used in SharedLibraryInfo" am: 75851d2fb6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1730553

Change-Id: I9ef1100bc430cffaa4d44f8a906ee7f41ec4c16b
2021-06-09 06:06:23 +00:00
Treehugger Robot
75851d2fb6 Merge "Only store what's used in SharedLibraryInfo" 2021-06-09 05:49:15 +00:00
Jingwen Chen
e8489563ff bp2build: build libc.so.
Test: TH

Bug: 183064430
Change-Id: Idfcf80b2415c23840d4b4ae9b826cf6f061dbef3
2021-06-09 05:33:40 +00:00
Yuntao Xu
8d87cb0bee Support LOCAL_CERTIFICATE_LINEAGE for androidmk
Added the support of `LOCAL_CERTIFICATE_LINEAGE` for the mk2bp
conversion tool `androidmk`.

Bug: 185169879
Test: rum 'm androidmk'
Test: TreeHugger
Change-Id: I7e89e60be4be26833cac13c911a9b38284a47301
2021-06-08 20:00:47 -07:00
Treehugger Robot
b8e15e1efa Merge "Handle no_libcrt in bp2build." am: f218e3d0c2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1726896

Change-Id: I151f5b6cf987596515fb477419b150795f94cc22
2021-06-09 01:06:43 +00:00
Treehugger Robot
f218e3d0c2 Merge "Handle no_libcrt in bp2build." 2021-06-09 00:48:06 +00:00
Jooyung Han
e6ef49cb51 Merge "Interpret CRT object's min_sdk_version with ApiLevel" am: 7f6e057f23
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1730110

Change-Id: I1e2f8d02978775d5997b6b569538491257873223
2021-06-09 00:30:26 +00:00
Jooyung Han
7f6e057f23 Merge "Interpret CRT object's min_sdk_version with ApiLevel" 2021-06-09 00:07:29 +00:00
Liz Kammer
d366c909ca Handle no_libcrt in bp2build.
Test: ci/bp2build.sh
Bug: 187928307
Change-Id: Ib80c4318169652b322e5d878c8784679e42f87dd
2021-06-08 17:18:22 -04:00
Spandan Das
88e79319fd Merge "Port module_partition logic for RRO from Make to Soong" am: 05f1a0a795
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1726898

Change-Id: Id93d970cb76efb3625dc0a4f1bede88f5cb4dc68
2021-06-08 21:00:38 +00:00
Liz Kammer
ef6dfea679 Only store what's used in SharedLibraryInfo
There was a reference to the static library provider, but only the
transitive static deps were used, so only store that part. Other members
were stored but unused anywhere.

Test: go test soong tests
Test: m nothing
Change-Id: I12a6b94806c052c3f0df3cab0a10f17042af1c38
2021-06-08 16:44:23 -04:00
Spandan Das
05f1a0a795 Merge "Port module_partition logic for RRO from Make to Soong" 2021-06-08 20:41:45 +00:00