Commit Graph

5788 Commits

Author SHA1 Message Date
Colin Cross 77cdcfdeaf Move android package on top of remotexec
Remove the references to the android package in remotexec so that
the android package can reference the remoteexec package.  This
will allow RuleBuilder to integrate directly with remoteexec.

Bug: 182612695
Test: m checkbuild
Change-Id: I15be5ef126d8aacbd605518638f341daf6f31bb3
2021-03-18 16:17:34 -07:00
Jingwen Chen c7846f38fa bp2build: cc_library_headers converter should only include that module type
Test: bp2build; bazel build //bionic/...
Change-Id: I34768b51098c5b801e7c6d9b3a95ec0f37c3bb09
2021-03-18 18:35:39 -04:00
Colin Cross ecd91c9ffa Add explicit rspfile argument to RuleBuilderCommand.FlagWithRspFileInputList am: 70c4741215 am: 37225a7b05 am: 27a4326c78
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1634804

Change-Id: I6a33941387ce9d6054c49f61b41d4f9a4b911e36
2021-03-17 22:21:53 +00:00
Liz Kammer a801072f60 Merge "Temporarily disable cc_objects in mixed builds" am: 39d3830205 am: f84f690929 am: f0946b0715
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1640582

Change-Id: I21f5c94906565d2f712199a0cc9826b1b8c35935
2021-03-17 16:19:39 +00:00
Liz Kammer 16d355ac92 Merge changes from topic "mixed-bp2build" am: a5f86249a4 am: 2b6af78207 am: dd93334831
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1607554

Change-Id: Iff4681eca0b887c43f7faccf2e1418671a2f2088
2021-03-17 16:19:36 +00:00
Christopher Parsons 944c00991a Merge "Refactor and cleanup of cquery processing" am: bc3f7e0276 am: 70f670df1a am: 8e0d430822
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1629139

Change-Id: I08f029d182ef715b64ca5c40944709691a959ad6
2021-03-17 16:18:52 +00:00
Justin DeMartino 89bcfecf6a Merge "Allow extending of the list of directories to be scanned for VSDK" am: dd1decf7f6 am: e7c7a5e8d6 am: 1bbe7b54ec
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1603623

Change-Id: I749bf59c09bc250e342953b4760695408aa8b513
2021-03-17 16:18:07 +00:00
Colin Cross 70c4741215 Add explicit rspfile argument to RuleBuilderCommand.FlagWithRspFileInputList
Using $out.rsp as the rsp file adds extra complexity around keeping
the $ unescaped.  Make callers to FlagWithRspFileInputList provide
an explicit path for the rsp file instead.

Bug: 182612695
Test: rule_builder_test.go
Change-Id: I3f531d80c1efa8a9d09aac0a63790c5b11a9f0c6
2021-03-16 16:52:56 -07:00
Liz Kammer 39d3830205 Merge "Temporarily disable cc_objects in mixed builds" 2021-03-16 21:40:04 +00:00
Liz Kammer a5f86249a4 Merge changes from topic "mixed-bp2build"
* changes:
  Support autoconverted modules in mixed builds
  Use handcrafted build targets in bp2build
2021-03-16 21:40:04 +00:00
Christopher Parsons bc3f7e0276 Merge "Refactor and cleanup of cquery processing" 2021-03-16 21:12:01 +00:00
Liz Kammer bdc609972c Support autoconverted modules in mixed builds
modules converted with bp2build_available are will also be available to
be used in mixed builds.

Test: build/bazel/scripts/milestone-2/demo.sh full
Test: go tests
Change-Id: I49f16ec3ba5bb11dfed8066af069c27eb04371fb
2021-03-16 15:11:49 -04:00
Chris Parsons 944e7d01aa Refactor and cleanup of cquery processing
Test: USE_BAZEL_ANALYSIS=1 m libc
Change-Id: Iaf9a92e84d39c132e2444a8aaafd79505a12b8ec
2021-03-16 14:39:16 -04:00
Liz Kammer 57355683d4 Temporarily disable cc_objects in mixed builds
Bug: 181794963
Test: generate bp2build targets and run mixed builds
Change-Id: If4562fe8ed7bde88141b40166eca9d01f6538106
2021-03-16 13:34:48 -04:00
Justin DeMartino 383bfb392f Allow extending of the list of directories to be scanned for VSDK
Bug: 180925851
Bug: 181564692
Test: m nothing, manually
Change-Id: Ifff95db4c9ec362322fecca08f7fd1a7b60755c0
2021-03-15 23:14:47 +00:00
Justin Yun 13decfb0bb Define __ANDROID_VENDOR__ and __ANDROID_PRODUCT__
__ANDROID_VNDK__ is defined for the modules that are able to use the
VNDK libraries. As both product and vendor variants define
__ANDROID_VNDK__, we don't know if a module is built for vendor or
product on build time.

__ANDROID_VENDOR__ and __ANDROID_PRODUCT__ macros can be used to
specify the image-variant-dependent codes.

Bug: 180646847
Test: m nothing
Change-Id: Id6c3e1e3d47deaf3684c0c02964718658cf2fec5
2021-03-15 17:28:59 +09:00
Paul Duffin 1b511a9f47 Migrate from result methods to function Asserts am: e84b1338c5 am: 37e8d92321 am: b364e7b212
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1629626

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic7f8e38989f273939aea30427ba61bdf88043e99
2021-03-13 03:48:12 +00:00
Paul Duffin e84b1338c5 Migrate from result methods to function Asserts
Bug: 181070625
Test: m nothing
Change-Id: Iadb85270290acb52c55f2ad70c9f145f1c34b611
2021-03-12 22:24:51 +00:00
Cindy Zhou 370fc523a8 Merge "Enable cfi for 32bit arch" am: 34d300ba76 am: 809e91cf12 am: 87075e20e7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1570600

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ide322a8fbcce16b1382cf0eacfc18ad4f5bba8f9
2021-03-12 13:47:22 +00:00
Cindy Zhou 34d300ba76 Merge "Enable cfi for 32bit arch" 2021-03-12 12:41:39 +00:00
Paul Duffin 24963ea1e3 Merge "Prevent mock filesystem files being overridden by accident" am: 412a209d87 am: a517bddd85 am: 53b805d276
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1629639

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If124e77a419bc9d1b9416187263a88aefb28874c
2021-03-12 09:44:20 +00:00
Paul Duffin 412a209d87 Merge "Prevent mock filesystem files being overridden by accident" 2021-03-12 08:04:43 +00:00
Paul Duffin f2d55024bb Merge "Convert cc/prebuilt_test.go to use fixtures" am: f11bced30b am: e70de62af3 am: 8c0ee2d8ce
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1626515

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib741c9ce6a2b10021960fa25dee42ae24d0069cb
2021-03-12 00:09:21 +00:00
Paul Duffin efa480f650 Merge changes I6b408d44,I7e57c978 am: d7bbeffe0e am: 7ac41ea830 am: e447d4d0ee
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1626514

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibee3298948c2c842788442c53ba7125ecd61c54f
2021-03-12 00:09:15 +00:00
Paul Duffin f11bced30b Merge "Convert cc/prebuilt_test.go to use fixtures" 2021-03-11 21:58:39 +00:00
Paul Duffin d7bbeffe0e Merge changes I6b408d44,I7e57c978
* changes:
  Add preparer for test to use AndroidMk
  Convert cc/cc_test.go tests that use CreateTestContext to fixtures
2021-03-11 21:58:14 +00:00
Paul Duffin 6e9a4007b5 Prevent mock filesystem files being overridden by accident
Bug: 181070625
Test: m nothing
Change-Id: Ib12b5cbe9af980706620d7d7d85bcfe31f36b07f
2021-03-11 19:21:12 +00:00
Christopher Parsons 3a642e2800 Merge "mixed builds for cc_static_library without deps" am: 2bed9ffaf4 am: a86985e40a am: 3cb7e6bd83
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1625068

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iddbc0f04dec0faeb70f5ccfe694dd3deaa65cb61
2021-03-11 15:46:38 +00:00
Paul Duffin 73bfe21a62 Merge "Convert fuchsia tests to use test fixtures" am: 4e1916011c am: 3dbfef078e am: 9225cc2bf9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1626509

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic1b047130460625a91c636c8e2aa516bcbbf35f3
2021-03-11 15:45:03 +00:00
Christopher Parsons 2bed9ffaf4 Merge "mixed builds for cc_static_library without deps" 2021-03-11 15:11:44 +00:00
Paul Duffin 6a1160e749 Convert cc/prebuilt_test.go to use fixtures
Bug: 181070625
Test: m nothing
Change-Id: I6048812962382e2adaf79d941a24e5c0ffdd9b25
2021-03-11 15:04:43 +00:00
Paul Duffin 7d8a8ad0d1 Convert cc/cc_test.go tests that use CreateTestContext to fixtures
Bug: 181070625
Test: m nothing
Change-Id: I7e57c978fa07ee8c0f35d567753751bd7b128b1e
2021-03-11 15:04:39 +00:00
Paul Duffin 4e1916011c Merge "Convert fuchsia tests to use test fixtures" 2021-03-11 14:07:01 +00:00
Lukacs T. Berki 778c31d32f Hard-wire the path to xcrun as /usr/bin/xcrun. am: 21d5c7aaa9 am: 8f23c72f9e am: 177e95d4d6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1626516

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I980be00ea77f4423ff04f4c44b03391aef94d735
2021-03-11 12:38:50 +00:00
Lukacs T. Berki 21d5c7aaa9 Hard-wire the path to xcrun as /usr/bin/xcrun.
This lets us not leak $PATH to soong_build. It was only needed for
Darwin tests anyway.

Test: Will ask jingwen@ who has a Mac.
Change-Id: I4647e41275b323fe6283580f8f92718c6229f23e
2021-03-11 08:52:39 +01:00
Paul Duffin ecdac8a6d6 Convert fuchsia tests to use test fixtures
Bug: 181070625
Test: m nothing
Change-Id: Ic2b86f7c603ff1c4b48884cb58908db536d98f37
2021-03-11 07:26:11 +00:00
Treehugger Robot 3ccb6af0e7 Merge "AIDEGen: Add "-fprofile-sample-use" parameter into category." am: b3d6edd6c0 am: d32045e2f3 am: 0a74edc095
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1620690

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I390e6a4e1024d7343b4baa527f10b258b6f7e2a8
2021-03-11 06:30:59 +00:00
Treehugger Robot b3d6edd6c0 Merge "AIDEGen: Add "-fprofile-sample-use" parameter into category." 2021-03-11 04:34:02 +00:00
Cindy Zhou e0c14678d4 Enable cfi for 32bit arch
Enabling cfi for 32-bit arch; b/35157333 seems to have been resolved in b/67507331.

Bug: 158010610

Test: manual interaction with Wimbley device: youtube video, chrome
navigations, gmail
MPTS testing on Sargo
Change-Id: I9eb034deed9938710f0f7b690fa57108d9bc5669

Change-Id: I434748ede352f998e64a6639de6ba162762ee7f0
2021-03-10 17:14:02 -08:00
Paul Duffin 0416343c5b Merge changes Ib2c6ac28,I7c76ed6d,I00415f10,I4be2a16c,I6f269c9c, ... am: 67e848ab04 am: 07d76a4ec2 am: 020cd977dc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1625385

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9535f62f41e12d1c09c0173d6ece58abede67945
2021-03-10 23:57:35 +00:00
Chris Parsons 808d84c45d mixed builds for cc_static_library without deps
Test: Manual mixed builds testing of `libc` target with manually
migrated "libc_nopthread" and "libc_init_dynamic".

Change-Id: If7d67e95eca9899271b1eeb662c7c2e571f64afa
2021-03-10 13:24:59 -05:00
Paul Duffin 02a3d65402 Support test fixtures in cc package
Restructures the cc package test setup code to create FixturePreparer
instances for setting up a test fixture and converts some tests to
use it.

The goal with this change is not to switch all the cc tests over to
directly using the new model but instead to ensure that the majority of
the cc tests run with the new model, to allow existing tests to easily
switch to the new model when needed and to allow dependent packages to
be switched to the new model.

Bug: 181070625
Test: m nothing
Change-Id: I00415f10fb44c1b9e78e1317e7f50bb61984d3a4
2021-03-09 23:06:00 +00:00
bralee c117f6fc00 AIDEGen: Add "-fprofile-sample-use" parameter into category.
"-fprofile-sample-use" parameter needs to be added to
categorizeParameter function.

Bug: 181817731
Test: 1. aidegen -a -i c art build bootable frameworks/base/core libnativehelper external/protobuf external/gflags external/googletest hardware/interfaces/health packages/modules/Gki system/apex system/core/fastboot system/core/fs_mgr system/core/healthd system/core/init system/core/libbinderwrapper system/core/libcutils system/core/liblog system/core/libprocessgroup system/core/libutils system/core/property_service system/core/rootdir system/core/storaged system/extras system/gsid system/hwservicemanager system/libbase system/libhidl system/libhwbinder system/libvintf system/sepolicy system/update_engine test tools
      2. CLion launched without errors in 'CMake' tag.
Change-Id: I4e9b0fd19fe00d23a9aa535b1ab7ade9c4a46f69
2021-03-08 09:33:23 +08:00
Paul Duffin 381bd33c04 Merge "Fix build break caused by registering genrules twice" am: 6d3e726887 am: bbb10d2452 am: 6ce4598e3c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1621418

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8970e441a817db83cbf64623954e51c814cf4ada
2021-03-06 11:53:35 +00:00
Paul Duffin cdcd2be1ff Fix build break caused by registering genrules twice
Two separate changes that passed presubmits separately and did not
conflict when merged together unfortunately clashed at runtime. The
changes are:
* Ic00c7e480dc738d7a88d038aca6ab95a1502a24a
* Ic98fdc29a63155174a3227e7e918b26f0a8763bb

Test: m nothing
Change-Id: I7b5704c22cc2ea2095f5fb92c59f0526bb445f13
2021-03-06 10:03:22 +00:00
Paul Duffin 8d74783b41 Merge "Clean up cc.RegisterRequiredBuildComponentsForTest()" am: 0805d4ebdd am: b6ae322278 am: 1f50ff0df6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1621414

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I22877e0de75fbb1f4899fad3081418acf3b6df74
2021-03-06 09:56:58 +00:00
Paul Duffin 1c58ce4a52 Merge "Fix mutator ordering issue in apex tests" am: 97c8128eea am: d8033e1d26 am: e672daac6b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1621415

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifa3b28737bcf55fb5ccda37e3e4dec4973cf8e34
2021-03-06 09:56:43 +00:00
Paul Duffin 0805d4ebdd Merge "Clean up cc.RegisterRequiredBuildComponentsForTest()" 2021-03-06 08:43:56 +00:00
Paul Duffin 6d119b804c Fix mutator ordering issue in apex tests
Previously, the override mutators were being run before the prebuilt
mutators that did not match the runtime behavior. This change fixes
that ordering.

In the process it broke TestApexWithAppImportsPrefer. That test tries
to verify that an apex that depends on an android_app will use an
android_app_import if that is preferred. Unfortunately, it only worked
because of the incorrect order of the mutators.

The test worked before this change because the prebuilt mutators were
being run after the overridableModuleDepsMutator. That meant that any
dependencies added by that mutator onto source modules could be
replaced by the PrebuiltPostDepsMutator with the preferred prebuilt
module.

Switching the order to match the runtime meant that the prebuilt
mutators were run before the overrides so never had a chance to replace
the dependencies added by the overrides.

Bug: 181953909
Bug: 181974714
Test: m nothing
Change-Id: Ic98fdc29a63155174a3227e7e918b26f0a8763bb
2021-03-05 18:38:58 +00:00
Paul Duffin d6ceb8600c Clean up cc.RegisterRequiredBuildComponentsForTest()
Changes this function so it only registers components from the cc
package by pushing the call to genrule.RegisterGenruleBuildComponents()
down into those packages whose tests need it.

This will make it easier to migrate cc package tests to test fixtures
as the RegisterRequiredBuildComponentsForTest() no longer overlaps with
preparers from the genrule packages.

