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
To allow cflag changes when using the "old" binder API that are still
used by all 32-bit only configurations. We can't just use
android32/android64 here, since some devices use a 64-bit kernel with a
32-bit userspace, which is configured as "android32".
Change-Id: I8450484b75d59c1855c7ba36260c08925e7b28ad
Make will combine this information with statistics gathered from the
Make build, then dump it out to a build artifact.
Change-Id: I2bd84d4f8a8d145c37e3a4c4fcc8fece99e2a1de
The kernel include directory bionic/libc/kernel/common has been deleted,
so remove it from the include path.
Bug: 30072483
Change-Id: I71297f7ac1a9a28267b2aab270644abab2a085ae
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
Using only -lc (for example) means that in the case where we have one
library path with libc.a but no libc.so (such as prebuilts/ndk) and
another with libc.so (such as the out directory), we'll always use the
static version.
We can link shared libraries by their full path to be sure that we
always get the right library.
Change-Id: Idf5707fc4aaf9e651d7d8936611200760eab3c7c
Add SYSTEM_ to variables that contain headers that are used with
-isystem, and split -I and -isystem variables into separate make
variables. Also export SRC_HEADERS and SRC_SYSTEM_HEADERS to compare
against make.
Change-Id: I02097c35d1d5342ebce8311d8878fff33b118adb
Test: Tested build, boot and common usage for Arm, Arm64, x86, x86_64,
Mips images in AOSP and internal branch.
http://b/28149048http://b/29823425
Disable -Wexpansion-to-defined and -Wnull-dereference. The second bug
above tracks that these warnings get re-enabled.
Change-Id: Ic23f6b51d3f6913fce2b423a15847e8698bab830
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
The NDK stub libraries need to use subname, but should use "." instead
of "_".
Test: Still builds.
Change-Id: Ib4b0303531e03968c55671ea167ab987adebd783
build/core/executable.mk has an extra check to disable asan for static
binaries, do the same in soong.
Bug: 30191800
Change-Id: Ia78063264f3280eb889ba9e45c45dd66e4c64a96
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
Soong delegates installation to make when embedded in make, so it can't
create any dependencies on installed files. Only create the symlink
rules if not embedded in make.
Change-Id: I26d2857e6d544b963a0c52145a8666ba30864838
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 make, BUILD_PREBUILT and BUILD_SHARED_LIBRARY/BUILD_EXECUTABLE use
different defaults for LOCAL_STRIP_MODULE. Explicitly use the
BUILD_SHARED_LIBRARY/BUILD_EXECUTABLE default so that we'll strip
binaries the same way when converting from Make to Soong.
BUILD_SHARED_LIBRARY/BUILD_EXECUTABLE uses the default set in
dynamic_binary.mk: mini-debug-info.
BUILD_PREBUILT (SHARED_LIBRARIES) uses no_debuglink
BUILD_PREBUILT (EXECUTABLES) doesn't strip by default
None of the above support stripping host modules.
Change-Id: I73a6f7bd7d2ed2033936579c78ae4980386dd4a2
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