Commit Graph

6123 Commits

Author SHA1 Message Date
Colin Cross
e3b91dc7fb Merge changes I02fb745a,Iccc96c0d am: a24b9deb5f am: 094956cf00
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1378536

Change-Id: I8a434610d1869e30a853208d974a16196aa9e884
2020-08-13 22:28:35 +00:00
Colin Cross
a24b9deb5f Merge changes I02fb745a,Iccc96c0d
* changes:
  Follow all shared library dependencies when collecting JNI libraries
  Handle static unwinder in ltoDepsMutator
2020-08-13 21:55:53 +00:00
Treehugger Robot
45d8c7af88 Merge "Improve abidump generating logic for non-REL build" am: 29737cfc94 am: 0c8d7c6958
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1374297

Change-Id: Ie89168b98e3de295a3c59da3d0e3d6b92bf3d9a4
2020-08-13 12:34:06 +00:00
Treehugger Robot
29737cfc94 Merge "Improve abidump generating logic for non-REL build" 2020-08-13 11:53:05 +00:00
Treehugger Robot
ec8f7940e8 Merge changes I514b90ae,Ie477de70 am: d59540234c am: 8acd131453
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1378334

Change-Id: Ic192d891e33f1efc806a031bd2e8e65920758bb1
2020-08-13 05:29:05 +00:00
Treehugger Robot
d59540234c Merge changes I514b90ae,Ie477de70
* changes:
  Fix DepsInSameApex for some dependencies of static libraries
  Expose all shared and header libraries to Make
2020-08-13 05:01:17 +00:00
Treehugger Robot
fc7baeb866 Merge "Stop using prebuilt NDK CRT objects." am: 50a58067e6 am: 52b4132004
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1363344

Change-Id: I0aaa0a1664f696c712bdf260663bf4b4648aea9c
2020-08-12 22:33:47 +00:00
Treehugger Robot
50a58067e6 Merge "Stop using prebuilt NDK CRT objects." 2020-08-12 22:01:27 +00:00
Dan Willemsen
9e2fd0fab6 Merge "Remove M4 export to Make" am: a6ba0d2a4c am: 50e7c7f0c6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1393489

Change-Id: Ib23151fb899979a7bd168346dd3603e69b8e6f33
2020-08-12 15:17:56 +00:00
Dan Willemsen
a6ba0d2a4c Merge "Remove M4 export to Make" 2020-08-12 14:48:08 +00:00
Kousik Kumar
a2499e0f42 Merge "Add remote execution support for clang-tidy actions" am: 20cccd2e95 am: deab08e664
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1343716

Change-Id: Ic5625a1466a25ee49fe511974ee5828ae78fc146
2020-08-12 14:25:56 +00:00
Kousik Kumar
20cccd2e95 Merge "Add remote execution support for clang-tidy actions" 2020-08-12 13:46:10 +00:00
Dan Albert
92fe740677 Stop using prebuilt NDK CRT objects.
We don't need the prebuilt versions. The NDK CRT objects are (now)
built from the platform sources and the only difference is that the
NDK CRT objects also include an ELF note that identifies the NDK
version, which isn't helpful for anything built by the platform.

Add a `crt` property to cc_object that allows CRT objects to identify
themselves. CRT objects, unlike other modules, will have a variant
built per-API level they support, rather than just an SDK variant and
a platform variant. This is needed because new CRT objects will rely
on APIs not available in old libcs and old CRT objects will not
support all the features of a modern one.

Test: treehugger
Bug: http://b/159925977
Change-Id: I6595485fa1bfe0ad4945193d344b863f64eec654
2020-08-11 15:06:55 -07:00
Pirama Arumuga Nainar
d8952eee43 Merge "[cc/sanitize] Deprecate blacklist sub-property of sanitize" am: 84ce8d8d89 am: eb037766bb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1383562

Change-Id: I246c18861220971e057047e00d43195f791c5c82
2020-08-11 21:59:10 +00:00
Pirama Arumuga Nainar
84ce8d8d89 Merge "[cc/sanitize] Deprecate blacklist sub-property of sanitize" 2020-08-11 21:24:16 +00:00
Dan Willemsen
9f43597ff7 Remove obsolete PDK build functionality
This hasn't worked for a couple years, and continues to bitrot. Just
remove it.

Adds a bpfix rule so that we can eventually remove the
product_variables.pdk definition, which is now always a no-op.