Bug: 181070625
Test: m nothing
Change-Id: Ic00c7e480dc738d7a88d038aca6ab95a1502a24a
2021-03-05 18:20:33 +00:00
Treehugger Robot 5921172be1 Merge "Remove Abseil checks from clang-tidy defaults." am: 636d152e08 am: 93a58aaf37 am: d39700c648
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1612584

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idedbaae3e0b5b4777503107de5950b17784239a2
2021-03-03 00:23:58 +00:00
Christopher Parsons 3bc0783320 Merge "Support cc_object modules in mixed builds" am: bc39e17a1d am: 218cf3dec6 am: cd4dcdda18
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1599675

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2609ec4b223d49d5312bb44ae05b01eefe38a023
2021-03-03 00:23:46 +00:00
Paul Duffin 0b0921a808 Merge "Remove deapexer and prebuilt apex select mutators" am: 4b786d2da1 am: 0630dacc0c am: 9d697b3d94
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1610795

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4670d011f304c943cc6156312b0154e9236ca08f
2021-03-03 00:23:03 +00:00
Treehugger Robot 636d152e08 Merge "Remove Abseil checks from clang-tidy defaults." 2021-03-02 20:22:14 +00:00
Christopher Parsons bc39e17a1d Merge "Support cc_object modules in mixed builds" 2021-03-02 16:44:56 +00:00
Paul Duffin 4b786d2da1 Merge "Remove deapexer and prebuilt apex select mutators" 2021-03-02 10:48:29 +00:00
Treehugger Robot b8b4d74d37 Merge "APEX uses the latest version of the stub" am: ce80f18749 am: 3310e2d9ea am: 803eece603
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609533

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic9355035dd83782c478a12fb16a5896c50968a58
2021-03-02 03:10:43 +00:00
Treehugger Robot ce80f18749 Merge "APEX uses the latest version of the stub" 2021-03-02 01:02:18 +00:00
Chris Parsons 8d6e433c1e Support cc_object modules in mixed builds
Test: With a handwritten conversion of crtbegin_so1, USE_BAZEL_ANALYSIS=1 m crtbegin_so1
Change-Id: I7c777d7f46b37aa1827cc04205e2014f9293bf35
2021-03-01 18:22:34 -05:00
Krzysztof Kosiński a3014f1c13 Remove Abseil checks from clang-tidy defaults.
Abseil is not available in Android, so these checks are not
actionable.

Test: Compiled frameworks/av, no more spurious warnings.
Change-Id: Ic573a3234a99b0fa1f63449e8d020a17a43a134c
2021-03-01 13:25:03 -08:00
Paul Duffin c04fb9e6a2 Remove deapexer and prebuilt apex select mutators
Originally, when the prebuilt_apex was first created, it selected the
source to use in its DepsMutator. It did that because that was a
convenient place for it to perform that work which had to be:
* After the arch mutator had run so MultiTargets() was available.
* Before the prebuilt_select mutator runs as that relied on the Source
  property to have been set.

Change 064b70c9 then duplicated the call from the DepsMutator of the
deapexer module type that was added as part of the work to make dex
files available for hiddenapi processing.

Change 356f7d45 moved it out of the the DepsMutator methods into its
their own mutators, presumably because it interfered with the
Soong -> Bazel conversion work.

This change improves the existing PrebuiltSrcsSupplier mechanism to
support reporting errors so that the logic for selecting the source can
be done on demand rather than in separate mutators.

The main complication was that PrebuiltSrcsSupplier is called with a
BaseModuleContext for both source and prebuilt modules so it cannot use
any methods on it that are related to the current module. That
necessitated adding MultiTargets() to android.Module.

Bug: 181267622
Test: m droid
Change-Id: I106c78fd21016f051a315b82b470d8f12b1f820b
2021-03-01 17:11:25 +00:00
Jingwen Chen 713cff84de Merge "bp2build: add configurable attribute (select) support." am: 37bd24a1db am: 1c65191027 am: f28de7434b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1603778

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iafe936decfc711746a17c4a6348c141654b60fc0
2021-03-01 16:05:08 +00:00
Jingwen Chen 37bd24a1db Merge "bp2build: add configurable attribute (select) support." 2021-03-01 13:43:55 +00:00
Jiyong Park 55549df051 APEX uses the latest version of the stub
Previously when an APEX whose min_sdk_version is set is linked to an
external library providing multiple versions of stubs, the
maximum version that is less than or equal to the min_sdk_version was
chosen. For example, if the versions of a library stubs are 28, 29, 30,
and 31, then APEX with min_sdk_version: 29 linked to the version 29 of
the stub.

This was to ensure that the APEX doesn't use any new APIs whose
existence can't be guaranteed.

This however imposes a severe restriction that the APEX can never use
new APIs even when the APIs are actually available: i.e. when the
APEX is running on a newer platform.

With the recent work about unguarded availability, using the future APIs
became much safer. When you use an API that is newer than your
min_sdk_version, the API is automatically declared as a weak symbol
(thus no link error at runtime), while the call to API is guaranteed to
be guarded with the `__builtin_available(...)` macro.

So, there really is no reason to use the old version of the stub. We can
always use the latest version of stub safely.

Bug: N/A
Test: m
Change-Id: Iaac0d8761d8929154527dc2e861a51ae31e23d49
2021-03-01 09:12:32 +00:00
Chih-hung Hsieh 1627347d0b Merge "Forbit extra quotes in tidy flag lists" am: 7e52be849e am: 7b68407ec9 am: e0e2b40599
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1600697

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3ca5feb72e08337db7824fb4333b15dc48723586
2021-03-01 08:57:02 +00:00
Chih-hung Hsieh 7e52be849e Merge "Forbit extra quotes in tidy flag lists" 2021-02-27 08:45:47 +00:00
Justin Yun 163722ae1d Define getSnapshotNameSuffix() am: 07b9f86f0c am: 1ddff5f76f am: 0a6226c014
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1607900

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I607959e437b8e3bb4b082a6cdb42a358d1c7701d
2021-02-26 11:13:51 +00:00
Jingwen Chen 5d8644990b bp2build: add configurable attribute (select) support.
This CL adds a basic framework to support configurable string_list
attributes, selecting on the Arch variant (x86, x86_64, arm, arm64).

It offers fine-grained controls to map individual configurable
properties (arch_variant) to configurable Bazel attributes, starting
with the string_list type for the copts property for cc_object.

This design is primarily motivated to have minimal boilerplate in
bp2build mutators, allowing anyone to opt-in configurable attributes,
and modify intermediate states before passing them on into the
CreateBazelTargetModule instantiator.

Fixes: 178130668

Test: go tests
Test: build/bazel/scripts/milestone-2/demo.sh

Change-Id: Id6f04d7c560312a93e193d7ca4e1b7ceb6062260
2021-02-26 05:17:54 -05:00
Treehugger Robot 4f03289e44 Merge "Remove dependency from vendor_snapshot to each module" am: a777d960ab am: 4f8fa43b99 am: 9fe8c1f482
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1607913

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibd968597d2fee537c97f83d2b5996cf9a597e210
2021-02-26 06:07:34 +00:00
Justin Yun 07b9f86f0c Define getSnapshotNameSuffix()
By sharing a single function for generating snapshot name suffix,
make sure both the DepsMutator and the snapshot modules use the same
names.

Bug: 179666286
Test: m nothing
Change-Id: I9efa94f2981a6bd1b4128bf0e84ca44873ebf3b7
2021-02-26 14:00:03 +09:00
Chih-Hung Hsieh 217e09a784 Forbit extra quotes in tidy flag lists
* Start with clang-tidy flags;
  maybe other flags should be checked too.

Bug: 180862582
Test: make
Change-Id: I82f86a911733693a14fe56a35e28590b065e3ae7
2021-02-25 20:46:15 -08:00
Treehugger Robot a777d960ab Merge "Remove dependency from vendor_snapshot to each module" 2021-02-26 03:57:42 +00:00
Jingwen Chen b4adee5361 Merge "bp2build: add support for cc_object's objs and exclude_srcs properties." am: 1251bb5775 am: c1858d0f50 am: eb4d958cf6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1600655

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iba2011c8231a68086ff9faabc76794362300083f
2021-02-25 16:36:12 +00:00
Jingwen Chen 1251bb5775 Merge "bp2build: add support for cc_object's objs and exclude_srcs properties." 2021-02-25 14:09:08 +00:00
Justin Yun 4813867ec3 Remove dependency from vendor_snapshot to each module
The 'vendor_snapshot' module is required to every cc_library to check
if the dependencies need to be rewritten to the snapshot modules or
not. However, as the 'vendor_snapshot' module has dependencies to the
snapshot modules, the dependency to the 'vendor_snapshot' module
creates circular dependencies.
The dependency from the 'vendor_snapshot' to the snapshot modules is
required only to read the module names of the snapshot modules. We
may remove the dependency by setting the name of the snapshot modules
directly.

Bug: 179666286
Test: m nothing
Change-Id: I14abcb06c5c81ef7f8535103578747385c89ae0f
2021-02-25 09:31:12 +00:00
Stephen Hines 6e55d59b00 Merge "reverses common and external Clang flags" am: f3e0d22234 am: 4ad07ba7a3 am: 2a934fba72
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1606997

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifc4e0c7cd537b135bf52af2d86161e65baf8cc32
2021-02-25 08:49:47 +00:00
Christopher Di Bella c28f5d97a6 reverses common and external Clang flags
Flags for external projects are specialisations of the common flags, and
need to follow the common flags, not precede them.

Bug: 181177782
Test: None

Change-Id: I19c8c2a3539573e9b2f2d9e3e1c898fa09570663
2021-02-25 01:34:08 +00:00
Paul Duffin 5951b78bbc Merge "Generated headers may not be arch specific" am: b2773e116f am: 94dad2bdb4 am: 8da901ceae
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1599159

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1a5b6b034b8e5920e51f4eb5c4971c4db01ecf31
2021-02-24 12:02:57 +00:00
Paul Duffin baf573a087 Merge "Fix the snapshot handling of generated headers" am: efa0f00706 am: 7c7d2fc156 am: 3b2020b8a3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1599158

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icdd6da97232c36e26f0a1baefd0831cdb2aaae6e
2021-02-24 12:02:47 +00:00
Paul Duffin b2773e116f Merge "Generated headers may not be arch specific" 2021-02-24 10:10:23 +00:00
Paul Duffin efa0f00706 Merge "Fix the snapshot handling of generated headers" 2021-02-24 10:08:34 +00:00
Treehugger Robot 17d3ac9aa1 Merge "Move bazel.Properties to a BazelModuleBase" am: bbfd5ab606 am: 035b6e6882 am: 75f8de41e9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1591532

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I137929cc5eb3e20f563f7b184bf088bca913e410
2021-02-24 07:38:44 +00:00
Jingwen Chen db12024524 bp2build: add support for cc_object's objs and exclude_srcs properties.
objs contains module references to other cc_objects that will be used
for linking later. This maps to cc_library deps.

Also support exclude_srcs, and added tests.

Test: bp2build generate, sync, bazel build //bionic/...

Change-Id: I21200ff73f24bcf5357d9df8dcb5519cde532a77
2021-02-24 01:08:57 -05:00
Treehugger Robot bbfd5ab606 Merge "Move bazel.Properties to a BazelModuleBase" 2021-02-24 05:53:25 +00:00
Treehugger Robot 3b148cbc0e Merge "Refactor BazelTargetModule" am: 30899caf1f am: be2383b27d am: 501085ce55
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1596752

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0fdb016f6fa9ef9c54496feaebe0934f885c405d
2021-02-24 02:20:17 +00:00
Paul Duffin 73a7d9be76 Merge "Only export sysprop headers in exported sysprop include directory" am: 1dd5764a4e am: e2db082638 am: 28a690d283
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1596831

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I06da8ac9ac32f5a16eedc0245ec94bb45dad5d96
2021-02-24 02:17:19 +00:00
Treehugger Robot c0c4c82580 Merge "Export aidl, proto and sysprop generated headers separately" am: 2b22365c8c am: d9a7dc9b57 am: bda7188220
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1595276

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2bcc6f82743fdcdba78835c3d893dadc01ec3db7
2021-02-24 02:16:42 +00:00
Treehugger Robot 30899caf1f Merge "Refactor BazelTargetModule" 2021-02-23 20:40:23 +00:00
Liz Kammer ea6666fba9 Move bazel.Properties to a BazelModuleBase
This allows more direct access to the bazel label and whether the module
is bp2build available.

Test: go test *
Change-Id: I23375835d20fa53d7d94127b2dc2d5bb20487bfb
2021-02-23 10:58:57 -05:00
Paul Duffin 1dd5764a4e Merge "Only export sysprop headers in exported sysprop include directory" 2021-02-23 15:28:26 +00:00
Treehugger Robot 2b22365c8c Merge "Export aidl, proto and sysprop generated headers separately" 2021-02-23 14:11:24 +00:00
Liz Kammer fc46bc1ee4 Refactor BazelTargetModule
This eliminates the need to remove quotes, delete attributes, and
re-checking that name has correct prefix. Additionally, this allows
assignment directly to the BazelTargetModuleProperties struct, which
allows defaulting unused fields and clarity of which field is being set.

Test: go test soong tests
Test: ran ./build/bazel/scripts/milestone-2/demo.sh
Change-Id: Ia9bfcce76234c793a4ddd5f29a661150f83341c9
2021-02-23 08:29:40 -05:00
Paul Duffin c9ed7c652a Merge "Add tests for exported generated headers" am: bc179bc44f am: d24432aaf0 am: 16a1b25774
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1595275

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I13b1df790dde3540473b339110e448b69507b8e6
2021-02-23 01:09:27 +00:00
Treehugger Robot 277303f042 Merge "Add ctx to AndroidMkExtraEntriesFunc" 2021-02-22 22:40:31 +00:00
Paul Duffin 7a7d067c74 Generated headers may not be arch specific
Previously, it was assumed that generated headers must be arch specific
and so prevented the fields referencing the paths to those headers from
being automatically optimized by the sdk generation code. That is not
always the case, e.g. with headers generated from protos so this change
allows those fields to be optimized.

Bug: 180427921
Test: m nothing
Change-Id: Id2af419d58ae3c30ea6d9e87f71e33a9ff6ba13b
2021-02-22 18:23:22 +00:00
Paul Duffin 42dd4e6cd6 Fix the snapshot handling of generated headers
Previously, the snapshot handling code did not preserve the directory
structure of generated include directories and instead just copied the
headers into the same module specific directory and added that single
directory to the export_include_dirs (or similar) property.

That had a couple of issues:
* The include directory was repeated in the ..._include_dirs property.
* It did not work when the include directories overlapped.

In the latter case it had a couple of issues:
* Code which compiled fine against the source would not compile against
  the prebuilt.
* Header files were duplicated in the output.

e.g. assume the following generated header file structure:
  foo/
      foo.h
  bar/
      bar.h
      baz/
          baz.h

When the sdk snapshot was passed include directories of "foo", "bar" and
headers of "foo/foo.h", "bar/bar.h", "bar/baz/baz.h" it would generate a
snapshot with the structure:
  include_gen/
      foo.h
      bar.h
      baz/
         baz.h

And:
  export_include_dirs: ["include_gen", "include_gen"]

However, when the include directories overlapped and include directories
of "foo", "bar" and "bar/baz" were passed in the directory structure
would be the same and the export_include_dirs would contain 3 usages of
"include_gen".

That meant that source code which used the following would build
against the source (because it would find "baz.h" in the "bar/baz"
include directory) but would fail when built against the prebuilts
because the "include_gen" directory did not contain "baz.h":
    #include "baz.h"

This change preserves the input directory structure for generated files
in a similar way to how it does it for source files. So, the snapshot
structure looks something like this:

  include_gen/
      foo/
          foo.h
      bar/
          bar.h
          baz/
              baz.h

And:
  export_include_dirs: [
    "include_gen/foo",
    "include_gen/bar",
    "include_gen/bar/baz",
  ],

Bug: 180427921
Test: m nothing
Change-Id: Id69eef8cf5eecd033841d3b7cd0c044a697ce404
2021-02-22 18:23:22 +00:00
Paul Duffin 37e0de5004 Only export sysprop headers in exported sysprop include directory
Bug: 180712399
Test: m nothing
Change-Id: Ia93d20fe0fecf977773257fa43fe40e7fe9f024f
2021-02-22 18:05:18 +00:00
Paul Duffin 33056e8a9a Export aidl, proto and sysprop generated headers separately
Previously, a cc library that included .aidl, .proto and/or .sysprop
files and exported headers generated from at least one of those types
would actually export generated headers from all of them.

While headers generated from .sysprop files are always exported those
generated from .aidl or .proto should only be exported when explicitly
requested.

This change treats them separately as expected. It has the potential
to break the build as it could reduce the set of headers exported and
so a dependent module that needed those would break. The fix in that
case is to simply add one (or both) of the following to the module
that previously exported those headers:

  aidl: {
    export_aidl_headers: true,
  }

  proto: {
    export_proto_headers: true,
  }

