Background: if a lib has `sdk_version` set, it is mutated into two
variants: platform and sdk. The latter is for the inclusion into
unbundled APKs which can be installed on older platforms. The former is
what is installed to the platform.
So far, for unbundled app builds, (1) the platform variant was marked as
uninstallable, (2) while the sdk variant was left installable. (1) is
causing a problem (b/339262059) when an APEX containing a filesystem
module is built as unbundled. The filesystem skips installing the
platform variant. (2) is not causing a problem, but is unnecessary
because the sdk variant is not something to be installed (on the
platform). It is built into the APK via the jni_libs property. It's not
considered an installation.
This change fixes (1) and (2). For (1), the platform variant is always
marked installable even for unbundled build. For (2), the sdk variant is
always marked non-installable.. because, again, it's not designed to be
installed to the platform.
Bug: 339262059
Test: banchan com.android.virt aosp_arm64
UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true m apps_only dist
check libc++.so, libcrypto.so are in the microdroid image in the APEX.
Change-Id: I8999b724926cd9ab6d56796133e218fefcc1910b
llndk.libraries.txt build fails from clang tools build, as there is no
valid target path for llndk.libraries.txt from the build. This change
skips llndk.libraries.txt build if target output path is empty.
Bug: 330100430
Test: prebuilts/clang-tools/build-prebuilts.sh passed
Change-Id: I867dc90dbf98e3d8c24b191a744686286740b230
This is necessary for cc_cmake_snapshot to snapshot and generate build
rules for actual source files (AIDL files) and not generated cpp
sources. Otherwise, this information is inaccessible for cc module after
aidl_interface pass.
Bug: 302718225
Test: Build aosp/2798713
Change-Id: I991e73f74d7551d21f337a7161cce55ba51fec71
To handle static inline functions, bindgen generates a C file which is
expected to be compiled and linked into dependents on the generated
bindgen source.
This CL adds support for cc modules ingesting this output and for
bindgen to produce it (and link it against the bindgen rust_library
variant as well).
Bug: 290347127
Test: m blueprint_tests
Test: Example module with static inline functions builds locally
Change-Id: I167a8356eb6e0059fc21169fd3bfc6bf4d9c812f
The sanitizer runtime logic was rewritten in aosp/2438959 to simplify
static sanitizer library selection. However, enabling ubsan diagnostics
for host tests would result in incorrectly adding an unnecessary
libclang_rt.asan.so dependency.
This check should have been removed as well -- the library dep
determination for c.sanitize.Properties.UbsanRuntimeDep is now handled
higher up in the logic.
(Some formatting fixes are included as well)
Bug: 323237381
Test: UBSanitized Host test with diagnostics runs correctly.
Change-Id: I97bd01344b7b676fccb9f250c0f801b8bc212a1a
NDK team requested not to generate the dumps by header ABI checker in
the finalization process.
Test: m out/target/product/generic_arm64/lsdump_paths.txt
Bug: 332959609
Change-Id: Ia04c6f266088968ff731c0fabbbfce26300109ae
This allows using select statements with it.
Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I6f3efaaa3d82505e38a91ee4ba0e18e404360191
Merged-In: If355d24506e3f117d27b21442a6c02bca3402dc7
This was already done for target.recovery, but was forgotten for
target.vendor and target.product.
Test: add exclude_header_libs to a target with export_header_lib_headers and build successfully
Tags:
Change-Id: Ib206f54b2176830e32af33b9b093b71d4f1351ac
Signed-off-by: Abhishek Gadewar <abhishekgadewar@meta.com>
Otherwise we cannot disable memtag_stack on first stage init, because it
statically links in a lot of libraries.
This was benign, but if we want to add a stack history buffer, we do not
want to emit these instructions for first stage init.
Bug: 309446520
Change-Id: Ifbdcbe5ba06eb46970bc1e9b64a26c1ca59ba5f2
Currently VNDK contains some logic for LLNDK libraries as they are
treated in a similar way with VNDK. However, those logics should stay from
VNDK deprecation. To keep the logic, this change moves LLNDK related
logic into llndk_library.
Bug: 330100430
Test: Soong tests passed
Test: llndk.libraries.txt did not change from CF build
Change-Id: I1d02a3c2a398f1b1060b4f2bdd23af32310503bb
Merged logtags files will be used for Soong built filesystem images.
Bug: 336189540
Test: m out/soong/.intermediates/all-event-log-tags.txt
Test: m out/target/common/obj/all-event-log-tags.txt
Change-Id: Ib590c2bc8073e9acee6b45ef08092768237cf9d3
This commit adds --include-symbol-tag and --symbol-tag-policy to
header-abi-linker commands. The arguments make header-abi-linker load
the symbols tagged with llndk/apex/systemapi from the version script.
It filters the function declarations by the symbols. The output dumps
will not contain unfinalized ABI.
Test: make findlsdumps
Bug: 333532038
Change-Id: I28234a3749f389b8a5a09ac84341b1fcd1ee88a6
This commit adds a rule that builds APEX ABI dumps separately from the
implementation libraries' ABI dumps. The rule takes the
export_include_dirs and the symbol_file of the stubs as parameters.
The dump paths are tagged with "APEX" in lsdump_paths.txt. The script
updating the prebuilt reference dumps can differentiate the APEX dumps
from the opt-in dumps tagged with "PLATFORM".
This commit also adds an ABI diff rule. Soong compares the APEX ABI
dumps with the reference dumps in version 35. It compares the
implementation dumps with the reference dumps in old versions.
Bug: 333532038
Test: make
Change-Id: I76902a8e3b7d0e96a5ad756f493924371cd7ad3c
This reverts commit 321dd23b34.
Breakage is fixed by https://r.android.com/3051002.
Change-Id: I70925c7aa01fb78ec701971ee97192993aef0edd
Test: abtd
Bug: 322868540
When testing test-only validations, I noticed that some cc_test modules
where not reporting that they were test-only.
This happened because test-per-src variations were short-circuiting
writing out the provider.
The `all_teams` target is using the first variation for a module, but
it possibly should see if any variation is test-only.
For now, just making this fix to cc.
Test: m all_teams && gqui from "flatten(out/soong/ownership/all_teams.pb, teams)" proto build/soong/android/team_proto/team.proto:AllTeams ' where teams.kind = "cc_test" and teams.target_name="libnativebridge-tests"'
Test: go test ./cc
Change-Id: I6d44a521f5f2457527049399509d979559d7dc17
The __BIONIC_NO_PAGE_SIZE_MACRO flag has to be passed to
the build system because there are C/C++ libraries using
__BIONIC_NO_PAGE_SIZE_MACRO to decide whether to use getpagesize()
or PAGE_SIZE macro.
Bug: 333973679
Test: Build manually
Change-Id: Ie5d71f4b2b256ab8f429ed4724b8d249b364d5da
As part of aosp/3022586 where we added the idea of "test-only" modules
and top_level_test_targets, this CL implements that for cc_ modules.
We let users set "test-only" on cc_library, but not on other modules
where the module kind is implicitly test-only, like cc_test.
Here the implementation, not the user decides it is test-only.
% gqui from "flatten(~/aosp-main-with-phones/out/soong/ownership/all_teams.pb, teams)" proto team.proto:AllTeams 'select teams.kind, count(*) where teams.top_level_target = true group by teams.kind' aosp_shiba[6:15:47]/0
+--------------+----------+
| teams.kind | count(*) |
+--------------+----------+
| art_cc_test | 56 |
| cc_benchmark | 68 |
| cc_fuzz | 515 |
| cc_test | 3518 |
| cc_test_host | 6 |
+--------------+----------+
% gqui from "flatten(~/aosp-main-with-phones/out/soong/ownership/all_teams.pb, teams)" proto team.proto:AllTeams 'select teams.kind, count(*) where teams.test_only = true group by teams.kind' aosp_shiba[6:16:26]/0
+--------------------------+----------+
| teams.kind | count(*) |
+--------------------------+----------+
| art_cc_test | 56 |
| art_cc_test_library | 13 |
| cc_benchmark | 68 |
| cc_fuzz | 515 |
| cc_test | 3518 |
| cc_test_host | 6 |
| cc_test_library | 484 |
+--------------------------+----------+
Bug: b/327280661
Test: m nothing --no-skip-soong-tests
Test: go test ./cc
Test: m all_teams
Change-Id: I344436c424a9dfbdcf27e10f42f5cebc3d2b1261
Move -Wno-error=format from noOverrideGlobalCflags to
commonGlobalCflags so that projects can re-enable it with
"-Werror=format"
Bug: 315250603
Test: Add -Werror=format to bluetooth_cflags
Change-Id: I677cee5373c670c1a3b0eceeea1b7c35d28a17c2
This commit fixes the incomplete ABI dumps for libc. The ABI checker
counts export_system_include_dir in the exported headers. It writes the
functions and types defined in the system headers to the dump files.
Test: make
Bug: 314010764
Change-Id: Ieae48d13b4fc4381c87a017213019e940d498967
There was infrastructure to export ninja variables to bazel. Now that
the bazel migration is cancelled, we don't need it anymore.
Bug: 315353489
Test: m nothing
Change-Id: I298cc2ac7ebd004557be3b30d75f7357cab0b7a0
This commit changes the parameters to create LLNDK ABI dumps for 202404
and later versions. Soong invokes header-abi-linker with LLNDK headers
and version script rather than the implementation library's parameters.
The output dump contains more precise ABI information.
When soong compares the ABI with the prebuilt dumps in old versions,
it creates the source ABI dumps with the old parameters.
Test: make findlsdumps
Bug: 314010764
Change-Id: I228736188d07029ee1588b3502fd7c0061c104b9
The default compilation behavior is set to be the future direction,
and a flag is set for backwards compatibility.
Bug: 312546062
Test: build/boot
Change-Id: Ibf87cbb2ab5da8640bcf7eb5f8cd643bf500e2e5
As of VNDK deprecation, Device VNDK version should no longer be used
from build. This change removes all references on Device VNDK version
and related logic with it.
Bug: 330100430
Test: AOSP CF build succeeded
Change-Id: Ibc290f0b41e8321f80c75c69f810223989af68dc
Existing snapshot code will no longer work from VNDK deprecation, but it
can give confusion to users if we keep code for the snapshot - and it
adds complexity on existing code while it is not in use. This change
removes all snapshot definition except host snapshot and its usage.
Bug: 330100430
Bug: 332986564
Test: AOSP CF build succeeded
Change-Id: Ieb6fa43d5e38315c662ce997bc305b744b367c24
This relands aosp/3026027 with fixes for ndk_library. ndk_library
uses ctx.InstallFile to copy the stubs from an intermediate dir to
out/soong/ndk/sysroot/. The copy rule was created in
out/soong/installs-<product>.mk. This would cause issues when soong_ui
is run in `--soong-only` mode
To fix this, the cp rule is created entirely in soong. The stub library
is marked uninstallable to prevent creation of duplicate rules when
`--soong-only` mode is not used
Test: presubmits
Test: lunch ndk-trunk_staging-userdebug &&
ALLOW_MISSING_DEPENDENCIES=true build/soong/soong_ui.bash --soong-only
out/soong/ndk.timestamp
Change-Id: I6f8b87d88d8ca5ec9a3327e1f11e9aa654f8cdce
ndk_headers currently use ctx.Install to install headers in
out/soong/ndk/sysroot. The files are subsequently used to compile ndk
variants of cc libraries on host.
Since these headers are not actually installed on device, use android.Cp
to assemble the NDK sysroot. By itself, it should be a no-op, but
androd.Cp is more friendly with restricting the installation rules to
PRODUCT_PACKAGES.
To make it explicit that the sysroot is not a typical installation path,
this CL also modifies the type to OutputPath
Test: m
Bug: 332778109
Change-Id: I1131c3c764443cbaac525c6022cd09c47695d275
The ABI checker dumps the ABI from the source code of LLNDK
implementation libraries. It needs to filter the ABI by the LLNDK
headers.
This commit adds dependencies from LLNDK implementation libraries to
their export_llndk_headers. The LLNDK header directories are added to
PathDeps. A followup change will pass the directories to the ABI
checker.
Bug: 314010764
Test: make
Change-Id: Ibc2d5eac3d70d9e038e0fd255cd1ebc1044fabbe
- Extract duplicate code into exportedIncludeDirsForAbiCheck.
- Convert libraryDecorator.sAbiOutputFile to a local variable.
Test: make
Bug: 314010764
Change-Id: I99a0352b11347ad363df5645ba8e0faf9bc9a0aa
This solves linter warnings in editor by adding flags to ignore errors
we don't care about. This also means that compile_commands.json is
closer to the flags we actually use for compilation.
Test: Checked generated compile_commands for new flags.
Change-Id: Id583da6eb5151a9baa9a47771f5f937c88bc43f7
Platform VNDK version is no longer available based on VNDK deprecation.
Remove all code using Platform VNDK version.
Bug: 330100430
Test: AOSP CF build succeeded
Change-Id: I7d0f7e23eff5d153346890f242a94b78bad6736b
VNDK is deprecated in 24Q2, so soong should be tested with no device and
platform vndk versions. This change removes all VNDK related tests and
VNDK versions from soong-cc and soong-apex tests.
Bug: 330100430
Test: m nothing --no-skip-soong-tests passed
Change-Id: I45e6c13e6c0a6bc9710b120e8d5b167e2051631e
Remove vendor_snapshot_test from cc and rust as they are no longer in
support.
Bug: 330100430
Test: m nothing --no-skip-soong-tests passed
Change-Id: Ia798bc1c87d3f1d73ea5866dc85ff4073f5f9c5b
55019c43f4
We set the default optimization mode to --lto-O0 for LTO enabled
projects, in order to save build time. This is missing some performance
optimizations, esp. related to vectorization. Now that we suggest eng
build for developers, we can enable full optimization by default.
When we introduced --lto-O0, we achieved a 4.2% saving in
system-processes-memory-direct. Enabling full LTO optimization will
trade some of the memory / binary size savings for better code
performance. For system-processes-memory-direct, it is 2.0% increase
compared to --lto-O0, or a net 2.2% saving compared to baseline.
Change-Id: I747939ac4d6e4a66e3ef776f4c36eebc7bf34c86
The tool that had the bug this disablement worked around is no longer in
use, and the current tool "works for me"...
Test: ran locally
Change-Id: I801da20a00f54a90777b99ea264d9ab420b7f942
Bug: http://b/327307773
Newer clang rejects this flag as unsupported. It is not necessary while linking because the flag is passed as an IR feature.
Change-Id: I781afd913be7c07612196e736c3ae58773791071
We fixed the clang driver to "do the right thing" based on target api level years ago, but these manual workarounds predate that (or were copy & pasted from places that predated that). We don't need them any more.
See https://github.com/android/ndk/issues/2005 for more detail.
Change-Id: I995741b8606e389e8de8272f1cc532624516245a
So far, the installation of required modules were handled by Make. This
prevents us from implementing the module installation and packaging
entirely in Soong.
This CL is the first step towards that goal. Soong now correctly tracks
the dependencies and they are correctly returned by
TransitivePackagingSpecs(), which is used by packaging modules like
android_system_image.
Bug: 321626681
Test: build
Change-Id: I9192b5333ceaa0b7d1c5c4abeec2af62febcd976
Change genrule Out to `android:"arch_variant"` for supporting
multilib variants.
Bug: 323295272
Test: go test -run TestMultilibGenruleOut
Change-Id: I102d64b45a5a2a5193f813001fc32da0d1fe9d36
We want LLNDK symbols to be explicitly marked with llndk tag to
handle LLNDK freezing which happens before SDK freezing. If symbols
need to be frozen as LLNDK, those symbols must be marked explicitly with
correct vFRC version.
In the following example,
LIBFOO { # introduced=35
foo;
bar;
bar; # llndk=202404
baz; # llndk=202404
qux; # llndk=202505
};
NDK libfoo will have foo and bar while LLNDK libfoo stub will have bar
and baz for 202404.
Bug: 329012338
Test: test_ndkstubgen test_symbolfile
Change-Id: I384f589b240fa047e8871964bf9550f426024dfc
To suport >4KB page sizes, the loader may extend LOAD segment mappings
to be contiguous in the virtual address space. This is done in order to
reduce the use of unreclaimable kernel slab memory for the otherwise
necessary gap VMAs (when the runtime-page-size < ELF-segment-p_align).
Such mappings may beyond the end of the backing file when extended;
which breaks the common userspace assumption that file memory maps are
entirely backed by the underlying file.
Existing apps (not yet updated for larger page size support) may
encounter breakages if they parse /proc/self/[s]maps and use the
[start, end] addresses to operate on system libraries that have
crt_pad_segment optimization (VMA extension) [1].
In order to avoid breaking exisiting apps, update the build system to
ensure the platform ELFs' segments are entirely backed by the file
even when the VMA is extended to be contiguous with the subsequent
segment's. This is achieved using the linker flag
-z separate-loadable-segments, which inserts enough padding (zeros)
to also align each segment's offset on file by it's p_align
(max-page-size).
Although laying out the ELF segments on disk to respect the p_align
causes an increase in the file's apparent size (i_size), on Android the
actual disk usage increase is not significant due to most of the padding
being zero blocks which don't get alloacted in the read-only partitions.
The following results were obtained on an ARM64 device on a recent
git_main build:
No Separate Separate Delta Delta % Partition
Loadable Loadable
Segments Segments
4208.90MB 4214.6MB 5.70MB 0.14% All RO Partitions
Note: The overhead of -z separate-loadable-segments is minimized by the
fact that ARM64 android already builds with -z separate-code. [2]
[1] https://cs.android.com/android/platform/superproject/main/+/main:bionic/libc/arch-common/bionic/crt_pad_segment.S
[2] 733198152d:build/soong/cc/config/arm64_device.go;l=53
Bug: 328797737
Test: Manually test previously crashing application
Change-Id: Icb14ad10b5c9282855d54c7945b065b7b4184163
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
So far we created {"", "current"} stubs for LLNDK modules. But we don't
need "current" because "" itself is a stub.
This change only removes unused LLNDK stub modules with "current"
version, which aren't used at all.
Bug: 329183083
Test: m blueprint_tests
Change-Id: Ib8e880b6d88952b489657ea1ac557a48afe562a4
Header ABI checker dumps the ABI from core variants and filters it by
version scripts. Ideally it should load different version scripts for
LLNDK, NDK, APEX, etc, but the build rules have not been completed. The
current solution is to load core variants' version scripts. It works
for every existing library because a library's variants share one
version script.
Test: make
Bug: 329078703
Change-Id: I4e26275e24daf93c7d3bb7e70b542a1197ae2129
We set the default optimization mode to --lto-O0 for LTO enabled
projects, in order to save build time. This is missing some performance
optimizations, esp. related to vectorization. Now that we suggest eng
build for developers, we can enable full optimization by default.
When we introduced --lto-O0, we achieved a 4.2% saving in
system-processes-memory-direct. Enabling full LTO optimization will
trade some of the memory / binary size savings for better code
performance. For system-processes-memory-direct, it is 2.0% increase
compared to --lto-O0, or a net 2.2% saving compared to baseline.
Test: presubmit
Bug: 328163089
Change-Id: Ia4d0f74e668ed057d6d9d6fc6c60196c2e355fb9
Some libraries like `libnativehelper_compat_libc++` only exist as shared
library in module sdk. When prebuilt of this library is selected using
apex_contritbutions, only shared linkages should be redirected to the
prebuilt version. The static linkage should come from source.
Test: Added a unit test
Bug: 322175508
Change-Id: Ic65d376b2354b4a42c7b9ea3ed1cd80c37e2840f
This relands aosp/2978137 with acknowledgement of soong namespaces.
If multiple versions of the prebuilt module sdk share the same soong
config namespace, then PrebuiltPostDepsMutator rewrites rdeps to one of
those prebuilts in a non-deterministic way.
This CL uses apex_contributions to make this deterministic. Multiple
prebuilts will not be allowed to have their prefer evaluate to true. If
this happens, one of the prebuilts must be explicitly declared in
apex_contributions.
This CL also fixes the special-casing of the top-level
java_sdk_library_import in ReplaceDirectDependencies. For
framework-foo.v2, it will use BaseModuleName framework-foo instead of
SdkLibraryName framework-foo.v2 to determine if the source module has
been selected.
Test: ran the previously failing cmd of b/327552112
Test: Added a unit test
Test: aninja -t query
out/soong/.intermediates/packages/modules/Permission/SafetyCenter/Config/safety-center-config/android_common/javac/safety-center-config.jar
| grep module_sdk is empty (should not cause a regression for
323454855)
Change-Id: Id484a41192085c50b7e34ad415c6e195edb0d006
If multiple versions of the prebuilt module sdk share the same soong
config namespace, then PrebuiltPostDepsMutator rewrites rdeps to one of
those prebuilts in a non-deterministic way.
This CL uses apex_contributions to make this deterministic. Multiple
prebuilts will not be allowed to have their prefer evaluate to true. If
this happens, one of the prebuilts must be explicitly declared in
apex_contributions.
This CL also fixes the special-casing of the top-level
java_sdk_library_import in ReplaceDirectDependencies. For
framework-foo.v2, it will use BaseModuleName framework-foo instead of
SdkLibraryName framework-foo.v2 to determine if the source module has
been selected.
Test: Added a unit test
Test: aninja -t query
out/soong/.intermediates/packages/modules/Permission/SafetyCenter/Config/safety-center-config/android_common/javac/safety-center-config.jar
| grep module_sdk is empty (should not cause a regression for
323454855)
Bug: TODO
Change-Id: I7191200c330c5bcb9d5532006d3c573a60db61cc
The new libc++ prebuilt has HWASan and non-HWASan variants for arm64.
Bug: 175635923
Test: checkout use-prebuilt-libcxx topic, build libc++demangle, verify
that libc++demangle-install is not a valid build target
Change-Id: I34385c48aa7ad1401e2547d65d30a14fa342e304
libc++[abi] always check whether one of these macros is defined, not
the value the macro is defined to. With the new libc++, there is a
Windows __config_site header that automatically defines
_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS and _LIBCPP_HAS_THREAD_API_WIN32
to nothing, so these definitions need to match to avoid a redefinition
error.
Bug: 175635923
Test: treehugger
Test: m adb
Change-Id: I1e48947c3b45e59804cdacd48776c7f3bd9a18c6
Since BaseModuleName of the dep becomes its LOCAL_MODULE name in the
generated mk file, we should also use BaseModuleName of dep for populating
properties such as LOCAL_SHARED_LIBS of rdeps
Test: m nothing --no-skip-soong-tests
Bug: 322175508
Change-Id: I6b47112faa63f85d19b5b71e0e102cea0ab68e3b
Latest compiler has merged both unaligned access flags into one.
TODO: This is needed until we change clang driver to enable -munaligned access by default.for Android b/327307773
Bug: 326790418
Change-Id: Ia8c29dc56104d2cffb8ac41aae6eeacccae68e61
Bug: http://b/323152930
Bug: http://b/324323434
The ambiguity in frameworks/av/media/codec2 is resolved.
Test: build partner branch, and presubmit
Change-Id: Ie1aa0b6c965b1a9076333d7d25fd9f9664467a31
Add the dependency on the fdo_profile module in afdoTransitionMutator
and read the provider in GenerateAndroidBuildActions.
This relands Ied8fd7b52d5694a3691652318e87b8fe14dda126 with a fix
to use the correct LTO ldflag when an afdo variant doesn't have a
profile.
Bug: 319288033
Bug: 324141705
Test: afdo_test.go
Change-Id: I024ca316cfb565b5fb0251793f05a54ce16cc1cb
LTO does not set the -import-instr-limit flag when building for
darwin, don't test it on darwin host modules.
Test: afdo_test.go
Change-Id: I83f77006a875f8b0a6af9ae11eb3bad88b0681b1
Convert afdoDepsMutator and afdoMutator to a TransitionMutator as a
step towards variants-on-demand.
This relands Ib05845455ccf43a07b3915a0d7b0a95896062f13 with a fix
to maintain the current behavior of not using AFDO variants for
dependencies of the linker static binary.
Bug: 319288033
Bug: 324141705
Test: afdo_test.go
Change-Id: I76e30021173fc5b7e9e1fa826039776eb3dc7b6e
afdo.addDep would never add a depencency on a profile for a host
module, but afdoDepsMutator would still propagate AfdoRDeps to
dependencies, afdoMutator would still create afdo variants, and
afdo.flags would still add the -funique-internal-linkage-names
flag. Exit early from all of these functions, since the afdo
variations will never be useful.
Test: afdo_test.go
Change-Id: I255fcbb86c99871916e571fbc74075d918b24745
Add more coverage to the afdo tests for the arm32 variant of a module
that only has an arm64 profile, for the -funique-internal-linkage-names
flag, and for the interaction between LTO linker flags and AFDO.
Test: afdo_test.go
Change-Id: I3ed4ce033c2431ea3e2fee536744b5e5b4cad296
Our mingw doesn't use this. (It does however still use
__STDC_CONSTANT_MACROS and __STDC_LIMIT_MACROS.)
Test: treehugger
Change-Id: I415017093b9ccffd21fd41f17a2f4387839a0f53
LLNDK version will be decoupled from SDK version. The ABI checker
loads the reference ABI dumps from
prebuilts/abi-dumps/vndk/<VendorApiLevel>.
Test: m libnativewindow
Bug: 314010764
Change-Id: I3e9f2cab58db0d1cc42f8c1abc13968617dacf14
- Soong generates the rules to compare prebuilts/abi-dumps/vndk and
the intermediate dumps tagged with LLNDK.
- The LLNDK ABI diff report names contain ".llndk". Because LLNDK
versioning has not been implemented, the reports are identical to
those for NDK and PLATFORM.
- optInAbiDiff does not take isLlndkOrNdk as a parameter, as it is
false for all known use cases.
Test: m libnativewindow
Bug: 314010764
Change-Id: I17097505472b9d6ab97a605f3f8dca8ea53d22c8
Similar with aosp/2897612, rename LOCAL_USE_VNDK into
LOCAL_IN_VENDOR or LOCAL_IN_PRODUCT to make variable useful from
VNDK deprecation.
Bug: 316829758
Test: AOSP CF build succeeded
Change-Id: If7bead24add014ed9e0e9e1d265b0199b911be89
crt_pad_segment adds a NOTE to the ELF which is used by the binoic
loader to determine whether it should pad segments when mapping them
into the virtual address space, such that there are no gaps between
mappings of consecutive segments. This avoids an increase in
unreclaimable kernel slab memory usage for VMAs on devices where the
runtime-page-size > elf-segment-p_align.
Since -fandroid-pad-segment [1] respects -nostdlib used in android
platform builds, soong must link in crt_pad_segment to platform shared
libraries.
For simplicity, link crt_pad_segment everywhere that crtend_so is
applicable, ignoring nocrt property, as there is no other reason
to track these separately.
Example:
❯ readelf -WS /system/lib64/libc++.so [Output simplified]
...
Section Headers:
[Nr] Name Type Address Off Size ES Flg Lk Inf Al
...
[ 2] .note.android.pad_segment NOTE 0000000000000288 000288 000018 00 A 0 0 4
...
[1] https://github.com/llvm/llvm-project/pull/77244
Bug: 316403210
Test: readelf -WS <lib>.so
Change-Id: Icc06611376cfd5ee4de7281b4134f9f8ffe7ca60
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>