Test: treehugger
Change-Id: I830b54d419b59f6db1d4617b45e61a78234f57a7
Merged-In: I830b54d419b59f6db1d4617b45e61a78234f57a7
2020-08-11 01:11:44 +00:00
Dan Willemsen
ba3876a91a Remove obsolete PDK build functionality
This hasn't worked for a couple years, and continues to bitrot. Just
remove it.

Adds a bpfix rule so that we can eventually remove the
product_variables.pdk definition, which is now always a no-op.

Test: treehugger
Change-Id: I830b54d419b59f6db1d4617b45e61a78234f57a7
2020-08-10 18:10:38 -07:00
Jeongik Cha
ec87b5c85a Merge "Introduce AlwaysUsePrebuiltSdks" am: 6df337255c am: 497158434d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1356666

Change-Id: I92deaf13c3c7c7ae684bd11d5bd5d575d264bfb1
2020-08-10 01:25:06 +00:00
Jeongik Cha
6df337255c Merge "Introduce AlwaysUsePrebuiltSdks" 2020-08-10 00:51:56 +00:00
Treehugger Robot
86368fbc85 Merge changes Icec57d43,Ibb030cc4 am: 0dc67ceee9 am: 7b9906a420
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1392891

Change-Id: I39fe17ee07fead3b1ddab4048487923004d46b08
2020-08-08 00:50:18 +00:00
Treehugger Robot
0dc67ceee9 Merge changes Icec57d43,Ibb030cc4
* changes:
  Add alias variations to linkageMutator
  Use local variations for versionsMutator
2020-08-08 00:24:03 +00:00
Dan Willemsen
678ae27cfa Remove M4 export to Make
This is now handled by a prebuilt_build_tool entry.

Test: treehugger
Change-Id: Ia746d5b274a897db0cd9e6ddac5f8923bca8e52c
2020-08-07 13:45:45 -07:00
Martin Stjernholm
23b0343a00 Merge "Only output make targets for uninstallable static libs in the APEX unavailable-to-platform case." am: 9f381d5ce3 am: 0be556121d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1393187

Change-Id: Ie961e81a936ff5cd2e60af10bf2c9168334e9789
2020-08-07 11:49:27 +00:00
Martin Stjernholm
9f381d5ce3 Merge "Only output make targets for uninstallable static libs in the APEX unavailable-to-platform case." 2020-08-07 11:30:29 +00:00
Jeongik Cha
816a23a50d Introduce AlwaysUsePrebuiltSdks
Instead of UnbundledBuild, use AlwaysUsePrebuiltSdks
to determine if java modules needs to be built against prebuilt sdks.
And rename UnbundledBuildUsePrebuiltSdks to AlwaysUsePrebuiltSdks to
express its behavior more correctly.(It can be orthgonal to "Unbundled")

Bug: 160390776
Test: TARGET_BUILD_UNBUNDLED_IMAGE=true m vendorimage

Change-Id: I0be7265c1959d8774c295372cd7a9250169f6df9
2020-08-07 12:15:52 +09:00
Inseob Kim
f548722a2f Merge changes from topic "cfi_vendor_snapshot" am: eaebec1312 am: 7fe143638d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1376079

Change-Id: I508f888fba0681b660cdc5ccf08be7fdafc68db9
2020-08-07 02:53:50 +00:00
Inseob Kim
fee1e81223 Refactor vendor snapshot modules am: 2d34ad94f9 am: 9e6f024ad5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1382316

Change-Id: I127b86d4dc32d043c5b73ec1246a37ccc6f6f59e
2020-08-07 02:53:48 +00:00
Inseob Kim
9e6f024ad5 Refactor vendor snapshot modules am: 2d34ad94f9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1382316

Change-Id: Ia367878b6de80b123d680a74073c1cd63a841c55
2020-08-07 02:43:46 +00:00
Inseob Kim
eaebec1312 Merge changes from topic "cfi_vendor_snapshot"
* changes:
  Add cfi static libraries to vendor snapshot
  Refactor vendor snapshot modules
2020-08-07 01:48:10 +00:00
Colin Cross
81ca6cd407 Add alias variations to linkageMutator
Alias the shared variation if it exists, otherwise the static variation.
This allows modules that are not aware of shared library variations
(like cc_genrule) to depend on shared libraries by depending on
just the normal image, os and arch variations.

