Commit graph

561 commits

Author SHA1 Message Date
Dan Willemsen
648c8aed4c Support unique_host_soname to add -host for shared libs
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
2016-07-21 16:42:14 -07:00
Treehugger Robot
72bd7dba4a Merge "Refactor bionic includes into a single place" 2016-07-21 19:27:40 +00:00
Treehugger Robot
c2062f9c44 Merge "Use the full path to the shared lib." 2016-07-21 18:45:19 +00:00
Colin Cross
f59b69ccaa Refactor bionic includes into a single place
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
2016-07-21 11:17:01 -07:00
Colin Cross
1a0c76fd1e Merge "Rename exported make variables for system headers" 2016-07-21 17:51:13 +00:00
Colin Cross
7bdedbfb8c Merge "Initial README.md" 2016-07-21 17:08:49 +00:00
Dan Albert
9840e1bf1a Use the full path to the shared lib.
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
2016-07-21 10:01:55 -07:00
Treehugger Robot
ff3a2e4d55 Merge "Add more allowed ldlibs for darwin and windows" 2016-07-20 21:22:17 +00:00
Treehugger Robot
e36d753ed1 Merge "Fix Mega_device build" 2016-07-20 20:22:14 +00:00
Dan Willemsen
2b1f0943f5 Add more allowed ldlibs for darwin and windows
Change-Id: If6217de9e369e29a2e716c5cbad4444e7312f197
2016-07-20 13:19:55 -07:00
Colin Cross
10c78c6b97 Rename exported make variables for system headers
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
2016-07-20 13:15:51 -07:00
Christopher Ferris
f9a6ff2713 Merge "Add android/uapi kernel header." 2016-07-20 18:03:48 +00:00
Dan Willemsen
65fb981814 Fix Mega_device build
Change-Id: I128d013ef7c1cb0afa71dc011bf5d4180f468a1b
2016-07-19 21:37:28 -07:00
Dan Willemsen
5951c8a3a9 Use PlatformSdkVersion from Make
This doesn't need to be hardcoded, and should be updated anyways.

Change-Id: Ie28d0d7655e8db3c02d110ae578a763a69b73f92
2016-07-19 19:17:52 -07:00
Stephen Hines
8195ed10a4 Merge "Switch to prebuilt clang-3016494" 2016-07-19 22:02:32 +00:00
Pirama Arumuga Nainar
b6572b15c4 Disable warnings triggered in Clang r271374
Test: Tested build, boot and common usage for Arm, Arm64, x86, x86_64,
Mips images in AOSP and internal branch.

http://b/28149048
http://b/29823425

Disable -Wexpansion-to-defined and -Wnull-dereference.  The second bug
above tracks that these warnings get re-enabled.

Change-Id: Ic23f6b51d3f6913fce2b423a15847e8698bab830
2016-07-19 20:32:11 +00:00
Pirama Arumuga Nainar
a17442b2f2 Switch to prebuilt clang-3016494
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
2016-07-19 20:32:01 +00:00
Treehugger Robot
93bf7d8506 Merge changes I2731ef15,Ib4b03035
* changes:
  Add a timestamp touch rule.
  Remove the implicit "_" in subnames.
2016-07-19 18:41:43 +00:00
Dan Albert
5d723ab19a Add a timestamp touch rule.
Test: Works for the NDK changes I'm working on.
Change-Id: I2731ef159122d6d44a6494a6c975a687bb49ff56
2016-07-18 23:31:27 -07:00
Dan Albert
6a0476930a Remove the implicit "_" in subnames.
The NDK stub libraries need to use subname, but should use "." instead
of "_".

Test: Still builds.
Change-Id: Ib4b0303531e03968c55671ea167ab987adebd783
2016-07-18 23:31:18 -07:00
Christopher Ferris
b68ea7a66c Add android/uapi kernel header.
Add the new android/uapi kernel header include directory.

Bug: 30072483
Change-Id: I3e1394b9abd744c7f76b0ac73bb07f614745a248
2016-07-18 18:36:31 -07:00
Treehugger Robot
036ce31bfa Merge "Disable asan for static binaries" 2016-07-19 00:19:06 +00:00
Colin Cross
3c344ef29e Disable asan for static binaries
build/core/executable.mk has an extra check to disable asan for static
binaries, do the same in soong.

Bug: 30191800
Change-Id: Ia78063264f3280eb889ba9e45c45dd66e4c64a96
2016-07-18 16:14:12 -07:00
Stephen Hines
1034786c37 Revert "Revert "Switch libcompiler_rt-extras to LateStaticLibs.""
This reverts commit 15e4554049.

Change-Id: Iff62dd9fd45746847440f50240c25d32747367df
2016-07-18 16:06:05 -07:00
Stephen Hines
15e4554049 Revert "Switch libcompiler_rt-extras to LateStaticLibs."
This reverts commit bb7473dd1a.