Bug: 180712399
Test: m droid
Change-Id: I488182e27dd423d261443612f98d5c112dd3ef8f
2021-02-22 18:05:10 +00:00
Paul Duffin bc179bc44f Merge "Add tests for exported generated headers" 2021-02-22 18:03:00 +00:00
Justin Yun 5d090eb063 Merge "Update test_min_api_level for cc_test" am: b4697b8125 am: efb6015365 am: 0fabbdb611
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1581288

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9915d2882a1ea03a17796f74413972455c04e566
2021-02-21 07:26:45 +00:00
Justin Yun 107a4cb56c Update test_min_api_level for cc_test
By replacing MinApiLevelModuleController with
ShippingApiLevelModuleController, we don't need to define
api-level-prop option. The property name must not be a parameter but
be defined in the module controller.

test_min_sdk_version is removed as it is not used.

Bug: 178990561
Test: atest vts_core_liblp_test
Change-Id: Ib4660b91c7adb2ec8b970197dc6f65b8e6952a66
2021-02-20 00:46:21 +00:00
Elliott Hughes ca8a75e102 Merge "__ANDROID_UNGUARDED_AVAILABILITY__ is gone now." am: 272649ceb5 am: 8198c438ca am: eac2d22f6b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1596932

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I13975b59c2c7e5c4c13c1795458932e99efc2d34
2021-02-20 00:32:30 +00:00
Colin Cross aa2555387d Add ctx to AndroidMkExtraEntriesFunc
Add a ctx parameter to AndroidMkExtraEntriesFunc to allow them to
access providers.

Test: m checkbuild
Change-Id: Id6becc1e425c3c3d8519248f8c0ce80777fac7cc
Merged-In: Id6becc1e425c3c3d8519248f8c0ce80777fac7cc
2021-02-19 23:05:40 +00:00
Elliott Hughes 272649ceb5 Merge "__ANDROID_UNGUARDED_AVAILABILITY__ is gone now." 2021-02-19 22:27:11 +00:00
Julien Desprez 2e6a5548ce Merge "Switch cc_test host_supported: true to unit tests" am: 251261d01b am: fb7470923a am: c2457399a7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1576042

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idcee697e2fe9b23e86ca171f4fbabe4d066d84ee
2021-02-19 19:01:05 +00:00
Elliott Hughes 5a8c9531e4 __ANDROID_UNGUARDED_AVAILABILITY__ is gone now.
So no need to keep `-D`ing it.

Bug: http://b/179067538
Test: treehugger
Change-Id: If5bcead40d3bb355c241e363a8f1a956cb144438
2021-02-19 10:43:19 -08:00
Paul Duffin 3cb603eb51 Add tests for exported generated headers
Improves the test coverage for exporting of generated headers. These
tests highlight the bug described in b/180712399.

Follow up changes will refactor and fix bugs in this code. Adding the
tests separately help ensure that those changes do not inadvertantly
change the behavior.

Test: m nothing
Bug: 180712399
Change-Id: I0225b0cf53259071edb99a94be5014ed0e019bde
2021-02-19 17:12:01 +00:00
Julien Desprez 251261d01b Merge "Switch cc_test host_supported: true to unit tests" 2021-02-19 16:55:04 +00:00
Jingwen Chen d82b711739 Merge "bp2build: cc_object converter." am: 4e86b6ae43 am: d178288566 am: 80939fbbe1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1580344

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib51378b26b297469e17d5495ca15b54cd021098d
2021-02-19 05:54:04 +00:00
Jingwen Chen 4e86b6ae43 Merge "bp2build: cc_object converter." 2021-02-19 03:54:43 +00:00
TreeHugger Robot bd72625520 Merge "Add ctx to AndroidMkExtraEntriesFunc" into sc-dev 2021-02-19 01:03:10 +00:00
vichang d4ce81e6eb Merge "Non-installable module should not be installed into a fuzzer .zip package" am: cd821d8283 am: 8c488d9075 am: c96569722b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1579438

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1398cb096137fa516b64b906211fddfeeb1447cc
2021-02-18 10:48:56 +00:00
vichang cd821d8283 Merge "Non-installable module should not be installed into a fuzzer .zip package" 2021-02-18 09:59:06 +00:00
Jingwen Chen 8c1b97e01b bp2build: cc_object converter.
This CL introduces a basic bp2build converter for cc_object modules.
cc_objects maps cleanly to cc_library targets, but with -fnoaddrsig.

This CL also demonstrates generating include deps within a macro to
allow the cc_object compilation to depend on a relative-include header
within an include dir.

e.g. if "foo.cc" includes "android/log.h" and the latter is located at
"include/android/log.h", the autogenerated header deps would export
"android/log.h" correctly to the foo.cc upstream target.

Test: GENERATE_BAZEL_FILES=true m nothing && bp2build-sync write && bazel build //bionic/libc:crtbegin_so1

Change-Id: Ifd9e097051ec184ab0a1929d07918f0ff4f24d98
2021-02-18 03:27:28 -05:00
Colin Cross f79fee864c Add ctx to AndroidMkExtraEntriesFunc
Add a ctx parameter to AndroidMkExtraEntriesFunc to allow them to
access providers.

Bug: 180540739
Test: m checkbuild
Change-Id: Id6becc1e425c3c3d8519248f8c0ce80777fac7cc
2021-02-17 15:24:43 -08:00
Dan Albert 4c3b3c7c50 Merge "[arm64] Build NDK with PAuth and BTI" am: a175126009 am: bfe770d03f am: bb4c44e0c2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1558552

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I44a54ab4900ae02bf0650cb86545a847f508cd5f
2021-02-17 23:18:46 +00:00
Dan Albert a175126009 Merge "[arm64] Build NDK with PAuth and BTI" 2021-02-17 21:37:41 +00:00
Chih-hung Hsieh fa762e7121 Merge "Change default DEFAULT_TIDY_HEADER_DIRS to empty" am: 6e304f5a88 am: 030f75fa56 am: 39e4767dcb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1584224

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6eb28309d7655b7cc75f80335e52391df478f228
2021-02-17 19:48:45 +00:00
Chih-hung Hsieh 6e304f5a88 Merge "Change default DEFAULT_TIDY_HEADER_DIRS to empty" 2021-02-17 18:34:48 +00:00
Victor Chang 00c144f930 Non-installable module should not be installed into a fuzzer .zip package
libicu_* fuzzer depends on installable cc modules and non-installable
cc modules with the same name, because the non-installable modules are
stubs used in the compile-time, and shouldn't be used in runtime.

Bug: 175583039
Test: make haiku dist
Test: Run 2 arbitrary binaries from out/dist/fuzz-target-x86_64.zip on device
Test: Run 2 arbitrary binaries from out/dist/fuzz-host-x86_64.zip on host
Change-Id: I0ecf24bb83e3985da3b8f393adab8c87ab7400c6
2021-02-17 16:40:25 +00:00
Rupert Shuttleworth a68296e063 Merge "Add cc_library_headers support to bp2build." am: a0516f76ab am: 9632827e78 am: 90fc4c976c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1589371

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I511571b268dc12107f6eae8d06af0443f765227a
2021-02-17 10:50:50 +00:00
Rupert Shuttleworth a0516f76ab Merge "Add cc_library_headers support to bp2build." 2021-02-17 08:57:19 +00:00
Chih-hung Hsieh 3fd84d16cf Merge "Switch to clang-r412851 (build 7141649)" am: 296b7b8440 am: 691531855f am: 59ce34ec85
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1587546

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I76993c683386449fe64675a8490fbb70bd2d5041
2021-02-17 02:08:49 +00:00
Chih-hung Hsieh 296b7b8440 Merge "Switch to clang-r412851 (build 7141649)" 2021-02-17 00:17:14 +00:00
Elliott Hughes 0beaf98c71 Merge "Rename __ANDROID_UNGUARDED_AVAILABILITY__ -> __ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__." am: 9f53de289e am: 9be8ed2681 am: 486450a014
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1584291

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I553ed1a322abb18ee8777c722530ff323b6742d9
2021-02-16 23:18:03 +00:00
Rupert Shuttleworth 54e7841b90 Add cc_library_headers support to bp2build.
Test: Added cc_conversion_test.go.
Change-Id: Id4459d2c2fa02687a374cd9fb25d687e9678218c
2021-02-16 23:07:01 +00:00
Chih-Hung Hsieh 6338deba1d Switch to clang-r412851 (build 7141649)
Bug: 179065588
Test: presubmit
Change-Id: Ifb9399e9f4ec0968b174b90c1a1f4f78f903d39d
2021-02-12 13:53:10 -08:00
Chih-Hung Hsieh 9f94c362ea Change default DEFAULT_TIDY_HEADER_DIRS to empty
* Default -header-filter will now contain only module directory.
  * In a clean build of aosp_x86_64-eng, this change can reduce
    the number of (duplicated) clang-tidy warnings by 77% or more.
* When compiled with WITH_TIDY=1, if DEFAULT_TIDY_HEADER_DIRS is
  not set, warnings from a header file will be shown only if
  the file is in a module's (sub)directory.
* Set DEFAULT_TIDY_HEADER_DIRS="bionic/|bootable/|build/|cts/|\
  dalvik/|developers/|development/|frameworks/|\
  libcore/|libnativehelper/|system/"
  will get before this change's -header-filter.
* Fix a bug: Default header-filter was not added when
  tidy_flags was defined in a module.
  With this fix, some incorrectly hidden header file tidy warnings
  will now show up.

Bug: 179530304
Test: make with WITH_TIDY=1 and various setting of DEFAULT_TIDY_HEADER_DIRS
Change-Id: Ia0c05349908a730862dae36be9a2dbe4f44fb6da
2021-02-12 13:50:38 -08:00
Elliott Hughes 5add0c61d6 Rename __ANDROID_UNGUARDED_AVAILABILITY__ -> __ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__.
Bug: http://b/179067538
Test: treehugger
Change-Id: I5945ca6e767212280a1981e6f78ec3c50acfb3f3
2021-02-11 14:21:59 -08:00
Treehugger Robot fbc7b966a2 Merge "Add LOCAL_LICENSE_KINDS to build/soong" am: b68036f44b am: 0a1087f291 am: 66a854d585
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1575543

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icb7ac70ed37be73b84da59f8e1ad88daea3bfa80
2021-02-10 09:28:19 +00:00
Treehugger Robot b68036f44b Merge "Add LOCAL_LICENSE_KINDS to build/soong" 2021-02-10 07:18:29 +00:00
Treehugger Robot 709a2ab213 Merge "Ensure that stubs.symbol_file has ".map.txt" suffix" am: 509ab03f12 am: 1950b77215 am: f2db4bc32c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1574808

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I08d432f551eb509cd847c6f9c27edc5067d9b73c
2021-02-10 01:47:07 +00:00
Jose "Pepe" Galmes c7566be823 Merge "Implement directed recovery snapshot." am: ee4dcdc0ad am: ab1e7cc897 am: 34c5caff4e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1581563

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If8c598d817ea88980bc734afe469acc72984470d
2021-02-10 01:45:57 +00:00
Treehugger Robot 1950b77215 Merge "Ensure that stubs.symbol_file has ".map.txt" suffix" am: 509ab03f12
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1574808

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic8a69aef4b1fc5a2518460224707e724519c1ec0
2021-02-10 01:21:41 +00:00
Treehugger Robot 509ab03f12 Merge "Ensure that stubs.symbol_file has ".map.txt" suffix" 2021-02-10 01:07:30 +00:00
Jose "Pepe" Galmes ab1e7cc897 Merge "Implement directed recovery snapshot." am: ee4dcdc0ad
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1581563

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If399d2d14df5a163662e857430a449c8be02503b
2021-02-10 00:28:34 +00:00
Jose "Pepe" Galmes ee4dcdc0ad Merge "Implement directed recovery snapshot." 2021-02-10 00:02:34 +00:00
Benjamin Schwartz aeda6e49f4 powerstats: PowerStats HAL has been renamed am: 71dfb344e4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1576505

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I755bd9fc0a79730c95ab1d7596e868f156d492fb
2021-02-09 22:21:30 +00:00
Benjamin Schwartz 725482b4ab Create Power Stats AIDL interface am: 1057ccb75a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1576504

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I89b2061a22bfe2bd449917066354937277085846
2021-02-09 22:20:58 +00:00
Treehugger Robot 609b124e5e Merge changes from topic "ps 2.0 cp"
* changes:
  Update VndkMustUseVendorVariantList
  powerstats: PowerStats HAL has been renamed
  Create Power Stats AIDL interface
2021-02-09 19:20:10 +00:00
Jose Galmes 4c6895e5a3 Implement directed recovery snapshot.
Bug: 177451657
Test: m -j nothing
Change-Id: I0b84c34fb2e9e9340d9f9e7405428cd2cc4d43b5
2021-02-09 08:25:34 -08:00
Ivan Lozano f5de1a6146 Merge "rust: Add rust_ffi_static vendor ramdisk Support" am: 4ccfcc2ee4 am: 86af4b576f am: 325c8526b5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1578523

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I89309e092a56bd53a5ae7bbe999a91a7c5f0a8e8
2021-02-09 15:44:32 +00:00
Ivan Lozano 4ccfcc2ee4 Merge "rust: Add rust_ffi_static vendor ramdisk Support" 2021-02-09 13:49:28 +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
Bob Badour 02040de891 Add LOCAL_LICENSE_KINDS to build/soong
Added SPDX-license-identifier-Apache-2.0 to:
  Android.bp
  android/Android.bp
  android/soongconfig/Android.bp
  androidmk/Android.bp
  apex/Android.bp
  bazel/Android.bp
  bp2build/Android.bp
  bpf/Android.bp
  bpfix/Android.bp
  cc/Android.bp
  cc/config/Android.bp
  cc/libbuildversion/Android.bp
  cc/libbuildversion/tests/Android.bp
  cc/ndk_api_coverage_parser/Android.bp
  cc/ndkstubgen/Android.bp
  cc/symbolfile/Android.bp
  cmd/dep_fixer/Android.bp
  cmd/diff_target_files/Android.bp
  cmd/extract_apks/Android.bp
  cmd/extract_jar_packages/Android.bp
  cmd/extract_linker/Android.bp
  cmd/fileslist/Android.bp
  cmd/host_bionic_inject/Android.bp
  cmd/javac_wrapper/Android.bp
  cmd/merge_zips/Android.bp
  cmd/multiproduct_kati/Android.bp
  cmd/path_interposer/Android.bp
  cmd/pom2bp/Android.bp
  cmd/pom2mk/Android.bp
  cmd/sbox/Android.bp
  cmd/soong_build/Android.bp
  cmd/soong_env/Android.bp
  cmd/soong_ui/Android.bp
  cmd/zip2zip/Android.bp
  cmd/zipsync/Android.bp
  cuj/Android.bp
  dexpreopt/Android.bp
  dexpreopt/dexpreopt_gen/Android.bp
  env/Android.bp
  etc/Android.bp
  filesystem/Android.bp
  finder/Android.bp
  finder/cmd/Android.bp
  genrule/Android.bp
  jar/Android.bp
  java/Android.bp
  java/config/Android.bp
  kernel/Android.bp
  linkerconfig/Android.bp
  linkerconfig/proto/Android.bp
  makedeps/Android.bp
  partner/Android.bp
  phony/Android.bp
  python/Android.bp
  python/tests/Android.bp
  remoteexec/Android.bp
  rust/Android.bp
  rust/config/Android.bp
  scripts/Android.bp
  sdk/Android.bp
  sh/Android.bp
  shared/Android.bp
  symbol_inject/Android.bp
  symbol_inject/cmd/Android.bp
  sysprop/Android.bp
  tradefed/Android.bp
  ui/build/Android.bp
  ui/logger/Android.bp
  ui/metrics/Android.bp
  ui/metrics/proc/Android.bp
  ui/status/Android.bp
  ui/terminal/Android.bp
  ui/tracer/Android.bp
  xml/Android.bp
  zip/Android.bp
  zip/cmd/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to:
  finder/fs/Android.bp
  third_party/zip/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work

Change-Id: Ia47ca14f16b8c9f84f9d533a07e5b00e2c04e8d4
2021-02-06 04:23:21 +00:00
Jooyung Han 42fe5a7251 Merge "cc: fix version macro for stubs" am: 7701309889 am: 1a90279656 am: ec3a7c5db0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1574812

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I607d6dd16636e367c43f491eed4e3461e7c48004
2021-02-06 03:06:35 +00:00
Jooyung Han 7701309889 Merge "cc: fix version macro for stubs" 2021-02-06 01:41:31 +00:00
Jose "Pepe" Galmes 9e2ea6ab6d Merge "Generate fake versions of modules excluded in directed vendor snapshot." am: c64b961708 am: 504904f063 am: a05d6919cf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1572856

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I106e382c504c59c7028c2b7a3e32b11a93d01822
2021-02-05 19:28:43 +00:00
Jose "Pepe" Galmes c64b961708 Merge "Generate fake versions of modules excluded in directed vendor snapshot." 2021-02-05 17:54:48 +00:00
Jose Galmes 0a942a0368 Generate fake versions of modules excluded in directed vendor snapshot.
When using the directed vendor snapshot, the build fails because soong
fails to find some variants of the modules that have been excluded
from VENDOR_SNAPSHOT_MODULES, even though those modules are not going
to be used by the build.