Bug: 162437057
Test: TestLibraryGenruleCmd
Change-Id: Icec57d43538e01ab05cc50d4e3f9a11cc55f0162
2020-08-06 18:46:06 -07:00
Colin Cross
094faa5b26 Use local variations for versionsMutator
Use local variations and an alias for the "" variation for
versionMutator.  Local variations are used here because the variation
of one module doesn't affect the variation it should depend on - a
module with variation version:29 will manually link against dependencies
with the correct version variation, and don't need it to be automatically
resolved.  The alias allows other modules to depend on a module
mutated by the version mutator without specifying the version: ""
variation.  This allows removing the variation on genrule modules.

The motiviation here is to make sure versionMutator calls AliasVariation,
which will allow the previous linkageMutator to also use AliasVariation.

Bug: 162437057
Test: no change to build.ninja, make_vars-aosp_crosshatch.mk, Android-aosp_crosshatch.mk or late-aosp_crosshatch.mk
Change-Id: Ibb030cc4334e47511b8ab5bc3eb8a5ae39ad0023
2020-08-06 18:46:06 -07:00
Mitch Phillips
7d519caa19 Merge "Added write only sanitizer for ASAN and HWASAN" am: 8dc2af873b am: 0ae16213d9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1372178

Change-Id: I6f1604109cf23d6c5e9a3e06fd9f603dbbcbbfe5
2020-08-06 22:06:30 +00:00
Martin Stjernholm
9e9bb7f223 Only output make targets for uninstallable static libs in the APEX
unavailable-to-platform case.

This removes the special case added in https://r.android.com/1274763
from SkipInstall(), so that it doesn't cause conflicting AndroidMk
entries when a cc_prebuilt_library_static module has prefer:true and
the corresponding source module exists.

Test: `m` in a tree with a snapshot created from art-module-sdk where
  the libartimagevalues module has prefer:true
Bug: 151303681
Change-Id: I651ae325753b707296892adb4cae80daaddb6af2
2020-08-06 22:52:58 +01:00
Mitch Phillips
8dc2af873b Merge "Added write only sanitizer for ASAN and HWASAN" 2020-08-06 21:17:12 +00:00
Inseob Kim
c42f2f2e9d Add cfi static libraries to vendor snapshot
CFI modules can't link against non-CFI static libraries, and vice versa.
So without capturing both CFI and non-CFI static libraries, vendor
modules won't be able to use CFI, which will be a critical security
hole.

This captures both CFI and non-CFI variants of all static libraries for
vendor snapshot, except for those whose cfi are explicitly disabled.

For example, suppose that "libfoo" is defined as follows.

cc_library_static {
    name: "libfoo",
    vendor_available: true,
}

As it doesn't have cfi disabled, two libraries "libfoo.a" and
"libfoo.cfi.a" will be captured. When installed, vendor snapshot module
for "libfoo" will look like:

vendor_snapshot_static {
    name: "libfoo",
    src: "libfoo.a",
    cfi: {
        src: "libfoo.cfi.a",
    },
}

The build system will recognize the "cfi" property, and will create both
CFI and non-CFI variant, allowing any modules to link against "libfoo"
safely, no matter whether CFI is enabled or not.

Two clarification:

1) The reason why we don't create separate modules is that DepsMutator
runs before sanitize mutators. CFI and non-CFI variant of a library
should exist in a single module.

2) We can't capture CFI variant if the source module explicitly disables
cfi variant by specifying the following.

sanitize: {
    cfi: false,
}

In this case, only non-CFI variant will be created for the vendor
snapshot module.

Bug: 65377115
Test: m dist vendor-snapshot && install && build against snapshot
Change-Id: Idbf3e3205d581800d6093c8d6cf6152374129ba4
2020-08-06 19:47:57 +00:00
Inseob Kim
2d34ad94f9 Refactor vendor snapshot modules
They have too many duplicated fields and functions.

Bug: 65377115
Test: manual
Change-Id: If3e2d67f02f3db7fa836c9550c978073ab7190e0
2020-08-06 19:47:43 +00:00
Treehugger Robot
c05a50cd13 Merge changes from topic "soong_sanitize_fix" am: 8c69770ff0 am: d044e8452f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1385288

Change-Id: Idfea297586f77817bf3490f04306d81b6a679969
2020-08-06 16:03:09 +00:00
Inseob Kim
8aabdc5833 Move image mutator things to image.go am: e498dd9ac3 am: 9803127f58
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1387116

