Commit Graph

6123 Commits

Author SHA1 Message Date
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