The solution implemented here is to generate fake versions of those
modules (empty files) and include them in the generated Android.bp,
so that soong finds the modules, even though trying to use them would
fail.

Bug: 171821997
Bug: 179275601

Test: source build/envsetup.sh
Test: m -j nothing

Change-Id: Ibd3e963ab3e5504c0ac817f7cabbd241bf47a5cb
2021-02-05 17:53:53 +00:00
Liz Kammer 73f2874a87 Merge "bp2build: convert paths/module refs to Bazel label" am: b7eab01167 am: 6d5454d0f9 am: 595abf120a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1564272

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I51fd926cdae810906a75ed132dc70fa2f2c74240
2021-02-05 15:40:11 +00:00
Liz Kammer b7eab01167 Merge "bp2build: convert paths/module refs to Bazel label" 2021-02-05 13:39:08 +00:00
Treehugger Robot 3ddf0d105d Merge changes I904b4374,I6b4ea062 am: 4f67b03e8b am: 4cc87fe37b am: c8165f662f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1571886

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7f8aab297d1ceb4dc5b7da89c35f550524c7855c
2021-02-05 04:36:27 +00:00
Jooyung Han 11b0fbdbf6 cc: fix version macro for stubs
When a cc module is built against a stub, compiler passes version macro
of the stub lib. Version macro should be numeric, so codenames or
"current" should be mapped to numbers just like how ndkstubgen maps to.

* "current" -> future (10000)
* codenames -> look up api_level.json
* otherwise -> cast to int

Bug: 179329813
Test: m / soong test / manually check the output build.ninja
Change-Id: Ic0e1dd904984e161694a0b77fad5559c06a4462f
2021-02-05 11:27:57 +09:00
Chih-hung Hsieh adb8e2869a Merge "Disable gnu-folding-constant warning." am: adeb44b112 am: 7bca661e9a am: e2df322a97
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1573787

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6a340942ffda731970021c2f618f84c876a26127
2021-02-05 01:54:41 +00:00
Treehugger Robot 4f67b03e8b Merge changes I904b4374,I6b4ea062
* changes:
  Do not add '.product' suffix for product_specific module
  Use target dependent module to update the name suffix
2021-02-05 01:52:04 +00:00
Benjamin Schwartz 6ff77eace0 Update VndkMustUseVendorVariantList
Bug: 150578172
Test: m
Change-Id: I68635557faff1bd8daa4964af7946a54a8dee60d
Merged-In: I3e82b2c01f1fca75ac97985053b4a5826d151340
2021-02-04 17:13:11 -08:00
Benjamin Schwartz 71dfb344e4 powerstats: PowerStats HAL has been renamed
Bug: 169864180
Test: m
Change-Id: I0db7d731c3aa81b2c9331570c93ec23038bd743c
(cherry picked from commit 399394b702)
Merged-In: I0db7d731c3aa81b2c9331570c93ec23038bd743c
2021-02-04 16:10:44 -08:00
Benjamin Schwartz 1057ccb75a Create Power Stats AIDL interface
Bug: 162472196
Test: m
Change-Id: I44ffdf07c181cb4a119ec5de73bcb9ffaf485504
(cherry picked from commit 5ec7024911)
Merged-In: I44ffdf07c181cb4a119ec5de73bcb9ffaf485504
2021-02-04 16:09:20 -08:00
Chih-hung Hsieh adeb44b112 Merge "Disable gnu-folding-constant warning." 2021-02-04 23:59:27 +00:00
Chih-Hung Hsieh 72e88767dc Disable gnu-folding-constant warning.
New clang compiler issue too many such warnings.

Bug: 179065588
Bug: 179309338
Bug: 179278370
Test: make, presubmit
Change-Id: I9948a4b34ec75a01aa24c2fd753722b072ae5202
2021-02-04 11:46:40 -08:00
Liz Kammer 356f7d45c1 bp2build: convert paths/module refs to Bazel label
This currently expands all globs, still need to support converting glob
syntax.

Test: go build_conversion_test
Test: GENERATE_BAZEL_FILES=true m nothing
Test: m nothing
Bug: 165114590
Change-Id: If7b26e8e663d17566fad9614ca87a8da1f095284
2021-02-04 13:45:56 -05:00
Julien Desprez 8908b37a14 Switch cc_test host_supported: true to unit tests
Test: presubmit
Bug: 179092189
Change-Id: Ic5c3ca6de44732f6299ad9a35d1aaef622f3ff7f
2021-02-04 10:10:16 -08:00
Jiyong Park a417557f80 Ensure that stubs.symbol_file has ".map.txt" suffix
The property refers to the symbol file that describes APIs across
updatable components like APEXes and system/vendor. Since it's important
to keep the APIs backwards incompatible, any change to the APIs should
be reviewed/gated by the NDK API council. The map.txt suffix is the key
for trigging the NDK API review by gerrit.

Bug: N/A
Test: m nothing
Change-Id: I01eae9c6a106d301863ec86e169111712af74d3f
2021-02-04 21:05:47 +09:00
Julien Desprez 4e153fe708 Merge "Test changing default of cc_test_host" am: 23c38fa9a7 am: 042adabd94 am: 9dfb08197a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1549529

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ice73eacf0e8061510116f58cbb31615b9846a1e1
2021-02-04 02:25:56 +00:00
Justin Yun d00f5ca1df Do not add '.product' suffix for product_specific module
When a module has both 'product_specific: true' and
'vendor_available: true', the module does not have core variant but
have product and vendor variant modules. As the module generated
multiple variants, the names of the modules have the variant name
suffix. However, it did not create the module with the base module
name because it does not have core variant.

As the base module, in this case, is the product variant, use the
base module name for the product variant without adding the
'.product' suffix to it.

Bug: 161913599
Test: m hidl_test_product@2.0-adapter-helper
Change-Id: I904b43744579a6e89cecbc2e529122eaa8b14cae
2021-02-03 19:43:02 +09:00
Justin Yun cbca373efa Use target dependent module to update the name suffix
The module names for vendor and product variants have the image
variant suffix to avoid conflict with the core modules. It requires
updating the module names in the dependency tree with the suffixes.

We had a hidden bug that used the original module properties to
update the names of its dependent modules.
Also, it must cover the product variants modules.

Test: updated cc_test.go and build
Change-Id: I6b4ea062d13c8fac1e699138d44376e52e0d7852
2021-02-03 19:42:29 +09:00
Inseob Kim 88796ab3d8 Merge changes from topics "snapshot_androidmk_suffix", "snapshot_list_module" am: 38ce066d3b am: de6f9afbed am: eb313b0574
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1558812

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I89a122a4ad3007bd223407f8a7fd13629b3c4717
2021-02-02 01:55:24 +00:00
Colin Cross 9bd4560e0a Remove some global state from vendor and recovery snapshots am: e0edaf9d49 am: cdab9928d0 am: ba1e014129
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1558811

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If45399cab752d0f91c640735a74f73d4a01fba00
2021-02-02 01:55:21 +00:00
Julien Desprez 3b933d3165 Test changing default of cc_test_host
Switching all cc_test_host to unit_tests: true by default.
Resolved all the failures (passing presubmit) to enable this.

Test: presubmit trigger
Bug: 177450457
Change-Id: I815e40786c0b62cf0aadd9b837d35c48332639da
2021-02-01 17:34:44 -08:00
Colin Cross a889080aba Remove global state on module suffixes from vendor and recovery snapshots
Propgate the Android.mk suffix from source modules into the snapshot so
that it can be used for the prebuilt modules.

Bug: 177098205
Test: vendor_snapshot_test.go
Change-Id: Iea151dc91395f714fbcad1df3a6fd0874e5455d9
2021-02-01 20:06:29 +09:00
Colin Cross e0edaf9d49 Remove some global state from vendor and recovery snapshots
Snapshots storead global sets of modules that should be replaced with
vendor snapshot modules.  Move the data instead to a vendor_snapshot
or recovery_snapshot module type that depends on all the modules in
the snapshot, and then have modules that should use the snaphsot
depend on it to query for the set of modules that should be replaced.

Bug: 177098205
Test: vendor_snapshot_test.go
Change-Id: I2826adacfb473e9139b5ea93ba83b8a54cc1a56b
2021-02-01 20:02:39 +09:00
Ivan Lozano d8ff4daa91 rust: Allow rust_tests to include data files. am: 9da4aa8166 am: bf557705c1 am: 6604580d74
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1565177

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib1a8d5a5cb175598a783c686a9055300338ebf59
2021-01-30 00:56:04 +00:00
Ivan Lozano 9da4aa8166 rust: Allow rust_tests to include data files.
Adds the ability to define data files that should be installed alongside
the test.

This also fixes a bug wherein rust_test properties were duplicated.

Bug: 171710847
Test: rust_test module with "data" property installs files to device.
Change-Id: I091489afaf7e76b751a33a28049590d9fb39fe5f
2021-01-29 14:31:32 -05:00
Colin Cross 2df8177575 Add Target to cc.SharedLibraryInfo
Dependencies from common arch modules like java libraires to cc modules
may need to retrieve the Target of the library, add it to
SharedLibraryInfo.

Bug: 176593487
Test: cc_test.go
Change-Id: I93ab9da5fab2ccc42c6b483a6d83c071b541d1e6
2021-01-26 11:02:53 -08:00
Treehugger Robot aad56c2567 Merge "Define odm_available property to install a vendor variant to odm" am: 65490b8cf3 am: cae1637ce5 am: 6b2fbaf2a4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1542687

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I975f350b63d1b1796bc623205555033a65a4d02e
2021-01-26 13:36:57 +00:00
Treehugger Robot 65490b8cf3 Merge "Define odm_available property to install a vendor variant to odm" 2021-01-26 11:32:18 +00:00
Tamas Petz bca786d742 [arm64] Build NDK with PAuth and BTI
This change adds a new arch named "armv8-a-branchprot". The new target
is no different from the usual "armv8-a" variant except it has the
compiler flag "-mbranch-protection=standard" set.

With this flag compiler emits Armv8.3-A Pointer Authentication and
Armv8.5-A Branch Target Identification instructions. All of these
instructions are in the hint space; therefore devices which do not
support any of these extensions would execute them as NOPs.

In terms of directory structure there is no change in the output of
build/soong/scripts/build-ndk-prebuilts.sh script.

Test: build NDK prebuilts

Change-Id: Ie52ccba5653fbf567f0b7ca312d8a8e71602ad06
2021-01-26 08:15:07 +01:00
Jeongik Cha 57272380ff Update VndkMustUseVendorVariantList
As AIDL version rule is changed, change VNDK list accordingly.
'unstable' and non-versioned aidl module will be cleaned up

Bug: 150578172
Test: m
Change-Id: I3e82b2c01f1fca75ac97985053b4a5826d151340
Merged-In: I3e82b2c01f1fca75ac97985053b4a5826d151340
2021-01-26 10:20:49 +09:00
Treehugger Robot b30b0884fa Merge "Enable clang-analyzer-optin.performance.* checks" am: 7328c25275 am: 45e98eb600 am: bbdf4b38ed
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1559878

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4288232390fe305737adbb1b27dc3faef6fc727d
2021-01-26 01:08:05 +00:00
Jeongik Cha e6b5399da3 Merge changes from topic "b/150578172-2"
* changes:
  Update VndkMustUseVendorVariantList
  update apex allowed deps
2021-01-26 00:16:58 +00:00
Chih-Hung Hsieh e9dca0aa0e Enable clang-analyzer-optin.performance.* checks
* Now CLANG_ANALYZER_CHECKS=1 simply enable all clang-analyzer-* checks.

Test: make with WITH_TIDY=1 CLANG_ANALYZER_CHECKS=1
Change-Id: Ib97a2c491df66088197805e979e4bec28f2f433c
2021-01-25 14:00:51 -08:00
Colin Cross 25bb7fdf93 Merge changes I0c9b81d6,Ib1120f98 am: c203ed422a am: 4b44975ad0 am: b4d93cc692
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1558810

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ica6e5c2a66a699503c87cace284da409b088f72a
2021-01-25 19:47:02 +00:00
Yabin Cui 217c8eec1b Merge "Switch to clang-r407598b (12.0.2)." am: 824e5ac072 am: 17c79160c2 am: da6c37dd22
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1557054

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idbf24aa0134ea732a1b5fe25454b472345283421
2021-01-25 19:46:49 +00:00
Colin Cross c203ed422a Merge changes I0c9b81d6,Ib1120f98
* changes:
  Add vendor_available coverage to TestVendorSnapshotUse
  Move vendor snapshot tests into vendor_snapshot_test.go
2021-01-25 19:10:52 +00:00
Yabin Cui 824e5ac072 Merge "Switch to clang-r407598b (12.0.2)." 2021-01-25 17:41:31 +00:00
Colin Cross 49d9f605d7 Merge changes from topic "revert_vendor" am: c21e30bb56 am: 0ba23c1903 am: ff381094c1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1557798

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If26691d346e45f377307188cd92b0ffa07756703
2021-01-25 16:46:02 +00:00
Colin Cross c21e30bb56 Merge changes from topic "revert_vendor"
* changes:
  Revert "Revert "Truncate vendor snapshot header glob list after filtering it""
  Revert "Revert "Speed up vendor snapshot header globs""
2021-01-25 16:07:51 +00:00
Justin Yun ebcf0c5e15 Define odm_available property to install a vendor variant to odm
'vendor_available: true' creates a vendor variant from a system
module. The vendor variant of the module is installed to /vendor.
However, we may want to install the vendor variant to /odm, instead.

'device_specific: true' does not work for this purpose because
'vendor_available: true' is allowed only for the system or product
modules to create a vendor variant. But 'device_specific: true'
itself creates a vendor variant that may not work with
'vendor_available: true'.

To install the vendor variant to /odm, we define a new property
'odm_available'. 'odm_available' is exactly the same as the
'vendor_available' except the install path of the vendor variant.
By defining 'odm_available: true', the vendor variant of the module
will be installed to /odm or /vendor/odm instead of /vendor.

Bug: 176147321
Bug: 176079978
Test: check if a module with 'odm_available: true' is installed to
      /vendor/odm
Change-Id: I2d16bd2c515796597b2fbd1eb66f7c2736434697
2021-01-25 17:08:44 +09:00
Justin Yun 5bb120fe70 Check vndk-private with the IsVndkPrivate() am: e09ac17466 am: 9f900373d7 am: 24ee8579e9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1554987

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9edbfdaa1ba40c1460f728ad0fee44625fbd0038
2021-01-23 02:43:37 +00:00
Colin Cross 2e577f3657 Add vendor_available coverage to TestVendorSnapshotUse
Test that the correct suffix is added to the Make references to a
vendor_available library in a vendor snapshot.

Bug: 177098205
Test: vendor_snapshot_test.go
Change-Id: I0c9b81d63798e221db856fa0e4742a467c356fcb
2021-01-22 17:42:31 -08:00
Colin Cross 0fce0bab12 Move vendor snapshot tests into vendor_snapshot_test.go
Move the vendor snapshot tests into vendor_snapshot_test.go to
reduce the size of cc_test.go

Bug: 177098205
Test: go test ./build/soong/cc/...
Change-Id: Ib1120f986fc0111a9487fce00539a4c5ae7e2e87
2021-01-22 17:42:28 -08:00
Justin Yun e09ac17466 Check vndk-private with the IsVndkPrivate()
*_available will not provide if a module is VNDK-private or not.
Fixed it by using IsVndkPrivate() with private() interface.

By allowing exclude_from_vendor_snapshot for vendor_available
modules, available() interface is no longer required. Tests are
updated for exclude_from_vendor_snapshot on vendor_available modules.

