Commit graph

296 commits

Author SHA1 Message Date
Treehugger Robot
cab3d65445 Merge "Rename compiler, linker and installer methods to be unique" 2016-08-02 00:28:36 +00:00
Treehugger Robot
35ef8bdf32 Merge "Fix mac soong build" 2016-08-02 00:02:06 +00:00
Treehugger Robot
3a5af487f2 Merge changes I21f54c67,I41f6e493,I6f2ae636
* changes:
  Allow more symbol file tags at top level.
  Add a new tag to NDK symbol files: future.
  Don't warn for TODOish comments.
2016-08-01 23:06:55 +00:00
Dan Albert
08532b6779 Allow more symbol file tags at top level.
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
2016-08-01 16:04:37 -07:00
Colin Cross
a24166b5c7 Fix mac soong build
Change-Id: I50b3ca1af571d00a0cc5efc80c5d1c6f0b1f789b
2016-08-01 15:42:38 -07:00
Dan Albert
a85042a040 Add a new tag to NDK symbol files: future.
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
2016-08-01 14:36:22 -07:00
Dan Albert
db26530b73 Don't warn for TODOish comments.
These just make it harder to detect when the file is clean of
interesting errors.

Change-Id: I6f2ae6368cdbd2800ce3f0461a3d456f79e6e994
2016-08-01 14:36:22 -07:00
Colin Cross
42742b8bb0 Rename compiler, linker and installer methods to be unique
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
2016-08-01 13:47:15 -07:00
Colin Cross
b98c8b0595 Move toolchain and global variables into separate package
Move all of the configuration into a cc/config package

Change-Id: If56fc7242062ed1ce3cb297f78a1e0ef7537373c
2016-08-01 13:37:01 -07:00
Colin Cross
4d9c2d17c3 Separate cc.go
Split cc.go into files per module type, plus files for the compiler,
linker, and installer stages.

Change-Id: Id44c03f42fcd180950ccd008d4de0c144ea3597b
2016-07-29 15:17:58 -07:00
Dan Albert
914449fca8 Generate NDK sysroots from the platform build.
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
2016-07-28 00:42:05 -07:00
Treehugger Robot
fb8f9a800e Merge "Finish cc.Customizer" 2016-07-28 05:50:34 +00:00
Colin Cross
76fada06c6 Finish cc.Customizer
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
2016-07-27 17:15:49 -07:00
Colin Cross
c951ef1164 Merge "Fix static+shared with generated sources" 2016-07-28 00:12:37 +00:00
Dan Albert
84f431fc34 Resolve GccTriple/ClangTriple early.
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
2016-07-27 11:12:07 -07:00
Dan Albert
ce2b839257 Don't add -L for libs that don't need it.
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
2016-07-27 11:12:07 -07:00
Christopher Ferris
e1ddc12b5d Merge "Remove the common bionic libc kernel directory." 2016-07-27 17:56:55 +00:00
Colin Cross
5dab840e24 Fix static+shared with generated sources
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
2016-07-27 10:30:21 -07:00
Dan Willemsen
627d83db71 Limit unique_host_soname to just host modules
Change-Id: I41d050806a27473abb3788de43b7bf67f5d049a8
2016-07-22 13:41:24 -07:00
Dan Willemsen
bdf3657991 Merge "Support unique_host_soname to add -host for shared libs" 2016-07-22 19:20:35 +00:00
Christopher Ferris
68fed44d38 Remove the common bionic libc kernel directory.
The kernel include directory bionic/libc/kernel/common has been deleted,
so remove it from the include path.

Bug: 30072483
Change-Id: I71297f7ac1a9a28267b2aab270644abab2a085ae
2016-07-22 11:01:41 -07:00
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
Colin Cross
c3e11e5f45 Clang supports armv5te now
Remove the -march=armv5te -> -march=armv5t translation for clang.

Change-Id: Icc9b7c5e9c6194d31387ca63b9f7179a2843d527
2016-07-21 12:35:28 -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
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
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
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
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
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
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