A version block might need to be omitted for reasons beyond just
"future". Support all the same tags we do at symbol scope.
Test: `make ndk` with libc/libm migration patches.
Change-Id: I21f54c67079dae10fee1e5e08bcd01f8810e7a67
Symbols that have been added to a library but should not be exposed
in any of the current NDK API levels should be tagged with "future".
These will be suppressed from the NDK libraries.
Once all this is in better shape we'll have `sdk: "current"`. Symbols
tagged with "future" will be available for that.
Note that this tag can be applied directly to a version. Aside from
being more ergonomic than tagging an entire section, this also solved
the problem of gen_stub_libs.py emitting an empty global section
(which is not valid syntax) in the case where every symbol is
"future". Tag the version instead and it will be omitted.
Test: `make ndk` with libc/libm migration patches.
Change-Id: I41f6e4939c406f695ab5725f360ec6554ad8ab31
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
When these are Ninja variable they can't be used in android.Path since
they'll be rejected as invalid paths. We don't actually need them to be
a Ninja variable, so make them plain old strings instead.
Test: Still builds.
Change-Id: I04743cebd4b2f9be5685545f2ee941df180fce14
We're already referring to the library by the full path. The -L is
unnecessary.
Follow up to https://android-review.googlesource.com/#/c/249544/
Test: Still builds.
Change-Id: Id27dff29f75797c4c0dcc66704ac08cc0b58cfe3
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
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
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