Bug: 175768895
Test: m nothing
Change-Id: I9ff85256170d59b378a4c354d5c007cfbeacabc5
2021-01-23 01:11:58 +00:00
Colin Cross 75862ebcb2 Merge "Fix mismatch between cc and python for windows prefer32" am: 9b564c5a22 am: 0448d58125 am: a5085a5fd1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1554549

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I78510184ca457855b032d54c5f5613c438b2257f
2021-01-23 00:45:56 +00:00
Colin Cross 9b564c5a22 Merge "Fix mismatch between cc and python for windows prefer32" 2021-01-22 23:34:00 +00:00
Dan Willemsen da37007955 Merge "Add Mac 11.1 SDK to the allowlist" am: ba680de96e am: 21a794a0d8 am: 332fd96a00
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1556740

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib511f0fbd3b5f38ce9f00bb489919cfcc12b045e
2021-01-22 21:28:40 +00:00
Dan Willemsen ba680de96e Merge "Add Mac 11.1 SDK to the allowlist" 2021-01-22 19:05:09 +00:00
Colin Cross 1f2f4eb07d Revert "Revert "Truncate vendor snapshot header glob list after filtering it""
This reverts commit 758140ceae.

Reason for revert: modifying glob results no longer corrupts cache after aosp/1557261

Change-Id: Id94f1f5835a93e83dc9f465627913b91908d3560
2021-01-22 18:06:57 +00:00
Colin Cross ec118d0734 Revert "Revert "Speed up vendor snapshot header globs""
This reverts commit c2aff9e9fd.

Reason for revert: modifying glob results no longer corrupts cache after aosp/1557261

Change-Id: I682b92ad08c82ac4fa5482497cb587bd0223d21b
2021-01-22 18:05:59 +00:00
Jeongik Cha f5c418cedf Update VndkMustUseVendorVariantList
As AIDL version rule is changed, change VNDK list accordingly.
'unstable' and non-versioned aidl module will be cleaned up

Bug: 150578172
Test: m
Change-Id: I3e82b2c01f1fca75ac97985053b4a5826d151340
2021-01-22 20:32:02 +09:00
ChengYou Ho 262adc3e41 Create Weaver aidl interface am: 4b197e110b am: 1ba735ada4 am: 56a957fa9a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1554279

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I85131d81820b53a852633ec758510a580503bcf1
2021-01-22 07:44:07 +00:00
ChengYou Ho 4b197e110b Create Weaver aidl interface
Bug: 176107318
Change-Id: Ia4b628edf1ef51c71af7078818c0adf2a4183d03
2021-01-22 06:34:22 +00:00
Daniel Cardenas 915ee01fef Merge changes from topic "revert_vendor" am: 3e2760a539 am: 7868fe0c6f am: f1d2946eaa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1556737

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2c3629d513298a21f25335d203964c8a2cac3222
2021-01-22 06:01:46 +00:00
Yabin Cui 5e3d82ebdb Switch to clang-r407598b (12.0.2).
Bug: 178106097
Test: build.
Change-Id: I1ce256547fc395a6b440950b4c88f7fe777c86ee
2021-01-21 21:30:45 -08:00
Daniel Cardenas 3e2760a539 Merge changes from topic "revert_vendor"
* changes:
  Revert "Speed up vendor snapshot header globs"
  Revert "Truncate vendor snapshot header glob list after filtering it"
2021-01-22 05:12:51 +00:00
Christopher Di Bella 81bc3b130d Merge "adds new warnings to Android build (1/2)" am: 490b9d7931 am: 3cab1ce6f5 am: d19b58ada9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1497076

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6159e650973c49c6b768a109e32ac6f2199fe967
2021-01-21 23:55:11 +00:00
Evgenii Stepanov e0ea5943fc Merge "Support memtag_heap in SANITIZE_TARGET_DIAG, fix cc_test interation." am: 298bafdde9 am: d1926575a7 am: f22bbf2d8c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1550323

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5922cb4bdc7e722992ca7c435abff4255d13f330
2021-01-21 23:53:35 +00:00
Dan Willemsen 5191b00369 Add Mac 11.1 SDK to the allowlist
Historically we've only had to add one major release a year to the Mac
SDK allowlist, but this year the versioning scheme changed and 11.1 is a
minor update to 11 (instead of 10.x.1 like in years past). Unfortunately
the Xcode tools don't let you just specify '11' like they did with
'10.x', so this is more complicated to fix in a scalable way.

Test: build with xcode 12.3 and macOS SDK 11.1
Change-Id: I2e88e9289727261389a863e7147a0b146ec5148a
2021-01-21 14:56:39 -08:00
Christopher Di Bella 490b9d7931 Merge "adds new warnings to Android build (1/2)" 2021-01-21 22:24:51 +00:00
Evgenii Stepanov 298bafdde9 Merge "Support memtag_heap in SANITIZE_TARGET_DIAG, fix cc_test interation." 2021-01-21 20:32:19 +00:00
Sally Yuen c2aff9e9fd Revert "Speed up vendor snapshot header globs"
This reverts commit 0f93e5b9fb.

Reason for revert: causing extra soong regenerations

Change-Id: I4ed2e5c82dfe3e99fbb9590b80f92c79a27e8025
2021-01-21 20:17:33 +00:00
Sally Yuen 758140ceae Revert "Truncate vendor snapshot header glob list after filtering it"
This reverts commit 3a62a9cc2b.

Reason for revert:  causing extra soong regenerations

Change-Id: I4ceb5334634613a00ac9c312b75c623a8aced8ab
2021-01-21 20:17:07 +00:00
Jiyong Park 942c119b14 Merge changes from topic "future_symbol" am: 1de5a578d2 am: 27d194c793 am: 9e6596f3ed
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1425589

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic0c73002351347ad25c2ef23885743cfa457ce61
2021-01-21 18:55:24 +00:00
Christopher Di Bella 23a991c04e adds new warnings to Android build (1/2)
The following warnings have been turned on, and turned on as errors:

-Wbool-operation
-Wimplicit-int-float-conversion
-Wint-in-bool-context
-Wstring-compare
-Wstring-plus-int
-Wxor-used-as-pow

Test: no extra tests necessary

Change-Id: Ic8ab26de9e5323e9b81ad79eef787abfb264848c
2021-01-21 17:53:42 +00:00
Jiyong Park 1de5a578d2 Merge changes from topic "future_symbol"
* changes:
  API availability should be checked using __builtin_available
  __ANDROID_API__ tracks min_sdk_version
2021-01-21 16:33:05 +00:00
Inseob Kim 0c9e1d388d Merge "Truncate vendor snapshot header glob list after filtering it" am: ec7cab81f9 am: 249609366d am: cb6d9b1d29
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1555161

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie569526241f5e1b59caa3505422f34e45bfeb0b0
2021-01-21 07:56:04 +00:00
Inseob Kim c98399e60f Merge "Speed up vendor snapshot header globs" am: ab15f9644b am: 9a7f405bc9 am: ee3791b9f4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1554550

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I76b8036af1266c565e0ad79c59c6094dc9877f2a
2021-01-21 02:10:42 +00:00
Colin Cross 3a62a9cc2b Truncate vendor snapshot header glob list after filtering it
Test: m checkbuild
Change-Id: I4847bff5c03844194a9a80e8cb24a60694db6208
2021-01-21 00:46:46 +00:00
Evgenii Stepanov 04896cae35 Support memtag_heap in SANITIZE_TARGET_DIAG, fix cc_test interation.
cc_test without sanitize:memtag_heap acts as if it has implicit
sanitize{memtag_heap:true, diag:{memtag_heap:true}}. This is unaffected
by SANITIZE_TARGET.

Refactor the test to cover all permutations.

Change memtag include lists to act similar to SANITIZE_TARGET_DIAG: the
the sync include list upgrades async targets to sync, unless diag is
explicitly set to false in the target definition.

Bug: b/135772972
Test: cc_test.go

Change-Id: I6a969f2f5804cd5f47fc4e93a20e3b99ea5fa111
2021-01-20 22:27:45 +00:00
Colin Cross 217f7b33c4 Merge "Don't create SDK variants for native bridge modules" am: bdeafb93fd am: f5cd3722cf am: 5459575558
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1553881

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iacbd8783289feed7aa810da0f0c7635067e73863
2021-01-20 19:46:58 +00:00
Colin Cross 0f93e5b9fb Speed up vendor snapshot header globs
The vendor snapshot header globs were repeated 9 times, once for each
possible header suffix.  Globbing is not a fast operation, so this
took 9.68s of CPU time in my AOSP builds.  Replace it instead with a
single glob, followed by filtering down to the desired header
extensions.

Test: m checkbuild
Change-Id: I9c8f8cdad8cbffc0a42217659a48dd9d676e4e4c
2021-01-20 18:36:25 +00:00
Colin Cross 08117deab4 Fix mismatch between cc and python for windows prefer32
Windows prefer32 was implemented in cc, which caused a mismatch
between cc and other packages like python.  This manifested as
missing variant when a python_test_host with compile_multilib: "first"
tried to depend on a cc_binary_host, which implicitly has multilib
"first".

Fixes: 177904375
Test: m checkbuild
Change-Id: Iaaac16ae171c06d90d04d7cac11789d3f39b8d99
2021-01-20 10:26:00 -08:00
Cindy Zhou 0ae13ec307 Merge "Build against cfi supported coverage lib" 2021-01-20 18:08:30 +00:00
Colin Cross bdeafb93fd Merge "Don't create SDK variants for native bridge modules" 2021-01-20 17:49:36 +00:00
Chih-Hung Hsieh 9170f0f2c4 Add clang-analyzer check if selected. am: 04f8d379e6 am: 6b6b7353f8 am: dee5011892
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1554894

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iaa5585831e6b61a6d62d2e37b8383e3ea7b100de
2021-01-20 08:46:41 +00:00
Chih-Hung Hsieh 04f8d379e6 Add clang-analyzer check if selected.
* WITH_TIDY=1 should not include clang-analyzer-* checks
  because they are too slow.
* Nightly builds will use both WITH_TIDY=1 and
  CLANG_ANALYZER_CHECKS=1.

Bug: 173736193
Test: make with WITH_TIDY=1 and CLANG_ANALYZER_CHECKS=1
Change-Id: I3885fd0e20475ceee5e3798bffc11a61994ac113
2021-01-19 19:21:39 -08:00
Inseob Kim 7577c1eb1c Merge "Implement directed vendor snapshot" am: 9bd66d1537 am: bc657cb78a am: dcebff8f67
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1541208

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1c4870fa350bfe767019a0103d619b9e01c20c87
2021-01-20 02:16:15 +00:00
Inseob Kim 6a993709d4 Merge "Refine sysprop_library header rules" am: 4c4de0edc3 am: 1ee0c0c4ba am: b904808ac6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1553459

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifcd813e9ae13863a4a5118130da416c30b6ef62c
2021-01-20 02:16:09 +00:00
Ryan Prichard 6761a5eeae Merge "Switch platform EH unwinder to prebuilt LLVM libunwind" am: 809eac3057 am: 048809c624 am: 471dfd6809
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1551580

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I93276241d217b7d2ebdffa58abb60d2d0721c672
2021-01-20 02:15:55 +00:00
Inseob Kim 9bd66d1537 Merge "Implement directed vendor snapshot" 2021-01-20 01:17:25 +00:00
Inseob Kim 4c4de0edc3 Merge "Refine sysprop_library header rules" 2021-01-20 01:17:22 +00:00
Ryan Prichard 809eac3057 Merge "Switch platform EH unwinder to prebuilt LLVM libunwind" 2021-01-20 00:10:59 +00:00
Colin Cross 94e347e6a5 Don't create SDK variants for native bridge modules
Native bridge modules never need to build against NDK stubs, so
don't create SDK variants.  Also clear the sdk_version property
for modules that don't have SDK variants so that later code doesn't
use it to trigger SDK behaviors.

Test: m checkbuild
Change-Id: I1920fa82e9fab06235f01a62624382efa16cc6e3
2021-01-19 15:00:45 -08:00
Inseob Kim 7cf1465d2e Implement directed vendor snapshot
Vendors can now generate only needed modules by setting the following
Makefile variables:

- DIRECTED_VENDOR_SNAPSHOT: set to true
- VENDOR_SNAPSHOT_MODULES: list of snapshot candidates

e.g.

DIRECTED_VENDOR_SNAPSHOT := true
VENDOR_SNAPSHOT_MODULES := toybox_vendor sh_vendor libbase libcutils ...

Bug: 157967325
Test: m dist vendor-snapshot after setting those in BoardConfig.mk
Change-Id: I6515a43d9358d94483d7c7fa2b066f9dd457f6aa
2021-01-18 20:08:09 +09:00
Inseob Kim 0641004a3f Refine sysprop_library header rules
Instead of unreliable giant if clause, it's enough to check dependency
between platform (system, system-ext), product, and vendor.

Test: sysprop_test soong test
Test: link against host_supported sysprop_library and use internal props
Change-Id: I7bd5df00b302fa261eff5120106aacc3df93c1b2
2021-01-18 15:23:28 +09:00
Chih-Hung Hsieh 40891da084 Do not enable all clang-analyzer-* checks, am: 4d31a041c7 am: 1bf2e3f449 am: a8e4121466
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1553374

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7ad24a1cd9c755dcfda34319dece88bfe3ae9a74
2021-01-16 10:18:29 +00:00
Chih-Hung Hsieh 4d31a041c7 Do not enable all clang-analyzer-* checks,
* clang-analyzer is slow and enables clang-diagnostic-padded,
  which cannot be suppressed yet.

Test: make with WITH_TIDY=1 for crosshatch-userdebug
Change-Id: I20193f0db3154b037d58c5ca012a9e753b176722
2021-01-15 21:10:35 -08:00
Treehugger Robot 6b15f92d95 Merge "add more global default checks" am: 9235fea8c3 am: 52693cd46a am: a979a9bae7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1551578

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8539b9e02317bbacfcd4d2660947b99a92099d89
2021-01-16 01:55:08 +00:00
Treehugger Robot 5655f13aeb Merge "WITH_TIDY=1 implies -warnings-as-errors=-*" am: 2207565b43 am: b42947cba0 am: 1f367ef490
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1551577

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8bd5167d67b5db463873b47bf063af24d223747a
2021-01-16 01:54:30 +00:00
Chih-Hung Hsieh 34850d350e add more global default checks
Test: make with and without WITH_TIDY=1
Change-Id: Iee07707158f7204e961970ba4d518403b3b2aaf3
2021-01-15 14:31:13 -08:00
Chih-Hung Hsieh 1b4934a215 WITH_TIDY=1 implies -warnings-as-errors=-*
* This allows local projects to enable clang-tidy
  and catch errors in a default build, but allows
  all warnings in a global build with WITH_TIDY=1.

Test: make with WITH_TIDY=1
Change-Id: I92a10af24b23ee9f04eebb0513e8f611dd7dcf59
2021-01-15 14:17:39 -08:00
Treehugger Robot b0d869e24f Merge "Adjust the double loadable check" am: b47dcf7f0d am: fc76f2cb9d am: 91cf763bfd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1550398

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8d1e29a14d7f694eafcdfe1d97158c8edde92411
2021-01-15 14:09:21 +00:00
Chris Li 5e13c08b9f Revert "To use same default for the nightly builds." am: 46cad069d1 am: 61316dbda6 am: ff8118fe9d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1549528

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I26754f095e1016bf30b27f8a1308ed36a8e42ecc
2021-01-15 14:08:20 +00:00
Colin Cross da0330646b Merge "Remove global state from VNDK" am: 6c0a9f69e9 am: 6b937be368 am: 4e96d84d64
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1542205

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I013b68f54adae6f9ad45e87320ce9ec7477f95d9
2021-01-15 14:04:07 +00:00
Janis Danisevskis 7dde1e4004 Merge "The build related changes for Secure Clock and Shared Secret functionalities." am: 0ce3a40bf8 am: 3b55e031cd am: cf4ad11544
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1519849

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic597e60c0fe3ccad109aed17d45783a811166e56
2021-01-15 13:55:17 +00:00
Treehugger Robot b47dcf7f0d Merge "Adjust the double loadable check" 2021-01-15 02:22:09 +00:00
Jiyong Park 423e37873b API availability should be checked using __builtin_available
This change turns -Wunguarded-availability option which enforces calls
to APIs which are introduced after the min_sdk_version of the
compliation unit to be guarded with __builtin_available check. For
example, let's assume that we have foo() which was introduced with API
level 30.

void foo() __INTRODUCED_IN(30);

Then if foo() is called for a module whose min_sdk_version is less than
30, say 26, it should be called as below:

if (__builtin_available(android 30, *)) {
  foo();
} else {
  // fallback impl
}

For modules whose min_sdk_version is >=30, the guard is not required.

Bug: 150860940
Bug: 134795810
Test: m

Change-Id: I084148b9a051350626a37cb394daa4398b7332d5
2021-01-15 09:43:35 +09:00
Treehugger Robot ee8ae11c0f Merge "Must use vendor variant for health storage AIDL HAL" 2021-01-14 22:22:08 +00:00
Chris Li 46cad069d1 Revert "To use same default for the nightly builds."
This reverts commit b063dc4221.

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_master&target=crosshatch-userdebug&lkgb=7080774&lkbb=7082597&fkbb=7080869, bug 177549474

