Export a list of libraries in the VNDK, which is currently empty.
Take in Make's global BOARD_VNDK_VERSION, and use that as the SDK
version for modules that specify use_vndk: true.
Modules that use the vndk have some configuration as if they were
building against the NDK (the absence of globally defined headers), but
in other cases look like platform modules (using the platform libc++,
for now).
This change does not attempt to enforce any linking constraints, that
will come in a later patch.
Test: out/soong/build.ninja doesn't change
Change-Id: I3be206b67015ac5177b7eef4a451c579e3dc903f
Instead of exporting the generated sources dir as headers, let
the Android.bp file specify subdirectories as exported.
Test: m -j checkbuild
Change-Id: I18dd900d63ce7485c8fbfcc39dc77abad6f733d7
Test: Added a test module that uses this
find $SOONG_OUT -name libfoo.so # only shows up in current
Bug: None
Change-Id: Ic88d7c598cd5b6ded8fb851a7eaf859806336af7
For every file which we can run clang-tidy (C/C++ clang-built), we add a
new build node that depends on the object file (since clang-tidy does
not export a depfile), and is depended on by the link step. This is
better than how we're doing it in make, since calling tidy can be turned
on or off without needing to rebuild the object files.
This does not attempt to port WITH_TIDY_ONLY from Make, since the way
that it works is broken (due to the lack of a depfile).
Bug: 32244182
Test: WITH_TIDY=true mmma -j bionic/libc
Test: ./soong (Setting ClangTidy: true)
Change-Id: I40bbb5bb00d292d72bf1c293b93080b5f9f6d8ea
So that we can represent other files that get generated along with the
objects, like the gcno coverage information, and per-file clang-tidy
runs.
Test: Soong's build.ninja identical before/after
Change-Id: I5c553a153c436d5403549f62c73fe79c5f101779
.proto files are translated to .pb.cc and .pb.h files, which are then
compiled normally.
Bug: 32286026
Test: mmma -j system/extras/perfprofd
Change-Id: I538071424d667aacf35b4b8bfebe217f5f092726
Support prebuilt shared libraries as an initial proof-of-concept of
prebuilts. Future changes will support binaries and static libraries,
and the ability to select which to use based on something besides
blueprint properties.
Test: TestPrebuilts run during m -j
Change-Id: I6e84da667e9005ae11844bad01d25cbe4ced1ce3
Blueprint is going to abdicate responsibility for determining the name
of a module. Add a name property, and a method to retreive the name.
Test: build.ninja identical
Change-Id: I09c6f5283cd6e28ad4b04c24c5ab8b00f71ae2ab
Register mutators inside lambdas that are called in a defined order to
correctly order mutators before and after the arch and deps mutators.
Test: build.ninja identical
Change-Id: Iefe2a3515aee8570e76a6e76925db4cda0e9e822
Mutator registration is tightly coupled with the android package, move
all registration from the soong package to the android package.
Test: build.ninja identical
Change-Id: Ie183d0b52cc7431c9e05b231934d189208ef1efe
This sets up the proper dependencies within Soong by adding the imported
dependencies into GeneratedHeaders, and re-exporting them as necessary.
It also exports them to Make using the new LOCAL_EXPORT_C_INCLUDE_DEPS.
Bug: 31742855
Test: Inspection, build hardware/interfaces (pending)
Change-Id: I6a10ceec377a97966baa9d4876b90fcda391dd01
Similar to export_shared_library_headers, this will export headers
imported from a gensrcs or genrule.
Bug: 31742855
Test: Add export_generated_headers, ensure it's in out/soong/Android-*.mk
Change-Id: Ieadefd007ece8b249f011a258a9c5b27f5d3f594
Host builds may build binaries that must have ASAN disabled. Convert
host ASAN to use variants. Since there is only one install location for
shared libraries, don't install the non-ASAN variant at all for now.
Test: mmma -j art SANITIZE_HOST=address
Change-Id: Iacefecac93df44823316624b4c540c24f643fb80
Remove cc.Customizer, its functionality has been replaced by
android.PropertyCustomizer, and it is not used.
Change-Id: Ice32d554015b0800707bc042b187984f73df7979
Check c.sanitize.inData() when deciding on install paths.
Don't set inData() for sanitized binaries.
Bug: 30773053
Change-Id: I24be75ccc1b25ae53f7f0a98d1632b30735d0931
Add an exported DefaultsFactory so that external module types can extend
cc_defaults. DefaultsFactory takes a variadic list of additional
property structures. defaultsFactory remains as the module factory for
cc_defaults.
Change-Id: I03b450ab3a31625e7baca165d393a0007fb3e421
This adds LOCAL_REQUIRED_MODULES to the generated Android.mk for any
dependencies in the "required" list of a module.
Change-Id: Ibcfe89dce7d247eb441af94e37388a59e71a75a9
Append .Parallel() to all of the RegisterBottomUpMutator calls to tell
Blueprint it can run them in parallel.
Test: identical build.ninja, passes race detector
Change-Id: I969a0689522d4cba7c8ff51e2aa00fe2fd338a89
It's better to clip to the existing versions here rather than build
the lower levels as if they existed.
cc.Module's begin() will now normalize the sdk_version to a valid
value for the given architecture so that doesn't have to be checked
later.
Test: make checkbuild with all other libc ndk_library changes
Change-Id: I2fa834f7a1ac3b03a0723291778d86207fcfda72
For example , instead of trying to have libraryLinker inherit from
baseLinker and libraryCompiler inherit from baseCompiler, create a
single decorator object that wraps both baseLinker and baseCompiler.
Test: Builds, no unexpected changes to build.ninja
Change-Id: I2468adaea8466c203a240259ba5694b8b1df7a52
compiler, linker, and installer interfaces may be implemented by a
single decorator object, rename their methods to be unique to avoid the
same method being called multiple times.
Test: out/soong/build.ninja unchanged
Change-Id: I1608c41cd68f614ba99c11bb9fcc7936f618d9aa
Split cc.go into files per module type, plus files for the compiler,
linker, and installer stages.
Change-Id: Id44c03f42fcd180950ccd008d4de0c144ea3597b
The list of migrated libraries is currently empty. Libraries will be
migrated as follow up patches.
Test: Migrated libc to this system and everything still builds.
build.ninja shows libraries being built and used and headers are
collected for the sysroot.
Bug: http://b/27533932
Change-Id: Iaba00543c1390f432befe0eed768ed3fbb8a9b96
The Customizer interface now provides a Flags method that takes a
CustomizerFlagsContext and can call AppendCflags to insert extra cflags
on a module.
Change-Id: I821242e7574e8ff653580325d1bef2998a50e29c
Clear out the generated sources when reusing object files from the
static library for the shared library to avoid linking them twice.
Change-Id: Idc145f817acc93df4c3b266ac7647299399bc8eb
In order to distinguish our host libraries from system installed
libraries, support a flag to automatically append -host to host shared
libraries names. Previously, we were implementing this with different modules,
but with Soong, we'd really like to share the module definitions.
This properly exports the module to make, so that
LOCAL_SHARED_LIBRARIES := libcrypto still works, but the final installed
name is libcrypto-host.so.
Change-Id: I63389469fe1b38078b8bbf4c0fd92e54ef90ae1a
Bionic includes are the same on all architectures, modulo
architecture-specific includes. Use a single function to populate the
list, passing in bionic's and the kernel's names for the architecture.
Also get rid of the ${LibcRoot} variable, it is not providing any value
and makes grepping harder.
Change-Id: I39e7907d312f52dd1378a3937ab1bcba12c4e97f
Bug: http://b/29823425
Test: Tested build, boot and common usage for Arm, Arm64, x86, x86_64,
Mips images in AOSP and internal branch.
Change-Id: I27e03a611d60a2122f6970d6a33f7abdf433546a
Bug: http://b/28149048
Test: Rebuild world (and check on new clang dependencies).
The latest clang inserts even more dependencies for
libcompiler_rt-extras (in the form of __unorddf2/__unordtf2), so we need
to ensure that it gets linked after libm.a for binaries that statically
pull it in.
Change-Id: I22a1deb63a7ed05f77af6f91f0f7a21dcf156608
Allow modules to specify a list of names to create alias symlinks, and
pass the list to make so it can create them. Also pass
LOCAL_FORCE_STATIC_EXECUTABLE for static binaries so that make can avoid
a linker_asan -> linker -> linker_asan dependency loop.
Change-Id: I314d088095ac5f43641ed2cf8247c14c27e23b93
Host benchmarks are installed in
out/host/*/nativetest/<module>/<benchmark> now, so the rpath needs to
include ../../lib. Make benchmarkLinker extend testBinaryLinker in
order to pick up the correct rpath.
Change-Id: I3c34aee8d3c21a08b75258c1d5caf6c9fb6feab3
Some obscure modules (like libtest_with_dependency_loop_b_tmp in
bionic/tests/libs/Android.bp) need to override shared library flags like
-Wl,-soname. Put the defaults first so that the module specific ones
can override them.
Change-Id: Icde9ca2cf76c4f3e3218b6b22033bc81a6755b57
In order to strip the -I from the beginning of each flag, the androidmk
functionality expected every flag to be distinct. The existing
functionality was combining them with spaces if a module exported more
than one include directory at a time.
Change-Id: Ief5e22061c58f3d987557e938bae880509ffb121
So that target executables can be static executables, and the same
module can make a host executable that isn't static.
Change-Id: Ibe0de001a8d1e7d59e617c244978098355718527
Add cc_test_library, which is a combination of a cc_test and a static
library. Requires adding a libraryInterface to identify libraries that
are embedded in other types.
Change-Id: I2f0dcccb2f7243409210547562d2b41c3fbce44e
We were missing dependencies from the prebuilts to the system shared
libraries, which could cause libc to not be installed if only soong
modules were built.
Change-Id: Ie5c237d7be23c6170e8b586b013f6456a8462230