- 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
In a trunk stable branch, the ABI-monitored libraries under different
release configurations share the source code. The exported symbols are
filtered by version scripts and API level. header-abi-linker needs to
take the API level as a parameter.
Test: make
Bug: 308192597
Change-Id: I4b55b7ec023451b3a4cd1da308a1de10842d51d2
ld -r reorders symbols and invalidates the .llvm_addrsig section, which
then causes warnings if the resulting object is used with ld --icf=safe.
The warning is especially common when building with musl, as the
clang_rt.crt* objects have .llvm_addrsig sections, are linked into
libc_musl_crt* using ld -r, and are then linked into every other binary
and shared library with --icf=safe.
Strip the .llvm_addrsig section after ld -r to prevent the warnings.
Test: m USE_HOST_MUSL=true host-native -k
Change-Id: Ia52a4756b9ebbb62115898d0de9f8641e6fea705
Bug: b/261642850
Test: Build and check warnings. Add two xfail tests in bionic and see the
results locally.
Change-Id: I68fca0084787c329b6c49ce4dff6fd132f820735
ABI dumps in gzip are no longer supported because they cannot be
reviewed or merged.
Bug: 227282691
Test: make
Change-Id: I9fdf943fb8ae30aeae884d4d361a65034ab6fa94
- Move the logic that determines the versioned dump directories
from pathForVndkRefAbiDump to linkSAbiDumpFiles.
- Move sourceAbiDiff which generates the flags for ABI diff from
builder.go to library.go.
- Define two functions that generate the rules for cross-version and
same-version ABI diff.
Bug: 227282691
Test: make
Change-Id: Ic33799e86dd9ae627f5680b70973f96e15c030e9
IsLlndk() returns whether the library is an LLNDK stub. The ABI check
should identify LLNDK implementation by isImplementationForLLNDKPublic().
Test: development/vndk/tools/header-checker/utils/create_reference_dumps.py \
&& make
Bug: 227282691
Change-Id: I570871e24d9029992a722b3052f8bb6e7f3c0f52
This commit removes "-advice-only from" the command of cross-version ABI
diff. The ABI changes that are incompatible with the previous version
are propagated as build errors. The developers need to follow the
error message to resolve the ABI difference.
Test: make
Bug: 244520027
Change-Id: Ic6e7757d2b35b619afcc8f50c892d1cfe989c800
* This is a temporary work around until the RBE input processor
can handle those flags.
* It's okay to remove some cflags in clang-tidy command
if they do not affect tidy check results.
Bug: 248371171
Test: enable RBE; RBE_CLANG_TIDY_EXEC_STRATEGY=remote; make tidy-soong_subset
Change-Id: If499bd7e1f0f89ccc3b7f7df7d67cfc64dc67028
Remove Toolchain.GccRoot, Toolchain.GccVersion, and Toolchain.GccTriple
that were only used by an unused function. This removes most of the
references to GCC, although there are still some left in the host
toolchains.
Test: No change to build.ninja for aosp_cf_x86_64_phone-userdebug or aosp_raven-userdebug
Change-Id: I72b8af1f9aa83e6e15c9e00ed1e817b6cc3a031a
* changes:
Move function PathForVndkRefAbiDump to Prevent unnecessary exports in paths.go
Change the type of parameter prevVersion to int in sourceAbiDump
We want to print to the user to use this variable, but it might
not be set in all environments where we run the build. Namely,
in sdk finalization CI.
Bug: 244456768
Test: N/A
Change-Id: I233e7d0ee6a7ed43760ad723fccd70ea97f7b806
Since the caller is doing Itoa and pass it into sourceAbiDump(), and
sourceAbiDump() is calling Atoi to convert it back, it makes sense to
not do the Itoa in the first place.
Test: make libz
Bug: 244009549
Change-Id: I61731a5eb442b5a1a8f50c820a673d9b2204c3a0
In Cross-Version ABI Check, the config of header-abi-diff would be
changed based on go/cross-version-abi-diff-configuration. Thus in soong,
the target-version flag should be added for header-abi-diff to determine
config section. The error message of header-abi-diff is also modified to
help developers resolve the incompatibility by updating the
header-abi-diff config.
Test: make and check the flag of generated header-abi-diff command
Bug: 239792343
Change-Id: Id94f577a42193ecf218dc94d0bfd2065fcdc2896
This reverts commit 6580d84f51.
Reason for revert: The bugfix for reproxy was released to this branch.
Test: make
Bug: 226497964
Change-Id: I38e30d3dc71fa7857a61fcadf5895075608fd966
Created a function to determine the current finalization stage by
environment variable and the existence of a version folder
prebuilt/abi-dumps/<lib_type>/<platform_sdk_version>/.
Assign the corresponding prevVersion with the current stage and generate
mk commands to diff source and previous dump to
{fileName}.{prevVersion}.abidiff with diff flag --allow-extension and
--advice-only
The test is verified in all stages. lsdumps should be prepared in
advance.
For stage 1: current/ and PLATFORM_SDK_VERSION/
For stage 2: current/ and {PLATFORM_SDK_VERSION-1}/
For stage 3: PLATFORM_SDK_VERSION/ and {PLATFORM_SDK_VERSION-1}/
The definition of stages could be found at
"go/cross-version-abi-check#bookmark=id.vpflkul2z968"
Test: make libbinder_ndk
Bug: 238387082
Change-Id: Ic29456113a541650c75fa38c5c4f2d6d2e76a877
This is to avoid hitting command-line length issues when building with
RBE enabled for C++ links.
TESTED=ran a build with link actions and saw command-line getting
shorter in size from verbose.log
Bug: b/237480728
Change-Id: Id66165159388554bb76579080c5a6979dd670d22
- The script creating reference dumps does not need --llndk. It can
determine the library types automatically.
- NDK passes the ABI checks with -consider-opaque-types-different.
- All libraries checked by the ABI tools have exported headers and don't
need -advice-only.
Bug: 232891473
Test: development/vndk/tools/header-checker/utils/create_reference_dumps.py \
&& make
Change-Id: Ia418022d6d0b46bfabefaa296fa81e80291fde32
* The old jobs of two build rules are now combined into
a new clang-tidy.sh wrapper.
The clang-tidy build rule now calls clang-tidy.sh.
Bug: 234406661
Test: WITH_TIDY=1 make; make tidy-soong_subset
Change-Id: I91961edf96e9a546f0c3088715a6f2ca8796a21b
The property allows developers to add extra flags to header-abi-diff for
specific libraries.
Bug: 232891473
Test: m libbinder.vendor
Change-Id: I203af73c784dfc7738bb64f57b224c08d5c595ce
Merged-In: I203af73c784dfc7738bb64f57b224c08d5c595ce
(cherry picked from commit 4f992b663f)
The property allows developers to add extra flags to header-abi-diff for
specific libraries.
Bug: 232891473
Test: m libbinder.vendor
Change-Id: I203af73c784dfc7738bb64f57b224c08d5c595ce
Use the new --dependency-file flag for lld to produce a deps file.
Fixes: 137961579
Test: m checkbuild
Change-Id: I4e0724795a4237ef4560f814e5ef40e44591d776
The header-abi-dumper processes do not terminate when
USE_RBE_DUMPER=true. To unblock SDK finalization, the RBE rule is
disabled until the bug is fixed.
Test: make
Bug: 226497964
Change-Id: I3fc2357b71d346fcda431077a68c69757981318b
Similar to `tidy_disabled_srcs`, a `tidy_timeout_srcs` list
can be used to include all source files that took long to compile
with clang-tidy. Files listed in `tidy_timeout_srcs` will not
be compiled by clang-tidy when `TIDY_TIMEOUT` is defined.
Bug: 201099167
Test: TIDY_TIME=90 make droid tidy-soong_subset
Change-Id: Ie0bfda66caae4445d10117ceefa1b5b8c1ecf256
* Cannot use android.Path as key because some srcs and
and tidy_disabled_srcs items could have the same path
string but different android.Paths objects.
Bug: 219783146
Test: make tidy-soong_subset
Change-Id: I82e25ec9678ce998feccf361d69ae66dae0905de
* Add clangTidyDepRE, which is an order-only dependent of
the new simplified clangTidyRE rule.
* Remove escapeSingleQuotes, used only by the old bash command.
* Remove extra space when TIDY_TIMEOUT is not defined.
* In clang-tidy calls,
use moduleFlags to match the clang/clang++ commands.
Bug: 218937424
Test: make droid tidy-soong_subset
Change-Id: I162e2318410741ab61fb2bb338725b000a3f148d
Upcoming versions of the toolchain (at least when I was locally testing)
drop support for the single-dashed argument type. Fixing this ahead of
time as to hopefully avoid the toolchain-release-blocking bug in future
:).
Bug: N/A
Test: Build the platform.
Change-Id: Ia2c6dcb19556f1979f9a6ecfd3a0ec58fb73e36e
* make tidy-soong_subset, or make tidy-<any_directory>,
should trigger the same clang-tidy compilations
with or without global WITH_TIDY=1.
* Normal make should not trigger clang-tidy compilations
unless global WITH_TIDY=1 or a module has set tidy:true.
Bug: 213918926
Test: NINJA_ARGS="-n" make tidy-soong_subset
Test: NINJA_ARGS="-n" make <some-library>
Change-Id: Iafffd3894abe137c9584c2c01830898422f9a677
noOverrideExternalGlobalCflags is a new set of flags intended to be
added at the end of the command line for 3rd party projects like
external/, hardware/, vendor/, and more. Our previous flags for external
projects occur way too early on the command line, leading to issues with
use for suppressing diagnostics. Note that support for this variable in
build/make is currently unimplemented, as there are no projects that
would depend on it. It could be added in the future, if it turns out to
be useful.
This change initially applies `-Wno-unused-but-set-variable` and
`-Wno-unused-but-set-parameter` to external projects because these
upstream projects aren't easily fixed, and the risk of actual bugs is
low.
Bug: http://b/197240255
Test: Build and check warnings
Change-Id: I26f56c5c52725dddb70dd8130ad61270eac7a9aa
This is configured from Make by setting up Darwin+Arm64 as a HOST_CROSS
target (which is largely true, as binaries can't be executed on X86_64
machines). On the Soong side, it's a bit blurier, as we don't current
have any other users that are the same OS but not natively executable
(Linux/musl is executable, Windows/x86 is a different OS).
Instead of requiring cc_binary/etc to become multi-architecture-aware
and using something like common_first/MultiTarget, this defaults all
non-multi-architecture-aware modules to be built with both
architectures. It then adds a dependency with the
DarwinUniversalVariantTag so that supporting modules can get the outputs
of the other variant.
Cc uses that dependency tag to run lipo on shared libraries and binaries
so that the output of the x86_64 variant is actually a fat binary
including both architectures.
Bug: 203607969
Test: build sdk-repo targets on a Mac
Change-Id: Icbddb0a177c0ba19d3e0d11f8cf568e0d1ea3245
* The obj-* targets only call clang or clang++ to compile
C/C++ files, like the tidy-* targets only call clang-tidy.
* Add (obj|tidy)-dir_os and module_os-(obj|tidy) phony targets
to include only targets of the specified OS.
* Add (obj|tidy)-dir_os_subset and module_os_subset-(obj|tidy) phony targets
to include only a subset of that OS target group.
* Most clang-tidy runs produce the same warnings for all variants
of an OS. The *_subset targets reduce runs over multiple variants.
* The obj-*subset targets are useful for a quick test to compile
at least one variant of every C/C++ file for each OS.
* The (obj|tidy)-soong phony target is changed to include only
(obj|tidy)-top_level_directory targets instead of ALL
module-(obj|tidy) targets in all subdirectories.
* For aosp_arm64-eng make tidy-* targets; count NINJA commands:
tidy-soong 381K
tidy-soong_subset 106K
tidy-soong_android 294K
tidy-soong_android_subset 73K
tidy-soong_linux_glibc 84K
tidy-soong_windows 12K
tidy-bionic 12K
tidy-bionic_subset 2.4K
tidy-bionic_android 11.5K
tidy-bionic_android_subset 2.1K
tidy-bionic_linux_glibc 1K
tidy-device_android 7K
tidy-device_android_subset 5K
tidy-hardware_android 3K
tidy-hardware_android_subset 9K
libfec_rs-tidy 33
libfec_rs_subset-tidy 9
libfec_rs_android-tidy 18
libfec_rs_android_subset-tidy 3
* For aosp_arm64-eng make obj-* targets; count NINJA commands:
obj-soong 399K
obj-soong_subset 112K
obj-soong_android 305K
obj-soong_android_subset 75K
obj-soong_linux_glibc 90K
obj-soong_linux_glibc_subset 38K
obj-soong_windows 12K
obj-bionic 15K
obj-bionic_subset 3K
obj-bionic_android 14K
obj-bionic_android_subset 2.3K
obj-bionic_linux_glibc 1.3K
obj-system-core 6K
obj-system-core_subset 3K
obj-frameworks-base 16K
obj-frameworks-base_subset 6K
libfec_rs-obj 33
libfec_rs_subset-obj 9
libfec_rs_android-obj 18
libfec_rs_android_subset-obj 3
Test: NINJA_ARGS="-n" WITH_TIDY=1 make some_obj_tidy_target;
compare output commands from various phony targets
Bug: 199169329
Bug: 202769240
Change-Id: I186c45dc07c5884888c1063dfc09cf212ffb0ebf
* shared libraries and binaries can depend on NDK share libraries
Bug: 208310402
Test: WITH_TIDY=1 make tidy-soong
Test: WITH_TIDY=1 make droid
Change-Id: I88ca8555c62d5ca49e36ca089749722166afec30