Test: make
Change-Id: I8b6cf3b56fddde9832e1428a3d1aef00f19637fb
2021-01-14 13:37:54 -08:00
Yifan Hong 59d876d69b Merge "Must use vendor variant for health storage AIDL HAL" 2021-01-14 20:32:55 +00:00
Cindy Zhou 5d5cfc164d Build against cfi supported coverage lib
The change will detect if a module is compiled against cfi support, and
will usebuild the coverage build against the libprofile that supports cfi. This is to resolve compilation errors when
building against modules with cfi support.
Bug: 177098919
Test: forrest build for cf_x86_phone-userdebug_coverage http://go/forrest-run/L81700000786828933

Change-Id: I8e0421cdf1c6e499292cfa3457cefd3c42f13155
Merged-In: I8e0421cdf1c6e499292cfa3457cefd3c42f13155
2021-01-14 11:46:10 -08:00
Colin Cross 6c0a9f69e9 Merge "Remove global state from VNDK" 2021-01-14 18:31:06 +00:00
Janis Danisevskis 0ce3a40bf8 Merge "The build related changes for Secure Clock and Shared Secret functionalities." 2021-01-14 18:04:02 +00:00
Jiyong Park 0474e1f677 Adjust the double loadable check
The check no longer tracks private dependencies like stubImplDepTag and
staticVariantTag. It also doesn't do the check for double_loadable
libraries that are not depended on by a LLNDK library.

Bug: N/A
Test: m
Test: add 'double_loadable: true, gen_trace: true` to an aidl_interface
module. The build doesn't break.

Change-Id: Iccd1a9d445a48d03c373708ba1bdd34b9a7f152d
2021-01-14 18:29:47 +09:00
Chih-Hung Hsieh a66a988708 Fix comment. am: b767f913f1 am: 94bdb905c9 am: 575999b9cb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1549745

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib964ff78ad7dce355985e3489b5e884026b6536e
2021-01-14 09:05:12 +00:00
Ryan Prichard b35a85ee8b Switch platform EH unwinder to prebuilt LLVM libunwind
For the platform libc++ STL, remove the
-Wl,--exclude-libs,libunwind_llvm.a argument, which is redundant with
the same argument in deviceGlobalLdflags.

Bug: http://b/153025717
Test: device boots
Change-Id: Idd7791d52f74aab2d5f59419fb75f841fc29a2eb
2021-01-13 19:51:06 -08:00
Colin Cross 7821224d8e Remove global state from VNDK
Move the global lists of VNDK modules into boolean properties on the
modules themselves, and use the new SingletonModule functionality
to visit all modules and collect the list of modules with the properties
set.

Bug: 176904285
Test: all soong tests
Test: m checkbuild
Test: compare Soong outputs
Change-Id: Icf7e2f8f190a517d30f0780e98762bc0084ddb24
2021-01-13 16:44:32 -08:00
Yifan Hong 78d0f4880c Must use vendor variant for health storage AIDL HAL
Test: mmma hardware/interfaces/health/storage
Bug: 177470478
Change-Id: Iae8dc547d68ecb528c0eb9684353267c1dd30459
Merged-In: Iae8dc547d68ecb528c0eb9684353267c1dd30459
2021-01-13 16:11:45 -08:00
Yifan Hong caaef4d275 Must use vendor variant for health storage AIDL HAL
Test: mmma hardware/interfaces/health/storage
Bug: 177470478
Change-Id: Iae8dc547d68ecb528c0eb9684353267c1dd30459
2021-01-13 16:07:37 -08:00
Chih-hung Hsieh 863faf6e6c Merge "To use same default for the nightly builds." am: 66f7fdd1c8 am: 10850c9de7 am: c98dc51ae0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1546617

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3d49935dc0b7fb70107a2211a7fac2d961643060
2021-01-13 23:01:16 +00:00
Chih-Hung Hsieh b767f913f1 Fix comment.
Test: make
Change-Id: I6c69549cb873e1d160ec6d590749361dc1a291dd
2021-01-13 13:24:15 -08:00
Chih-hung Hsieh 66f7fdd1c8 Merge "To use same default for the nightly builds." 2021-01-13 21:22:48 +00:00
Orion Hodson 3264c90068 Merge "Remove remaining libnativehelper implicit includes" am: 62555ffa5a am: 02d9f55b5b am: 448a038a4d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1371943

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib9e4a808dc8d72c03232850374708164a08b2915
2021-01-13 07:46:01 +00:00
Orion Hodson 62555ffa5a Merge "Remove remaining libnativehelper implicit includes" 2021-01-13 06:11:03 +00:00
Colin Cross afeacbb1ce Merge changes Ib29ede45,I1b2bfdfb am: 2bcb4940bb am: 0968f0b55e am: b892007c84
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1541225

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I38cdae92656ef4304cda49eb7da36d95e00ef90b
2021-01-12 22:25:08 +00:00
Evgenii Stepanov 70b23f8fd4 Merge "Include/exclude lists for memtag_heap sanitizer." am: e7c39a5da4 am: 40ab27f081 am: e03a8aefb8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1540685

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5629e73f4fed9db72fb08026dbd4efcedb51336e
2021-01-12 22:23:57 +00:00
Colin Cross 2bcb4940bb Merge changes Ib29ede45,I1b2bfdfb
* changes:
  Create LLNDK vendor variants when DeviceVndkVersion is not set
  Add a new SingletonModule type
2021-01-12 20:43:39 +00:00
Evgenii Stepanov e7c39a5da4 Merge "Include/exclude lists for memtag_heap sanitizer." 2021-01-12 19:33:02 +00:00
Chirag Pathak cfa220559d The build related changes for Secure Clock and Shared Secret functionalities.
Also restored sorting.

Test: N/A
Bug: b/171844725
Bug: b/168673523

Change-Id: I423e08cab38ef685fd9eb6a3c338e285de0e8757
2021-01-12 11:13:16 -08:00
Jiyong Park b35a819834 __ANDROID_API__ tracks min_sdk_version
Previously, for cc_* modules, __ANDROID_API__ tracked the sdk_version
property. This however has caused a few number of problems:

1. It's confusing. __ANDROID_API__ has meant minSdkVersion. Therefore
the sdk_version property should mean minSdkVersion (since the macro
tracks the property). However, the introduction of the new
min_sdk_version property (which is currently for APEX) made this very
confusing. Also, this is not consistent with the java_* modules where
sdk_version means compileSdkVersion.

2. This is preventing go/android-future-symbols. The plan is to make the
APIs that are above the minSdkVersion available as weak symbols.
Previously those APIs had to be accessed via dlsym because they are
hidden behind the __ANDROID_API__ macro at build-time. To use make the
APIs visible at build-time, the module authors had to __ANDROID_API__
beyond their minSdkVersion. This is against the definition of
__ANDROID_API__.

To solve above problems, __ANDROID_API__ now correctly tracks
min_sdk_version. In addition, min_sdk_version now defaults to
sdk_version. Therefore, most of the modules that don't set
min_sdk_version aren't affected by this change.

Bug: 163288375
Test: m
Change-Id: I645e6bb1234c27ae0a69b7b87a59206cfd350744
2021-01-13 03:12:24 +09:00
ChengYou Ho 8e5839c075 Create authsecret aidl interface am: 50ab3ff048 am: 9739215454 am: 355ab7a280
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1541204

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2967ea71cbcdd168f07cd985556c7be739949996
2021-01-12 09:37:13 +00:00
Chih-Hung Hsieh b063dc4221 To use same default for the nightly builds.
* disable misc-no-recursion check

Bug: 173736193
Test: make with WITH_TIDY=1
Change-Id: Ibdf90d520f67b26f7adade4698868a47afa01161
2021-01-12 00:55:28 -08:00
ChengYou Ho 50ab3ff048 Create authsecret aidl interface
Bug: 176107318
Change-Id: Ia2ddb148600fb846a41802b25ec73a7747720090
2021-01-12 06:01:15 +00:00
Evgenii Stepanov 7e1167549f Support "memtag_heap" sanitizer. am: 193ac2eb96 am: c93afaf7ee am: 580eb59fb1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1538502

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I952769cd9b4c1f4348db18fbc6b1194c2e6e86fe
2021-01-12 03:43:44 +00:00
Evgenii Stepanov 4beaa0c964 Include/exclude lists for memtag_heap sanitizer.
Bug: b/135772972
Test: cc_test.go / TestSanitizeMemtagHeap
Change-Id: I263b23647f1874ae3024101dce1b07091c1c9403
2021-01-11 17:50:07 -08:00
Evgenii Stepanov 193ac2eb96 Support "memtag_heap" sanitizer.
Memtag_heap adds an ELF note that enables MTE heap tagging in
bionic/scudo. Ignored on non-executables. With diagnostic
(diag:{memtag_heap:true}) enables the SYNC mode, otherwise - ASYNC mode.

Memtag_heap defaults to set (with diag) on cc_test targets, unset
otherwise. Ignored on non MTE-compatible hardware.

Bug: b/135772972
Test: soong tests

Change-Id: I88fd0f159e609e17bd13487749980a1ba02cb91c
2021-01-11 21:50:39 +00:00
Cindy Zhou 16d02e9e7f Merge "Build against cfi supported coverage lib" 2021-01-11 19:33:16 +00:00
ChengYou Ho 35556e51b6 Create OemLock aidl interface am: 142b28a095 am: 33274bb3ec am: de21b6de15
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1542685

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9807537e7eda2efca383f8babd6b14bd51611f4c
2021-01-11 07:43:35 +00:00
ChengYou Ho 142b28a095 Create OemLock aidl interface
Bug: 176107318
Change-Id: I31da15e7aedfaafb1841de0fc8e81aed73405ae0
2021-01-11 05:57:07 +00:00
Cindy Zhou 7e82baa8fe Build against cfi supported coverage lib
The change will detect if a module is compiled against cfi support, and
will usebuild the coverage build against the libprofile that supports cfi. This is to resolve compilation errors when
building against modules with cfi support.
Bug: 177098919
Test: forrest build for cf_x86_phone-userdebug_coverage http://go/forrest-run/L81700000786828933

Change-Id: I8e0421cdf1c6e499292cfa3457cefd3c42f13155
2021-01-10 06:35:48 -08:00
Treehugger Robot 74f08f9b44 Merge "Update comments for (vendor|product)_available" am: 4ba271573d am: 428410f284 am: c08535a83b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1542686

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If0e5dc0279f54de3b5fda1e5eee588240f0862b1
2021-01-08 21:38:07 +00:00
Treehugger Robot 4ba271573d Merge "Update comments for (vendor|product)_available" 2021-01-08 20:48:15 +00:00
Kris Alder 7a4f30005a Merge "add options for LibFuzzer, HWASan, and ASan to fuzz_config" am: 4803765257 am: 73fb162a6e am: 28fd479588
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1542043

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic97e9d59e340fe19c274c93c800ef616aac1f274
2021-01-08 17:55:17 +00:00
Ivan Lozano 0000a41830 Merge "Refactor CC to prep for Rust sanitizable modules." am: 65f7312db0 am: 09e17772e3 am: f5fd6bd02e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1527233

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3af612b60d961dee88accfbb726fcdda29d45cdf
2021-01-08 17:54:56 +00:00
Kris Alder 4803765257 Merge "add options for LibFuzzer, HWASan, and ASan to fuzz_config" 2021-01-08 17:06:28 +00:00
Ivan Lozano 3968d8f678 Refactor CC to prep for Rust sanitizable modules.
Adds a PlatformSanitizable interface which both CC and Rust can
implement so that the sanitizer mutators in CC can sanitize Rust
shared/static libraries appropriately.

Bug: 147140513
Test: m nothing
Change-Id: Ib31103b6c4902a4d5df2565c0d7c981298d100a3
2021-01-08 08:53:46 -05:00
Justin Yun 0b1db6d5e9 Update comments for (vendor|product)_available
As we replaced '(vendor|product)_available: false' with
'vndk.private: true', update the soong comments with it.

Bug: 175768895
Test: na
Change-Id: Iaa08d0caf2995d2327443e156abe8448c4e500c5
2021-01-08 15:22:34 +09:00
Treehugger Robot b0c3fd7a0e Merge "Do not read 'vendor_available: false'" am: 86cc40a74c am: d2279b4421 am: 49f37c378d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1541272

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5cec2463cb34c06838e191f2a721978154c6b460
2021-01-08 01:27:50 +00:00
Treehugger Robot 2d349e4514 Merge "Implement fake vendor snapshot" am: 56bfef1032 am: a64ac34c21 am: 087944d6e4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1538640

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I08fc4e8479f49f595467890407f3d2e057294202
2021-01-08 01:27:08 +00:00
Treehugger Robot 4a4432ed0e Merge "Remove redundant snapshot functions" am: 42beaf6d93 am: a2461dae24 am: 03dca72f33
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1541207

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6c24183bb6fdafc0736377b2062aa5a2cd4da129
2021-01-08 01:26:55 +00:00
Colin Cross b5f6fa678d Create LLNDK vendor variants when DeviceVndkVersion is not set
The LLNDK vendor variants need to exist even when the VNDK is not
being used in order for the next patch to list them once the global
maps are removed.

Bug: 176904285
Test: m checkbuild
Change-Id: Ib29ede455d5b6a4b7d3f4685db8fba6d32025314
2021-01-07 17:19:27 -08:00
Treehugger Robot 86cc40a74c Merge "Do not read 'vendor_available: false'" 2021-01-08 00:57:35 +00:00
Treehugger Robot 56bfef1032 Merge "Implement fake vendor snapshot" 2021-01-08 00:24:51 +00:00
Treehugger Robot 42beaf6d93 Merge "Remove redundant snapshot functions" 2021-01-08 00:24:27 +00:00
Kris Alder c81f59f03e add options for LibFuzzer, HWASan, and ASan to fuzz_config
Bug: 176998722
Test: built fuzz target with these options specified, checked resulting
config.json

Change-Id: Id38668dd11e76eead4ec87bd225ba67e3b30b80d
2021-01-07 23:43:10 +00:00
Colin Cross 912f1700a8 Merge "Split vndk_libraries_txt into multiple module types" am: ee7d0fd0f6 am: 15e8f2b6ca am: 8e37c43f3d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1541063

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I445abaa15513343916904d063ca106b30d5cd0b1
2021-01-07 19:20:21 +00:00
Justin Yun c0d8c49224 Do not read 'vendor_available: false'
In case of VNDK, 'vendor_available: false' had a special meaning that
defines VNDK-private libraries. It is not trivial because not
defining a boolean property means 'false' normally. To avoid the
confusion replace it with the 'vndk.private: true' for VNDK-private
libraries and 'private: true' for LLNDK-private libraries.

All VNDK libraries must define 'vendor_available: true' and may have
'vndk.private: true' if they are VNDK-private.
With this change '(vendor|product)_available: false' is the same as
not defining the property.

LLNDK-private must define 'private: true' instead of
'vendor_available: false'.

Bug: 175768895
Test: build
Change-Id: I57fbca351be317257d95027f3cdcdbbe537eab23
2021-01-07 17:58:55 +09:00
Inseob Kim 0c1ca4c3e4 Remove redundant snapshot functions
Leaving only isSnapshotAware is sufficient and clearer than before.

Test: m nothing
Change-Id: I497ee72ca0cc2386b1b947732473ac63b722621c
2021-01-07 05:15:50 +00:00
Inseob Kim e9aec6aaca Implement fake vendor snapshot
A fake vendor snapshot is a vendor snapshot whose prebuilt binaries and
captured headers are all empty. It's much faster to be built than the
real vendor snapshot, so users can exploit the fake vendor snapshot to
reduce the size of vendor snapshot they need, by installing the fake
snapshot and then inspecting the ninja dependencies.

