Source tree may include prebuilt vndk snapshot libs that are newer
than or equal to the PLATFORM_VNDK_VERSION.
Ignore those prebuilt vndk snapshot libs.
Bug: 296488609
Test: lunch cf_x86_64_phone-next-userdebug; m nothing
Change-Id: I3adaf3b7636f53884f08540959d2ec2fddfb6921
Write toc files that list the exported symbols so dependents are
only rebuilt if the exported symbols change.
This exports the CC function TransformSharedObjectToToc, and also
removes an unused arg from its signature.
Bug: 178185435
Test: New Soong test passes.
Test: m <toc file path>
Change-Id: I7ab69bf7e7f32f25eb4c7ca9d18d877dac1511db
There was a reference to the static library provider, but only the
transitive static deps were used, so only store that part. Other members
were stored but unused anywhere.
Test: go test soong tests
Test: m nothing
Change-Id: I12a6b94806c052c3f0df3cab0a10f17042af1c38
Export additional fuctions, structs, and interfaces from cc for use in
the rust package to allow for rlib snapshotting.
Bug: 184042776
Test: m nothing
Change-Id: I4c53b9378d5d5b5973dbd23ab692cdfb2ede60b9
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
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
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
To make a module available to product variants, it must define
`product_available: true`. `vendor_available: true` will not create
product variants any more.
However, in this CL, we don't change the behavior of
`vendor_available` property. It still creates both variants. After we
update all Android.bp files that need to provide product variants
with `product_available: true`, we may upload the remaining patches.
Bug: 150902910
Test: lunch aosp_arm64-userdebug && m
Change-Id: I0fd5be7bbae2c45d5cab3c3c2ca49f53a9b6f975
This is to pass check_elf_files when vendor modules link against vndk
prebuilts. Because of the ".vendor" suffix, the intermediate path
becomes "libfoo.vendor.so" and it makes check_elf_files fail, when stem
and suffix is not specified.
Also, by adding such fields, devices with empty BOARD_VNDK_VERSION can
experience a build break due to collision between VNDK snapshot and VNDK
source module. To completely prevent such collision, all vndk snapshots
become explicitly uninstallable, and they are disabled if
BOARD_VNDK_VERSION is empty.
Test: build/soong/build_test.bash
Change-Id: I54a0f33fd0b84ab9376ee3d75b83113b94bbacae
VNDK libs are installed as part of VNDK APEX, so we don't need to
install them at all.
Bug: 170711679
Test: m
Change-Id: I62b881d6e65d6b007db1d26ab314c140c60e8a4e
Export information about static libraries, shared libraries and
exported flags through Providers instead of accessing the module
directly. Much more is left to be converted, but this significantly
simplifies the dependencies on libraries with stubs by making it easy
for a module to masquerade as another by simply exporting the
providers from the other module. Instead of depending on all the
versions of a library and then picking which one to use later, it
can depend only on the implementation variant and then select the
right SharedLibraryInfo from the variant.
Test: m checkbuild
Test: only expected changes to build.ninja
Change-Id: I1fd9eb4d251cf96ed8398d586efc3e0817663c76
The cc stripping logic can be reused for Rust. Export the Stripper
structure for that purpose. Extract the strip-related flags from
builderFlags into StripFlags. Add the method flagsToStripFlags
(similarly to flagsToBuilderFlags).
Add the helper method disableStripping on libraryDecorator.
Test: m
Bug: 153430439
Change-Id: I11aef1abb8d498a4c1672500a7398279edf7f548
cc_object modules are also necessary for vendor snapshot.
Bug: 157106227
Test: m vendor-snapshot
Change-Id: Idf4fd37a26f6f712f3cbab43133622f9f9bd9372
Merged-In: Idf4fd37a26f6f712f3cbab43133622f9f9bd9372
(cherry picked from commit 502679e061)
Flattened APEXes don't install modules hidden from make. This CL unhides
VNDK prebuilt modules to make VNDK APEX work correctly. The suffix for
VNDK prebuilt is still omitted if the version of prebuilt is same with
BOARD_VNDK_VERSION.
Bug: 149542527
Test: build arm64 GSI and flash
Test: Set BOARD_VNDK_VERSION and build
Change-Id: I54a7c14c93eccfefc81603ec3bb474a031bc55af
This implements four modules (static/shared/header libraries, and
binaries) for vendor snapshot. These modules will override source
modules if BOARD_VNDK_VERSION != current.
Bug: 65377115
Test: 1) VNDK_SNAPSHOT_BUILD_ARTIFACTS=true m dist vndk vendor-snapshot
Test: 2) install snapshot under source tree
Test: 3) set BOARD_VNDK_VERSION and boot cuttlefish
Change-Id: I24ddb4c3aa6abeab60bbfd31bcbd8753e2592dc5
exportedDirs and exportedSystemDirs are now changed to android.Paths so
that we can later manipulate the paths via Rel(), etc.
Test: m
Change-Id: I6fb02ea4983bcebac351bc284f75b44885379e8f
Older VNDK libraries are provided as vndk_prebuilt_shared modules. Those
are added to corresponding VNDK APEX as dependencies.
With VNDK APEX installed, VNDK libs are unnecessary. By the way, since
there can be vendor modules which depend on VNDK libs, Make targets are
still emitted with UNINSTALLABLE=true.
Android.mk has additional modules for vndk libraries which are named
with apex name as suffices. For example, if libfoo is a vndk library,
then libfoo.vendor is its vendor variant and it would be in
/system/lib/vndk. But with vndk apex, it has additional
libfoo.com.android.vndk.current variant.
Bug: 141451661
Bug: 139772411
Test: m (soong tests)
Test: boot with aosp_arm64 system image on Q vendor device
Change-Id: I269c28a4d4c4e2f1518bd51df558438fe5316774
Add a ToMakePath() method that returns a new path that points out
out/ instead of out/soong/, and replace the
"$(OUT_DIR)/" + path.RelPathString()
pattern with
path.ToMakePath().String()
Bug: 141877526
Test: m checkbuild
Change-Id: I391b9f2ed78c83a58d905d48355ce9b01d610d16
Vendor variant is now divided into several vendor.{version} variants,
depending on their intended usages:
vendor.{BOARD_VNDK_VERSION}: vendor and vendor_available modules
vendor.{PLATFORM_VNDK_VERSION}: VNDK modules in the source tree
vendor.{snapshot_ver}: VNDK snapshot modules
This also affects exported module names from Soong to Make. But to
maintain backward compatibility, ".{BOARD_VNDK_VERSION}" suffix will not
be emitted for modules having version BOARD_VNDK_VERSION, so that vendor
modules still can be referred as-is.
Bug: 65377115
Bug: 68123344
Test: clean build and boot blueline
Change-Id: Ib9016a0f1fe06b97e9423fd95142653a89a343fa
"apex_vndk" is a variant of "apex" module.
apex_vndk {
name: "com.android.vndk",
..
}
This rule is used to produce a VNDK APEX per vndk version.
It supports automatic inclusion of vndk libs.
If "vndk_version" property is set, the prebuilt vndk libs of
the version will be included in the apex bundle.
apex_vndk {
name: "com.android.vndk.v29"
vndk_version: "29",
...
}
Otherwise, platform's vndk version is used.
This will replace /system/{lib}/vndk-{ver} and vndk-sp-{ver}.
Bug: 134357236
Bug: 139772411
Test: m com.android.vndk
Change-Id: Ib5c86e625839389670d13c683a7427198ef6852f
vndk_prebuilt_shared is also one of prebuilt modules, so coverage
variants shouldn't be created.
Bug: 128524141
Test: m NATIVE_COVERAGE=true COVERAGE_PATHS=*
Change-Id: I586651c6775a6ae23dc0412ec5538eefd8e92dde
For all vndk snapshot libraries, header files exported by the libraries
will be included to the snapshot. Android.bp will contain necessary
information to link against/install vndk snapshot libraires:
export_include_dirs, export_system_include_dirs, export_flags, and
relative_install_path.
Bug: 132818174
Test: 1) m nothing && mv out/soong/build.ninja /tmp && m nothing &&
diff -u -u out/soong/build.ninja /tmp/build.ninja
Test: 2) VNDK_SNAPSHOT_BUILD_ARTIFACTS=true \
development/vndk/snapshot/build.sh
Test: 3) development/vndk/snasphot/update.py
Test: 4) see contents of Android.bp and include directories
Change-Id: I791ab181545eb483242b04446afd40958bbb2b17
Added vndk_prebuilt_shared synopsis.
Bug: b/128337482
Test: Generated the documentation and verified that the synopsis
was added to the vndk_prebuilt_shared module.
Change-Id: Id40246de65985b8b3b357744083c1d32c872e2ff
This commit adds prebuilt ABI checker support to soong so that
`cc_prebuilt_library_shared` and `cc_prebuilt_binary` are checked.
To opt out the check, add `check_elf_files: false` to your module.
Bug: 119086738
Test: lunch aosp_sailfish-userdebug && CHECK_ELF_FILES=true make check-elf-files
Change-Id: Idb4290c8f48aad545894a7ae718a537cbf832233
Export Soong cc modules to Make using a new soong_cc_prebuilt.mk that
bypasses all of prebuilt_internal.mk, dynamic_binary.mk and binary.mk.
This also means that stripping is handled in Soong instead of Make.
Relands If9008c50920779048480f5eeeb0084f26006c998 with fixes for
mac builds.
Bug: 113936524
Test: m checkbuild
Change-Id: I9710ff57f0793f36eb889eabd08bd60a365a88dd
Export Soong cc modules to Make using a new soong_cc_prebuilt.mk that
bypasses all of prebuilt_internal.mk, dynamic_binary.mk and binary.mk.
This also means that stripping is handled in Soong instead of Make.
Bug: 113936524
Test: m checkbuild
Change-Id: If9008c50920779048480f5eeeb0084f26006c998
For a vndk_prebuilt module that was built with 32 bit binder, add
"binder32bit: true" to its Android.bp module.
This will add .binder32 suffix to the name.
Bug: 74362637
Bug: 80450527
Test: m -j vndk_snapshot_package
Change-Id: I81049adbf5e67fe5e63d5ea3a8b027aaf6eb355b
For the VNDK prebuilt modules that does not match the target arch,
skip installing the module instead of marking the module to prevent
installing.
Bug: 72310137
Bug: 71787263
Test: Install VNDK snapshot v27
lunch aosp_arm64_ab-userdebug; m vndk_v27_arm64
- vndk libs must be installed
m vndk_v27_arm
- no vndk libs must be installed because target does not match
OUT_DIR=out_clean m --skip-make
Change-Id: I9df25d90c276ce5e0d94ec7f9bee32f9ce7231df
VNDK snapshot modules must have vndk subdirectory for their
LOCAL_MODULE_PATH regardless of BOARD_VNDK_VERSION definition.
The snapshot target output file must be not changed.
Bug: 71782197
Test: Build marlin with snapshot in the source and boot
Change-Id: I2b6ec9a5c20d6a5014f690d4eb8e6cd7b3b2f2fa
To distinguish libfoo.vndk.$VER prebuilts of various
vndk_v$VER_$ARCH phony package modules, append $ARCH to the
LOCAL_MODULE name for VNDK prebuilts.
e.g. libfoo.vndk.$VER becomes libfoo.vndk.$VER.$ARCH
Test: m -j PRODUCT_EXTRA_VNDK_VERSIONS=27
Bug: 71370248
Change-Id: I3e9ebd929111ceb48e362c500adfb4b7a94444e8
When BOARD_VNDK_VERSION := <VNDK version>, or
PRODUCT_EXTRA_VNDK_VERSIONS includes the needed <VNDK version> list,
the prebuilt VNDK libs in prebuilts/vndk/ directory will be
installed.
Each prebuilt VNDK module uses "vndk_prebuilt_shared" for shared
VNDK/VNDK-SP libs.
Following is the sample configuration of a vndk snapshot module:
vndk_prebuilt_shared {
name: "libfoo",
version: "27",
vendor_available: true,
vndk: {
enabled: true,
},
arch: {
arm64: {
srcs: ["arm/lib64/libfoo.so"],
},
arm: {
srcs: ["arm/lib/libfoo.so"],
},
},
}
The Android.bp for the snapshot modules will be auto-generated by a
script.
Bug: 38304393
Bug: 65377115
Bug: 68123344
Test: set BOARD_VNDK_VERSION := 27
copy a snapshot for v27
build with make command
Change-Id: Ib93107530dbabb4a24583f4d6e4f0c513c9adfec