This change fixes a bug that sanitizer runtime libs for non-core variant
(e.g. recovery, vendor, etc.) are not installed. It happened because the
dependency to the sanitizer runtime lib was without 'image' variant,
which in most case caused only the core variant - which is the first in
the image variants - of the lib to be installed.
Fixing the issue by correctly selecting image variant depending on the
location of the lib having dependency to the runtime lib.
Bug: 123525879
Test: SANITIZE_TARGET=hwaddress m out/target/product/blueline/boot.img
Test: SANITIZE_TARGET=address m out/target/product/blueline/boot.img
libclang_rt.*.so is under
out/target/product/blueline/root/recovery/system/lib64
Change-Id: Iea7d718d4971e36521f0a3f712a454de944cd7ac
This change allows PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS to
refer to subdirectories of directories in PRODUCT_PACKAGE_OVERLAYS,
e.g.:
PRODUCT_PACKAGE_OVERLAYS := foo/overlay
PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS := foo/overlay/packages/apps/HelloWorld
Bug: 118823052
Test: m nothing (soong tests)
Change-Id: Ic9f89c11d023ea1b4f6f2f6683d94c81aa7b8a1b
This commit adds a header_abi_checker section so that the library owner
can have a fine-grained control over the ABIs that must be checked.
For example, a library "libexample" may have following configurations:
cc_library {
name: "libexample",
header_abi_checker: {
symbol_file: "libexample.map.txt",
exclude_symbol_versions: ["LIBEXAMPLE_PRIVATE"],
exclude_symbol_tags: ["platform", "apex"],
},
}
Bug: 122845490
Test: Add header_abi_checker to libc to filter out LIBC_PRIVATE
Change-Id: I60cfea868f815afe6213c242ed0ca818161d55c6
Some language servers (vscode) seem to have started to rely on the
compiler being an absolute path recently. This updates the compdb
generator to match this expectation.
Bug: https://github.com/Microsoft/vscode-cpptools/issues/3112
Test: m nothing && m SOONG_GEN_COMPDB=1 SOONG_LINK_COMPDB_TO=$ANDROID_BUILD_TOP nothing
Test: Open vscode
Change-Id: Id146d69c2b808b23896132bbd4bc38ed5c7fd9c7
Some modules rely on symlink_preferred_arch to have expected files
present. This change makes apexs include these symlinks.
Test: m com.android.runtime.debug
pushd $(mktemp -d)
mkdir mnt
unzip $OUT/apex/system/com.android.runtime.debug.apex
sudo mount -o loop,ro apex_payload.img mnt
Ensure that mnt/bin/dalvikvm and mnt/bin/dex2oatd both exist and
are symlinks to mnt/bin/dalvikvm64 and mnt/bin/dex2oatd32
respectively.
Bug: 119942078
Bug: 122373634
Bug: 123079311
Change-Id: I47868fbedc5bdd3141a836c488f79e91e0a6ddfe
Add a dependency from a stubs lib to headers libs so that the headers
can be re-exported.
Bug: 122717287
Test: m; a test added to apex_test.go
Change-Id: I8d48c072815c6b02d343ef09cb44dfc6d1af8e64
This fixes a problem that APEX is unconditionally mutated for all
sanitizer types. This can make an APEX to include sanitized version
of a lib even when SANITIZE_TARGET is not set. It can happen when lib X
is directly depended on by an APEX (e.g. via native_shared_libs) and X
has a sanitized variant due to the dependency from another library Y
which is force sanitized (via 'sanitize' property). In that case,
regardless of lib Y is in the APEX or not, the APEX chooses the
sanitized variant of lib X since the dependency from APEX to the lib is
created with AddFarVariationDependency.
Fixing this problem by mutating the APEX for a sanitizer type only when
the device is requested to be sanitized.
Bug: 122717287
Test: add libnetd_client to com.android.runtime APEX.
Inspect build.ninja to verify that libnetd_client.so in the runtime APEX
is not a sanitized one.
Change-Id: I918bc8407137d74c5456142b3a29de13df68c0b3
Make no longer supports building for Windows, they must be in Android.bp
files now.
Bug: 122618577
Test: compare build-aosp_arm.ninja before/after
Change-Id: Ie70d8519850da5b1bdddf73788f984eb3f4f0900
We've been putting these in cc_prebuilt_binary, but that's not really
correct. It also tries adding '.exe' to the end of windows executables,
which isn't desirable for bat files.
Test: Use sh_binary_host
Change-Id: Idd5418dceb81ac55b766c987fbb69a810aeb8a3b
A module can be built multiple times when it is referenced from one
or more APEXes. Sometimes, it is required for the module to behave
differently depending on the context; e.g., do A when built form
APEX M, do B when built for APEX N, and do C when built for platform.
The idea is to have a macro __ANDROID_APEX__ which is set to the
name of the apex that the module is built for. It is undefined when
the module is built for platform.
Bug: 122714993
Test: m (apex_test amended)
Change-Id: I11a89c6a0e799f4810194de7ef9ee472a71ca498
This commit fixes a typo related to abidiffs. The generated abidiffs
should be copied to `$$DIST_DIR/abidiffs` instead of
`$$DIST_DIR/abidiff`.
(See also. https://android-review.googlesource.com/796458/)
Bug: 123491909
Test: lunch aosp_x86-userdebug && make dist
Change-Id: I89c13580344a27cac5ea0d00497f5bba3227cf61
aar files should build to the module out directory, not the root of
the out directory. Also give the rules a description so they get a
better status line.
Test: m out/soong/.intermediates/frameworks/base/packages/SystemUI/SystemUI-core/android_common/SystemUI-core.aar
Change-Id: Ie8de0421427985c466d909f83c8e0146f7e0bea8
Allow specifying export_static_lib_headers and export_shared_lib_headers
in the static or shared properties of cc_library modules.
Use a named struct for the properties to avoid having to create
a runtime struct type since none of the properties are filtered.
This avoids running into the name length limit in runtime.StructOf.
Fixes: 122882789
Test: m checkbuild
Change-Id: Ib0e9933e93981ba44668a19ed748bd12a4dd4257
Runtime-created struct types have limit on the name of the type,
which is the full text of the fields in the struct. Avoid creating
runtime struct types when filtering produces an identical struct.
Also add tests and godoc for filterArchStruct.
Test: arch_test.go
Change-Id: If7eb27ea9e72073d5252e93f2110b08889ed76b1
Currently only java/app.go is affected by package name overrides. When
the var is used, the corresponding module's install APK name is changed
to the overriding name.
Bug: 122957760
Test: app_test.go + TreeHugger
Change-Id: Ie522da3d7280970d740d779cf2694560feae6180
Save some space on /system by avoiding a copy in the .vdex files.
Test: m && /system/framework/boot-*.vdex files doesn't contain dex code.
Change-Id: I10cdcfe46a36a49a75f7640e20d065912812ab9f