Bug: 157967325
Test: m dist vendor-fake-snapshot
Change-Id: I5e16e8dbbf9dd5e753cdd471ca73d06984a6cb2c
2021-01-07 14:09:31 +09:00
Colin Cross 21d6f869c6 Fix llndk_library init am: 4f4f8ebd3f am: dcc5fc1550 am: 9f84abfe40
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1541062

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3d6a83a820d6f01d96e52dce0b037ee3c5b8076e
2021-01-07 03:59:02 +00:00
Treehugger Robot c6b6483362 Merge "Create vndkproduct.libraries.txt" am: 47d186cd4e am: 184f4f0668 am: f2fc837d01
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1519461

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I927426ae76b9755bb5ec9a48c42bdc53ee0b5051
2021-01-07 03:16:26 +00:00
Jooyung Han a2861d19f5 Merge "Add "aidl.flags:" property for cc_/java_ modules" am: 26ab0f1051 am: 076ed3bca3 am: fccf62ed45
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1538625

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7842f59026d63a2aab8efe354cc37f20ee9e39ab
2021-01-07 03:16:17 +00:00
Yabin Cui e769dbb352 Merge "Switch to clang-r407598 (12.0.1)." am: 87b16fa3b4 am: 5327ff1d57 am: 27451f6122
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1541244

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia255b87e3f72b5757193ad3d4edbede713fbf127
2021-01-07 03:15:20 +00:00
Colin Cross e4e44bc61b Split vndk_libraries_txt into multiple module types
Replace the vndk_libraries_txt module type with llndk_libraries_txt,
etc. in preparation for making it a new SingletonModule, which will
only work with a single instance of the module type.

Bug: 176904285
Test: m checkbuild
Change-Id: Ie010a9eeee8f5849201aa4ab4eb9b2e7a9cd7d5b
2021-01-06 17:54:30 -08:00
Colin Cross 4f4f8ebd3f Fix llndk_library init
llndk_library modules were not calling module.Init(), which caused them
not to register ModuleBase.VendorProperties.  Unregistered property
structs lose their values during cloning, which caused the shared
variants of llndk_library modules to not have IsLLNDK set.

Call module.Init(), which registers ModuleBase.VendorProperties.  Also
add a helper function to filter out llndk_library modules that now
show up in the list of modules with IsLLNDK set.

Bug: 170784825
Test: m checkbuild
Change-Id: Iafde85f6a95e85a618f6f7d7a210398febb6b158
2021-01-06 17:50:48 -08:00
Treehugger Robot 47d186cd4e Merge "Create vndkproduct.libraries.txt" 2021-01-07 01:43:15 +00:00
Jooyung Han 26ab0f1051 Merge "Add "aidl.flags:" property for cc_/java_ modules" 2021-01-07 01:28:47 +00:00
Yabin Cui 87b16fa3b4 Merge "Switch to clang-r407598 (12.0.1)." 2021-01-07 00:52:21 +00:00
Jose "Pepe" Galmes 005f4685ac Merge "Support for recovery snapshot." am: 7ba6f1cca7 am: 11d4dee3f1 am: 1b15ce5d98
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1526263

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2e59f440026537b88681972e2ba00d9bda4afded
2021-01-06 22:44:08 +00:00
Jose "Pepe" Galmes 7ba6f1cca7 Merge "Support for recovery snapshot." 2021-01-06 21:17:54 +00:00
Treehugger Robot 7746f3a695 Merge "Static variant deps are not considered as being in the same APEX" am: 4c89f3e11f am: 1735a305c7 am: 5a28af22c2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1538627

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie70efa1d2c7770165017b00c1d48738222bd6f87
2021-01-06 07:23:44 +00:00
Yabin Cui db7dda89f3 Switch to clang-r407598 (12.0.1).
Also suppress a clang-tidy warning and a ubsan check to pass compilation.

Bug: 171348143
Test: build.
Change-Id: Ie5162c15df172cefd7cff9776e54531fd620bc23
2021-01-05 19:43:45 -08:00
Jiyong Park 12177fc962 Static variant deps are not considered as being in the same APEX
The shared variant of a cc_library module depends on the static variant
of the same module. The dependency is just to optimize the build time by
not compiling the same source files twice. It doesn't mean that the
"static:" dependencies of the static variant are used to build the
shared variant. Therefore, the inter-variant dependency is considered
as NOT being in the same APEX.

Bug: N/A
Test: m

Change-Id: I7b8ff8e5bd5c9eb31fc4d8d18bd93dd80296fb81
2021-01-06 11:40:37 +09:00
Justin Yun 8a2600cfc9 Create vndkproduct.libraries.txt
Some VNDKs will be available to product modules by adding
'product_available' property. These VNDK libs will be listed in
vndkproduct.libraries.txt and tracked by the build system for the
changes. The product available VNDK list will be frozen by the
release process.

Bug: 174323911
Test: build
Change-Id: Ie1b085851413a8f2273925fefdc14fec3bfc7892
2021-01-05 20:05:39 +09:00
Jooyung Han e197d8b174 Add "aidl.flags:" property for cc_/java_ modules
The property can be used to pass additional flags to the AIDL compiler.
For example,

  cc_library {
    ..
    srcs: ["Foo.aidl"],
    aidl: {
      flags: [
        "-Werror",      // warnings as error
        "-Weverything", // turn on all warnings
      ],
    },
  }

Bug: 168028537
Test: soong test
Change-Id: I8120eeae7cd7b1acdd34c554af996a29e760a368
2021-01-05 10:40:22 +09:00
Florian Mayer 6dab96cb58 Document stubs in cc_library.
Change-Id: I36a9b884a8cc53e6a7192ef159e0cb2fdbb0e511
2020-12-31 11:39:48 +00:00
Cindy Zhou e0f80df81f Skip apex dep check when sanitizer diag is enabled am: 18417cbd72 am: 262139d285 am: c8680d0691
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1523578

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4bb1c055b4e7da0ebe1ff02d2eeb9df593cc3472
2020-12-29 18:12:50 +00:00
Cindy Zhou 18417cbd72 Skip apex dep check when sanitizer diag is enabled
To avoid adding ubsan to the apex allowed_dep list, this commit adds a
check on depedency tags to see if apex check should be skipped.
The check is only used on sharedLib dependencies when diag mode are enabled
for sanitizers.

Bug: 158010610

Test: make build for aosp-sargo and aosp_cf_x86_phone-userdebug

Change-Id: I3d7dbb70d8c80ffae1854819cf8cf9e6b0b15c00
2020-12-29 14:48:37 +00:00
Justin Yun f9de32202d Skip product variant for core-variant VNDK am: 31094b10d2 am: 05f5613573 am: ee4a7c8ece
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1534833

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I73a4426835e4db9d92e5e6fb3a51cfa40be89173
2020-12-24 09:43:55 +00:00
Justin Yun 31094b10d2 Skip product variant for core-variant VNDK
VNDK "mustUseVendorVariant" option checks only for the vendor
variant. Since the product variant of the VNDK is skipped from
installing, we don't need check product variant for
"mustUseVendorVariant" check.

Bug: 176268903
Test: m libxml2.product
      m libxml2.vendor
Change-Id: I3b10f0579aceca1fb32fa4d6fb21dc020a35874d
2020-12-24 16:11:23 +09:00
Treehugger Robot d02a9e1be7 Merge changes I81769f57,I28fb6886 am: 2187e41f05 am: ea47fd675a am: 856b3dee70
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1534827

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I868969a3e53f17831b9fa4bc2c5bb0056a747a27
2020-12-24 06:24:37 +00:00
Justin Yun fd9e804470 Define vndk.private property for VNDK-private libraries
To define VNDK-private libraries, we used `vendor_available: false`.
Because of it, `vendor_available == nil` had different meaning from
`vendor_available: false` for the VNDK libraries.
To clarify this, we change the logic for defining VNDK-private
libraries which was:

cc_library {
    name: "vndk_private",
    vendor_available: false,
    product_available: false,
    vndk: {
        enabled: true,
    },
}

It must be replaced with

cc_library {
    name: "vndk_private",
    vendor_available: true,
    product_available: true,
    vndk: {
        enabled: true,
        private: true,
    },
}

Bug: 175768895
Test: m nothing
Change-Id: I81769f57c2231e54b682a28e4b82631ab9f3d390
2020-12-24 10:51:07 +09:00
Jose Galmes 6f843bc4ba Support for recovery snapshot.
Bug: 171231437

Test: source build/envsetup.sh
Test: ALLOW_MISSING_DEPENDENCIES=true m -j nothing

Change-Id: I74636cf7f97e027a229a5ef7c776f2b7a42ead95
2020-12-23 10:34:44 -08:00
Justin Yun 6977e8a80c 'vendor_available: *' will not create product variant
With this patch, `vendor_available: true` will no longer creates
product variant. Instead, modules need to set `product_available:
true` if they have to be available to product vanriant.
If both properties are defined for VNDKs, they must have the same
values.

Bug: 150902910
Test: m nothing
Change-Id: I28fb6886e6114583227a31151136627c8516ac9c
2020-12-23 18:14:30 +09:00
Jaewoong Jung de6671062a Merge "Remove unnecessary snake case variables." am: e794b1e302 am: ce131b6fcf am: e3ec6f723e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1533880

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2e481c45e9fcc2e0023c03aed89320c49678dc86
2020-12-23 02:15:09 +00:00
Kalesh Singh df619a6997 Merge "Reland: Add android.hardware.memtrack-unstable-ndk_platform" am: 98dea94982 am: c425b49238 am: 12c0c922c2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1534599

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If661274a75f52c0a132b9c90d66dd05a33407ef9
2020-12-23 02:14:39 +00:00
Jaewoong Jung e794b1e302 Merge "Remove unnecessary snake case variables." 2020-12-23 01:21:28 +00:00
Kalesh Singh 98dea94982 Merge "Reland: Add android.hardware.memtrack-unstable-ndk_platform" 2020-12-23 01:20:51 +00:00
Kalesh Singh 7b63b2677d Reland: Add android.hardware.memtrack-unstable-ndk_platform
Bug: 175021432
Test: Fixes build failure on aosp/1518666
Change-Id: Id53bb93bfce35347637a271b7f6aa3c1c4d8c839
2020-12-22 20:49:54 +00:00
Jaewoong Jung 18aefc1977 Remove unnecessary snake case variables.
Test: m nothing + TreeHugger
Change-Id: I99f7162944daa6c57c6ae4763261e108bb5cb6b1
2020-12-22 12:38:35 -08:00
Colin Cross 091e094210 Merge changes from topic "llndk_cc_library" am: 1f8c272984 am: f0dee605eb am: 4ee7ea6517
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1532861

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icdaf99352b87880777e36ec8c1a3a3479b03c715
2020-12-22 20:07:50 +00:00
Colin Cross 127bb8b9f6 Don't rewrite LLNDK dependencies with .llndk suffix
Rewriting LLNDK dependencies with .llndk suffix requries referencing
a global data structure to determine if a given library is an LLNDK
library and therefore needs the .llndk suffix.  References to
global data structures from mutators must be removed to support
incremental Soong analysis.  Instead, move the LLNDK stubs rules
into the vendor variant of the implementing cc_library so that
the original name can be used.

As an incremental step, the llndk_library modules are left in
place, and the properties are copied into the cc_library via
the dependency specified by the llndk_stub property.  A followup
will move the LLNDK properties directly into the cc_library and
delete the llndk_library modules.

The global list of LLNDK libraries is kept for now as it is used
to generate the vndk.libraries.txt file.

Bug: 170784825
Test: m checkbuild
Test: compare Soong outputs
Test: all Soong tests
Change-Id: I2a942b21c162541a49e27b2e5833c9aebccff1d0
2020-12-21 17:53:30 -08:00
Colin Cross adc81a0783 Don't strip stub libraries
LLNDK and NDK stubs are already not stripped, don't strip APEX stubs
either.

Test: m checkbuild
Change-Id: I9a50df4b8b73d764ca81634a8a3014726eceda99
2020-12-21 15:54:09 -08:00
Colin Cross 088fc71a70 Merge changes from topic "sbox_tools" am: 97a1be6e7b am: 62bc8d2316 am: cc288ca3f4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1531944

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icc640676d59a71e70fec6124fd8a4af42bd1be26
2020-12-17 23:30:16 +00:00
Colin Cross 97a1be6e7b Merge changes from topic "sbox_tools"
* changes:
  Sandbox genrule tools
  Call ctx.InstallFile for uninstallable cc modules
  Don't copy uninstallable variants of NDK libraries to sysroot
2020-12-17 22:01:06 +00:00
Colin Cross a9c8c9f145 Call ctx.InstallFile for uninstallable cc modules
SkipInstall is actually primarily used to prevent making a module
visible to Make, rename it and add new SkipInstall that actually
skips installation without affecting Make.

Call c.SkipInstall() for uninstallable cc modules to allow calling
c.installer.install, which will collect PackagingSpecs for
uninstallable cc modules, allowing them to be used by genrules.

Bug: 124313442
Test: m checkbuild
Change-Id: I8038ed5c6f05c989ac21ec06c4552fb3136b9a7a
2020-12-17 10:02:18 -08:00
Colin Cross 95b07f2b59 Don't copy uninstallable variants of NDK libraries to sysroot
After the next patch libraryDecorator.install will be called for
uninstallable variants of modules, manually filter them out when
copying to the NDK sysroot.

Bug: 124313442
Test: m checkbuild
Change-Id: I28b538d4ae271dc5e27c386d7cfa538ac0ed841b
2020-12-17 10:02:18 -08:00
Treehugger Robot 5818f23004 Merge "Assert android.ApexModule interface for types having ApexModuleBase" am: 1a74be780b am: 7d3e31bd70 am: bb56da8ed0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1530138

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idc0a30d1747606337cfdfd4ce76495dcf4cadc05
2020-12-17 05:25:14 +00:00
Treehugger Robot 1a74be780b Merge "Assert android.ApexModule interface for types having ApexModuleBase" 2020-12-17 04:14:35 +00:00
Treehugger Robot 2778154a44 Merge "versioning macro is exported from prebuilt stubs as well" am: 6a8c18a89b am: a781b0a384 am: 7a162fecb3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1527540

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4e4ca257dc6b58f34dc42a918d3af44f46238456
2020-12-16 03:20:56 +00:00
Kalesh Singh 5b2cbe6810 Merge "Revert "Add android.hardware.memtrack-unstable-ndk_platform"" am: fc0cba0b77 am: cf7a4b306f am: dcf072887d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1530882

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9ed5e1681bb4287b47c17037d5613bcb95518238
2020-12-16 02:22:57 +00:00
Treehugger Robot 6a8c18a89b Merge "versioning macro is exported from prebuilt stubs as well" 2020-12-16 01:31:10 +00:00
Kalesh Singh fc0cba0b77 Merge "Revert "Add android.hardware.memtrack-unstable-ndk_platform"" 2020-12-16 00:48:06 +00:00
Kalesh Singh 67d69f0d1c Revert "Add android.hardware.memtrack-unstable-ndk_platform"
Revert submission 1518702-memtrack-aidl

Reason for revert: Broken tests and boot time regressions
Reverted Changes:
Ic4dd70e2c:Add android.hardware.memtrack-unstable-ndk_platfor...
Iaf99d0ca4:Add stable aidl memtrack HAL to product packages
Iac54ae2ba:Add stable aidl memtrack hal to vndk list
If310210a3:libmemtrack: Add support for AIDL memtrack HAL
Ib6c634def:Memtrack HAL: Add stable AIDL implementation
I5e1d0e006:Memtrack HAL stable aidl sepolicy

Change-Id: I4fc71dc5813d10600727a2630c10f5d113f61936
2020-12-16 00:19:38 +00:00
Colin Cross d525d8eec7 Require libraries in header_libs to be cc_library_header am: 649d8174b8 am: c4fe1486ec am: a8c1c23da1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1524479

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5e59aa8e4dcc904b2392d7c2507dc1b6d569ac84
2020-12-15 19:11:35 +00:00
Jiyong Park 892a98f0a3 versioning macro is exported from prebuilt stubs as well
This change fixes a bug that the versioning macro (__LIBNAME_API__) is
omitted for prebuilts providing a stub.

Bug: 175166063
Test: m nothing

Change-Id: I1cce5ab58ef245622861200ec0d8b0f84e3178ed
2020-12-16 03:54:44 +09:00
Colin Cross c4fe1486ec Require libraries in header_libs to be cc_library_header am: 649d8174b8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1524479

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I38b99339549dda7c6a8353eb1a6fd260117f17a7
2020-12-15 18:51:54 +00:00
Colin Cross 01a44004fd Merge changes from topic "header_libs_requirement"
* changes:
  Add libstagefright_mp3dec_headers to allowed apex deps
  Require libraries in header_libs to be cc_library_header
2020-12-15 18:40:55 +00:00
Jiyong Park 45bf82e953 Assert android.ApexModule interface for types having ApexModuleBase
Bug: 173472337
Test: m nothing
Change-Id: Idf1c6cb9fff6c18e34c4636e38a662ba4ff7d538
2020-12-15 14:31:27 +00:00
Yo Chiang f093c56bea Merge changes Ie540dba5,Ibfc29fe0,I99e97787 am: e8e8606892 am: dc5b316ddc am: cbac6b98d8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1513138

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8f458a270870b1ccbd70bd2e2a458cabdf90af38
2020-12-15 08:11:57 +00:00
Treehugger Robot 823858592c Merge "Prebuilt stub not available to platform is handled correctly" am: e223512bb4 am: 1dc12fc99b am: 82424f5085
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1521398

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I60a5d277ae8dd38963e71bd3ff6002443c11b7ec
2020-12-15 08:11:42 +00:00
Yo Chiang e8e8606892 Merge changes Ie540dba5,Ibfc29fe0,I99e97787
* changes:
  Refine ABI check and enable ABI check on APEX exported libs
  Refactor cc/cc.go cc/library.go shouldCreateSourceAbiDump()
  Refactor cc/sabi.go