Change-Id: I6099fd8dadc0213a78cab3e2daef5c5ebd4c31ee
2016-07-18 22:08:39 +00:00
Stephen Hines
bb7473dd1a Switch libcompiler_rt-extras to LateStaticLibs.
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
2016-07-18 13:33:25 -07:00
Colin Cross
e10ce184ad Initial README.md
Change-Id: I07970cddefb981f6708b276ac5b04d311d1843d9
2016-07-18 13:00:59 -07:00
Colin Cross
3d92b27717 Add libc and libm to modules that use libc++_static
Matches makefile change Ib21364e6f43689cf59da31d6f561919731ef8272

Change-Id: I6b4f3fcc65e5cac190bf9da315bd9d81e4c7cd3d
2016-07-15 14:46:21 -07:00
Colin Cross
12fc4977bf Fix checkbuild with symlinks
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
2016-07-15 14:44:58 -07:00
Treehugger Robot
b4b613931f Merge "Add symlink installation support" 2016-07-15 21:34:33 +00:00
Treehugger Robot
2c4841800e Merge "Support global and local sanitizers" 2016-07-15 21:12:46 +00:00
Colin Cross
3854a60c55 Add symlink installation support
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
2016-07-15 13:37:03 -07:00
Colin Cross
263abbd5e9 Support global and local sanitizers
Mixing undefined and address sanitizers requires updating cflags.
Matches makefile change Ifee350da4877008fb061bc7f6c700e7fade405bc

Bug: 30163657
Change-Id: Iea4364b912b496400581a475bc79bd9b9c4dd76d
2016-07-15 13:12:58 -07:00
Colin Cross
a89d2e1805 Move no_crt property to apply to libraries and binaries
Change-Id: I8a770ad422dac0fd67b43ca464e0942f504e1c30
2016-07-14 16:01:30 -07:00
Colin Cross
15a0d46283 Fix duplicate library dependencies
Change-Id: I029725373fde30f58067e704c010cd0f638301ae
2016-07-14 16:01:30 -07:00
Colin Cross
aa3bf3768a Fix rpath for host benchmarks
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
2016-07-14 10:28:40 -07:00
Dan Willemsen
72ad175126 Allow libdl on Darwin
Fixes the build, since this is available.

Change-Id: Ia4f50af234ee0f4ae5c7beb54724f590f2835db5
2016-07-13 22:17:39 -07:00
Treehugger Robot
feba062cd5 Merge "Put shared library ldflags first" 2016-07-14 04:26:29 +00:00
Colin Cross
f87b261ceb Put shared library ldflags first
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
2016-07-13 18:55:43 -07:00
Dan Willemsen
f2c27d7370 Export the default LOCAL_STRIP_MODULE value
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
2016-07-13 17:33:49 -07:00
Dan Willemsen
e6c7f18364 Fix LOCAL_EXPORT_C_INCLUDE_DIRS processing
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
2016-07-13 10:45:01 -07:00
Dan Willemsen
75ab80882e Make static_executable an arch_variant
So that target executables can be static executables, and the same
module can make a host executable that isn't static.

Change-Id: Ibe0de001a8d1e7d59e617c244978098355718527
2016-07-12 15:41:09 -07:00
Dan Willemsen
a6f7d15609 Add product variables: cpusets schedboost
These are used by libcutils, and are equivalent to the ENABLE_CPUSETS
and ENABLE_SCHEDBOOST make variables.

Change-Id: I65d0eed49b5bcb4d6415e9e64a0159209a43b922
2016-07-12 15:41:09 -07:00
Colin Cross
f791826f8b Add system/extras/* to the root Android.bp file
Change-Id: I15c729914392dd97e114852d43156bff1c03ed56
2016-07-12 13:14:05 -07:00
Colin Cross
c7a38dc00c Add support for test libraries
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
2016-07-12 13:13:09 -07:00
Colin Cross
7924885eb3 Make Stl *bool
When collapsing properties for applying defaults, string is
appended, *string is replaced, which is the behavior we want here.

Change-Id: I22a8c23e1cb8ec1960cd5d92d80f6c1ddfab1913
2016-07-12 13:12:33 -07:00
Colin Cross
a4190c10eb Make Host/Device_supported *bool
When collapsing properties for applying defaults, bool is ORed, *bool is
replaced, which is the behavior we want here.

Change-Id: I40ac5035bedcd4b1bbf50e054f8527523f9f6f79
2016-07-12 13:11:26 -07:00
Colin Cross
624b8ed0b3 Fix install path of benchmarks
Benchmarks should go in /data/nativetest/<module> like tests.

Change-Id: Ib72ee699334da6a6d27813822e1f86f2863227b3
2016-07-11 17:20:09 -07:00
Colin Cross
b5bc4b412a Add system shared library dependencies to Android.mk
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
2016-07-11 16:14:13 -07:00
Colin Cross
2683274349 Update cc_benchmark to use libgoogle-benchmark
Updates soong to match I1565cf680298a1765e88162d8b0e59dedba29bd7

Change-Id: I787675562e3f1dceb9a56f2bcb533a551cae550a
2016-07-11 22:39:35 +00:00