Change-Id: I29ac3ed0baaafa2607f5b9187d5cd966f10da935
2020-08-06 16:03:06 +00:00
Colin Cross
7f034dabf1 Merge "Add libraryDependencyTag to track dependencies on static and shared libraries" am: 2eddd06879 am: f6c453a3fd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1378332

Change-Id: I20996cc0ed388013f24966a2d8a9462177bfe45e
2020-08-06 13:12:06 +00:00
Treehugger Robot
39cf5cf1ef Merge "[cc/coverage] Pass directory to -fprofile-instr-generate" am: cf187bcbbc am: 0c5157f2e6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1391163

Change-Id: Iac987ca6a71ca82d719035933eea711ad80c89c7
2020-08-06 13:11:39 +00:00
Bill Peckham
f1e4bb23bb Merge "Adds 'kernel/' to vendor proprietary dirs." am: 6ed589039c am: 25bd47b9fa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1387788

Change-Id: I4a35c4b9c267f23ababe67e349a333431bad53d0
2020-08-06 13:10:59 +00:00
Martin Stjernholm
e5949952fb Merge "Disable all host OS variants except those explicitly included." am: 42e6dabe81 am: 41bca360c6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1360541

Change-Id: I24f6af9a61230da29603112275a1727253ddb994
2020-08-06 13:10:46 +00:00
Yo Chiang
eb912dcce8 Improve abidump generating logic for non-REL build
Optimize build by removing redundant edges from the dependency graph.
After this change abidump files (.sdump, .lsdump, .abidiff) are built
only if (1) building phony target `findlsdumps` or (2) reference dump
is present under prebuilts/, which is the case for REL branches.

This improves the build time by 1.5 minutes on my machine.

Also remove HEADER_ABI_DIFFS because it has no user anymore.

Bug: 162301547
Test: (on master) m && .sdump and .lsdump is not generated
Test: (on REL br) m && .sdump, .lsdump and .abidiff are generated
Change-Id: Ie040371d8fd57f91ec6f0cd4d37483167ef9c445
2020-08-06 09:04:45 +00:00
Inseob Kim
9803127f58 Move image mutator things to image.go am: e498dd9ac3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1387116

Change-Id: I634265c598700fc1f7c6c91bf59669bbd5444625
2020-08-06 01:08:06 +00:00
Treehugger Robot
8c69770ff0 Merge changes from topic "soong_sanitize_fix"
* changes:
  Separate lists of soong sanitize modules
  Move image mutator things to image.go
2020-08-06 00:48:16 +00:00
Colin Cross
2eddd06879 Merge "Add libraryDependencyTag to track dependencies on static and shared libraries" 2020-08-06 00:06:28 +00:00
Treehugger Robot
cf187bcbbc Merge "[cc/coverage] Pass directory to -fprofile-instr-generate" 2020-08-05 23:10:00 +00:00
Bill Peckham
6ed589039c Merge "Adds 'kernel/' to vendor proprietary dirs." 2020-08-05 18:14:52 +00:00
Pirama Arumuga Nainar
f45e152e15 [cc/coverage] Pass directory to -fprofile-instr-generate
Bug: http://b/157081822

This will be used if LLVM_PROFILE_FILE is not set at runtime.  Some
bionic tests are run without LLVM_PROFILE_FILE set and if they are run
from '/', they fail unable to write to '/default.profraw'.  This may
affect other tests as well.  Setting this to the value defined by
init.rc.

Test: Enable coverage for bionic, ensure relevant bionic-unit-tests
pass.

Change-Id: If1d0e16ce003149fb21d5472d10699ef6582e065
2020-08-05 10:23:07 -07:00
Inseob Kim
74d255698b Separate lists of soong sanitize modules
Dependencies of makefile modules are being redirected according to
SOONG_CFI_STATIC_LIBRARIES and SOONG_HWASAN_STATIC_LIBRARIES. But the
variables are shared among all variants (e.g. core, vendor, product,
arch), which can cause build error.

This splits the Makefile variables into several lists, one list per each
arch and each image variant, to correctly make the redirection.

Bug: 162476652
Test: build and inspect ninja
Change-Id: Icc753382f1c53de8468cc85243a6954e1986297a
2020-08-05 04:47:41 +00:00