2020-12-15 06:45:11 +00:00
Treehugger Robot e223512bb4 Merge "Prebuilt stub not available to platform is handled correctly" 2020-12-15 06:26:33 +00:00
Jiyong Park f7c3bbe433 Prebuilt stub not available to platform is handled correctly
When a shared library providing stubs is included in an APEX, only the
stub variant (i.e. version:"1", etc.) gets emitted to Android.mk. This
enforces that everything in the Make world to link to the stub providing
only the public APIs of the library. The non-stub variant (i.e.
version:"") isn't exposed, otherwise, others will be able to access
private part of the lib which isn't guaranteed to be stable.

This has been done by unhiding the stub variant when it is known that
the library is actually included in an APEX. Note that stub variants are
by default hidden.

The above mechanism however doesn't work when the shared library is
replaced by a prebuilt and when the APEX is also replaced by a prebuilt.
Then, the fact that the prebuilt library is actually in the APEX gets
lost.  In that case, AnyVariantDirectlyInAnyApex() returns false for the
prebuilt library. As a result, the stub variant remains hidden and not
emitted to Android.mk.

This change fixes the problem by checking if the lib isn't available for
the platform at all. If not available for the platform (e.g.
apex_available doesn't have "//apex_available:platform"), the lib is
assumed to be included in an APEX even when it actually didn't go
through the apex mutator (... because it's a prebuilt).

Bug: 175166063
Test: m nothing

Change-Id: I41fabd5b368baecf4dc3c5a080b466f8bcd79d77
2020-12-15 09:17:36 +09:00
Treehugger Robot 2dd6ecceee Merge "Add android.hardware.memtrack-unstable-ndk_platform" am: 1e14bed0c6 am: e636d61bb1 am: b6af5aca26
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1522521

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I328c078df2b86e4334dc035e93d6edcb97c93f24
2020-12-14 20:09:30 +00:00
Colin Cross 649d8174b8 Require libraries in header_libs to be cc_library_header
Allowing header_libs to refer to a cc_library, cc_library_static
or cc_library_shared was unintentional, make it an error.

Fixes: 173252016
Test: m checkbuild
Change-Id: I9f7986f6ca37deddf1f208b15a87d3c0cff25585
2020-12-14 19:12:10 +00:00
Treehugger Robot 1e14bed0c6 Merge "Add android.hardware.memtrack-unstable-ndk_platform" 2020-12-14 18:36:10 +00:00
Paul Duffin 4707f03be8 Merge changes Iaca95efc,I7ccd5581 am: 57fab96e01 am: 3645404e1c am: 777bf29f3b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1526698

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4dc62c5042f18edc7741c949868c9654e5e70202
2020-12-14 14:07:01 +00:00
Paul Duffin 57fab96e01 Merge changes Iaca95efc,I7ccd5581
* changes:
  Add RemoveOptionalPrebuiltPrefix() helper function
  Delegate work of apexInfoMutator to ApexInfoMutator interface
2020-12-14 10:54:21 +00:00
Yo Chiang d737d3f2a6 Refine ABI check and enable ABI check on APEX exported libs
* Don't check ramdisk and recovery variants.
* Don't check bionic libraries of bootstrap variant.
* Don't check uninstallable libraries.
* Check APEX exported libraries.

Bug: 145608479
Test: Presubmit
Test: diff lsdump_paths.txt, verify the changes are as expected.
Change-Id: Ie540dba563277307c51b533cd982d7317796b48b
2020-12-14 03:43:06 +00:00
Yo Chiang 2bbadfaef7 Refactor cc/cc.go cc/library.go shouldCreateSourceAbiDump()
* Consolidate the two shouldCreateSourceAbiDump() in cc/cc.go and
  cc/library.go into cc/sabi.go.
* Rename SAbiProperties.CreateSAbiDumps to ShouldCreateSourceAbiDump.
* sabiDepsMutator determines whether a library needs to generate ABI
  dump, and mark their ShouldCreateSourceAbiDump property.
* After this change, sabi.Properties.ShouldCreateSourceAbiDump is the
  single source of truth of whether ABI dump should be created or not.
  GenerateAndroidBuildActions() should check the property, or call the
  property accessor (*sabi).shouldCreateSourceAbiDump().
* classifySourceAbiDump() is no longer a *libraryDecorator receiver.
  Instead it uses the libraryInterface object in the
  ctx.Module().(*cc.Module).library field. This way
  classifySourceAbiDump() doesn't need to depend on the internal fields
  of libraryDecorator.

Bug: 145608479
Bug: 173492236
Test: Presubmit
Test: Dump the list of module names marked by sabi_deps mutator
Change-Id: Ibfc29fe0153551ab6e2d56ff38ab9bae2c179e0b
2020-12-14 11:42:16 +08:00
Yo Chiang 8aa4e3f99e Refactor cc/sabi.go
* Rename `vndk_deps` mutator to `sabi_deps` to better reflect its
  purpose.
* Eliminate duplication of ABI dump generation logic. sabiDepsMutator
  should call libraryDecorator.shouldCreateSourceAbiDump() to determine
  if a module needs to be marked with CreateSAbiDumps.
* Non-VNDK libraries that are opt-in to ABI check would have their
  dependencies correctly marked with CreateSAbiDumps.
* Refactor some lines to idiomatic syntax.
* Add comment strings.

Bug: 145608479
Bug: 173492236
Test: TH presubmit
Change-Id: I99e97787bdf2a4f0c970809161b64aa668ff3d1a
2020-12-14 03:04:58 +00:00
Treehugger Robot aa81733320 Merge "Move keymint to android.hardware.security." am: f876a3866a am: 572056d685 am: 23cbdc54de
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1525191

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia1fe399567a10c7b129cf1e3feff809e649bf6ff
2020-12-12 01:07:06 +00:00
Shawn Willden 7831d3eb42 Move keymint to android.hardware.security.
Bug: 175345910
Bug: 171429297
Test: Build
Change-Id: I219fd6c976cf6b624dcf0ae234f66e27ff251cd0
2020-12-11 20:37:03 +00:00
Pirama Arumuga Nainar 9feeccf51c Merge "[coverage] Wrap calls to open" am: d36c83862f am: bc7aa97fed am: 41bc006e9f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1524347

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4ce4ba2f3a93e38b98e4cff674a6b4a7cbaeb009
2020-12-11 18:51:12 +00:00
Paul Duffin d23c726b36 Add RemoveOptionalPrebuiltPrefix() helper function
Test: m nothing
Bug: 171061220
Change-Id: Iaca95efcaf3f02e066751c6e988d609ac40e048a
2020-12-11 18:13:08 +00:00
Pirama Arumuga Nainar d36c83862f Merge "[coverage] Wrap calls to open" 2020-12-11 17:42:09 +00:00
Ivan Lozano 05e4f9f535 Merge "Refactor for preliminary Rust vendor image support" am: f48c89cd39 am: f0da84ce8e am: ebb9cb3fe7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1515798

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I342bd25e0b164ed95f78b522c91335faa9592f40
2020-12-11 14:47:43 +00:00
Ivan Lozano f48c89cd39 Merge "Refactor for preliminary Rust vendor image support" 2020-12-11 13:40:20 +00:00
Jiyong Park 75a7ca7955 Merge "stub variants also re-exports headers" am: 6f05a73e3e am: 0c6aecfa06 am: 4d4fce3df8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1518569

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie1ca06edc0f0f3f58951f037696f446c8c350549
2020-12-11 10:09:00 +00:00
Jiyong Park 6f05a73e3e Merge "stub variants also re-exports headers" 2020-12-11 08:50:12 +00:00
Jiyong Park 1ad8e16fbe stub variants also re-exports headers
This change fixes a bug that headers are not re-exported from stub
variants of a library, if the headers are not from header libs, but from
shared or static libs. This is because only header lib dependencies
are respected for stubs variants.

The fix is as follows. 1) dependencies to the shared/static libs are
added even for stubs variants. 2) instead, in depsToPaths, they are
treated like header libs (i.e. don't contribute to linkFile) for the
stubs variants.

Bug: 174558745
Test: m

Change-Id: Iab6c77e7817055d0f2d09cb114186b30164fc231
2020-12-11 13:48:28 +09:00
Treehugger Robot 4a6181a4f4 Merge "Add some comments for VNDK / vendor snapshots" am: b0ed5768d3 am: 8d70093762 am: 0cfc6b8fbb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1515174

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I85fb2e97c8c8bd8778de852a0b61b2c095b4cf52
2020-12-11 01:43:26 +00:00
Jiyong Park 6535de6429 Merge "Add min_sdk_version to Rust modules." am: 0d399b5915 am: 6b31120281 am: a3df735a37
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1518205

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I03d817a3067f6ca0165b3e1b0593d56397003744
2020-12-11 01:16:42 +00:00
Treehugger Robot b0ed5768d3 Merge "Add some comments for VNDK / vendor snapshots" 2020-12-11 00:56:47 +00:00
Jiyong Park 0d399b5915 Merge "Add min_sdk_version to Rust modules." 2020-12-10 23:54:34 +00:00
Pirama Arumuga Nainar 9464b6cc6c [coverage] Wrap calls to open
Bug: http://b/173448692

The coverage runtime creates files with uga+rw permissions but an
earlier umask call can restrict these and cause problems with profile
merging ('%Nm' in LLVM_PROFILE_FILE).  This change passes `--wrap,open`
to coverage builds.  The other change in this topic adds the wrapper
function to set the permissions again using `fchmod` (only for files
opened under /data/misc/trace).

Test: Manually validate permissions of files under /data/misc/trace.
Test: libprofile-clang-extras-test
Change-Id: I881474ab184d03d14c5637951aac027a363739b6
2020-12-10 21:45:34 +00:00
Steven Moreland 2057b7f960 Merge "target.apex.exclude_[shared|static]_libs to cc_* modules" am: 35989ae98b am: 2abc02e623 am: 3d8f7f7419
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1515154

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifab3239fe0c6af2caa8e76a6dbe83bd38458e652
2020-12-10 20:20:39 +00:00
Steven Moreland 35989ae98b Merge "target.apex.exclude_[shared|static]_libs to cc_* modules" 2020-12-10 19:02:02 +00:00
Ivan Lozano f9e2172aec Refactor for preliminary Rust vendor image support
Refactors parts of CC to prepare for preliminary support for using Rust
static libraries in vendor images. Some previously private functions are
made public, and additional functions are added to LinkableInterface so
GetMakeLinkType can be passed a LinkableInterface.

Bug: 172525289
Test: m
Change-Id: I5fda48e79532fe9ceab255e18d910af58048a123
2020-12-10 10:29:48 -05:00
Inseob Kim de5744a199 Add some comments for VNDK / vendor snapshots
Also some files are refactored:

- snapshot_prebuilt.go is separated from vendor_snapshot.go. Now
vendor_snapshot.go contains snapshot generation codes, while
snapshot_prebuilt.go contains module definition codes.

- Some helper functions are moved from snapshot_utils.go to util.go.

- Some ambiguous names of types and functions are renamed.

We still can add more detailed comments about the snapshots. They are to
be uploaded in follow-up changes, to avoid making this change too big.

Bug: 173474311
Test: generate vndk and vendor snapshot
Change-Id: I18fa837ccdf44a042b7a78e5c3df25fd2de96d95
2020-12-10 21:12:39 +09:00
Treehugger Robot 333f9b4c39 Merge "Remove AndroidMkExtraFootersFunc entries param." am: cac133df14 am: 528d2fdc51 am: e1ba585449
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1519314

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I855cb1808bfdf783ae4f16ece7c23bc6bda3f34c
2020-12-10 07:57:46 +00:00
Treehugger Robot cac133df14 Merge "Remove AndroidMkExtraFootersFunc entries param." 2020-12-10 07:04:02 +00:00
Christopher Parsons fac27b6833 Merge "Improve comments in cc/library.go and cc/linkable.go." am: 0529cd2d59 am: 87bc821304 am: b5ac71e8fb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1507523

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4544f721dda1c0904d383bf1932c7dfac6b2566f
2020-12-10 03:15:15 +00:00
Christopher Parsons 0529cd2d59 Merge "Improve comments in cc/library.go and cc/linkable.go." 2020-12-10 02:17:58 +00:00
Jiyong Park 13272fbc31 Merge "test_for is available for all cc_* module types" am: 2920d2cec0 am: 2b33ad60aa am: d21fb571b8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1517638

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I84ab5e04cf8af9be6d352a52ea2d2a1a6ca277cf
2020-12-10 01:13:12 +00:00
Jiyong Park 2920d2cec0 Merge "test_for is available for all cc_* module types" 2020-12-10 00:16:29 +00:00
Kalesh Singh d49e1829e6 Add android.hardware.memtrack-unstable-ndk_platform
Bug: 175021432
Test: Fixes build failure on aosp/1518666
Change-Id: Ic4dd70e2c707c8461f3a591d023555b26197fc14
2020-12-09 19:16:09 -05:00
Ivan Lozano 3e9f9e47cf Add min_sdk_version to Rust modules.
Add the min_sdk_version property to Rust modules so they can declare
a minimum SDK version they support for use with APEX modules.

Test: New Soong test passes.
Bug: 174862583
Change-Id: I2829053a320f50c218783dee5adbeff9cef81e8e
2020-12-09 11:30:44 -05:00
Treehugger Robot fefa64b629 Merge "Soong: add missing header-abi-dumper inputs" am: 61cb7ed6ff am: bf152250fe am: a28c7a2f37
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1511277

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iaf50fd6615abbea315896a58d4bbf72529216cac
2020-12-09 08:36:59 +00:00
Treehugger Robot 61cb7ed6ff Merge "Soong: add missing header-abi-dumper inputs" 2020-12-09 07:26:36 +00:00
Jiyong Park 46a512f1f5 test_for is available for all cc_* module types
Sometimes, the ordinary cc_library_* modules need test_for property when
they are part of a bigger cc_test. Instead of propagating the test_for
property from cc_test to its dependencies, this change requires the very
dependency which needs access to the private part of an APEX to
explicitly have the test_for property.

Bug: 161575591
Test: m
Change-Id: Ie1ffe9a60cd2ab02d41bbe5a98225a40392470f6
2020-12-09 12:59:19 +09:00
Jaewoong Jung 02b11a6035 Remove AndroidMkExtraFootersFunc entries param.
I added in case anyone needs to access AndroidMkEntries to generate
footer lines, but nobody uses it, and it only confuses people.

Test: m nothing, TreeHugger
Change-Id: Ic8a450e3c306d9228c1fdec212c7441bd6aaee03
2020-12-07 10:23:54 -08:00
Steven Moreland 1233062860 Merge "vndk.go: remove keymint" am: 252e4c44f1 am: 99d01eab68 am: 1970d8b464
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1514844

Change-Id: I780269d2c530b8c850fd36b5fd9414ebe900b7b3
2020-12-04 20:16:56 +00:00
Colin Cross 0e5cdace56 Merge "Allow stripping host modules" am: 110d13bef3 am: bfbe007c03 am: eb6d616dba
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1514992

Change-Id: I2be77ea911deda1795f8ad5c2aa348a0abea3020
2020-12-04 20:16:34 +00:00
Treehugger Robot 50a360aea2 Merge "Add context for invalid extensions for cc compile" am: 0157cc658a am: bf3f99940c am: e471078e1c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1516958

Change-Id: Ib9bd9c0204980f2b5acebf88a8b745056dec2b64
2020-12-04 19:33:36 +00:00
Steven Moreland 252e4c44f1 Merge "vndk.go: remove keymint" 2020-12-04 19:24:40 +00:00
Colin Cross 110d13bef3 Merge "Allow stripping host modules" 2020-12-04 18:24:13 +00:00
Colin Cross 2254cffd53 Allow stripping host modules
Turn on stripping for host modules if they explicitly request it.

Test: m checkbuild
Change-Id: Ia7c76a278ecacfe8a5bab1631af6c28b8b970999
2020-12-04 09:43:49 -08:00
Treehugger Robot 0157cc658a Merge "Add context for invalid extensions for cc compile" 2020-12-04 17:41:06 +00:00