Commit Graph

437 Commits

Author SHA1 Message Date
Colin Cross 88c4750c51 Merge "Include bionic/Android.bp" 2016-05-17 00:42:17 +00:00
Colin Cross 3e5889a791 Include bionic/Android.bp
bionic/Android.bp exists now, and subdirectories are handled with
Android.soong.mk files.

Change-Id: I70259ff5c2fb9df2f8716590502f49de1c2c8ac7
2016-05-16 16:56:51 -07:00
Treehugger Robot 8911062843 Merge changes I7fd53084,I6b7a3062
* changes:
  Properly export toolchain static libs
  Add more make-exported variables
2016-05-16 23:42:51 +00:00
Dan Willemsen e7932e890b Properly export toolchain static libs
Change-Id: I7fd5308469aee5a43d576d1a72f7738dc6f9fbaa
2016-05-16 15:56:53 -07:00
Dan Willemsen 73d21f25cb Add more make-exported variables
Change-Id: I6b7a30624923b8ca879d4ac7a3f1f11aec9b9b8a
2016-05-16 14:22:56 -07:00
Evgenii Stepanov 6e39d270fa Merge "USE_SAFESTACK support in Soong." 2016-05-16 20:19:39 +00:00
Dan Willemsen 1e45ef6823 Merge "Create empty .a on Darwin when there is no obj file." 2016-05-13 22:35:33 +00:00
Dan Willemsen 4a94683a60 Don't use GTEST_OS_LINUX on Darwin
Change-Id: If77118591daa7b474e6989e03109ea32ddd357b2
2016-05-13 22:28:07 +00:00
Dan Willemsen 9f0b550a15 Create empty .a on Darwin when there is no obj file.
On Darwin ar would fail if there is no object file to add.
We work around by adding a dummy.o.

Port to Soong of build/ 4aaa1a1fd8e7eb23ac5557cd326d1a48efdb54cd

Change-Id: I68bbebea2726058c25863d7026a645a520d05167
2016-05-13 15:07:37 -07:00
Dan Willemsen 8146b2f1c9 Update gtest flags from Make
There's a different libgtest to use for NDK libraries built with
different STLs. And we no longer need to add the gtest include path, as
it's exported.

Change-Id: I2f804cf98e074cfd4ea6b70a445e304a8a8bce50
2016-05-13 20:47:24 +00:00
Evgenii Stepanov 8391efac1b USE_SAFESTACK support in Soong.
Translated into product_variables.safestack.cflags.

Change-Id: Ieb55c050448ff04793431c249f482f2d4364e67a
2016-05-13 12:44:03 -07:00
Colin Cross 2630213418 Set LOCAL_PATH for each prebuilt module
Set LOCAL_PATH to the path to the blueprint file so that make can
generate MODULE-IN-* rules to make mma work.  Switch to using
LOCAL_PREBUILT_MODULE_FILE instead of LOCAL_SRC_FILES to specify the
location of the prebuilts relative to $(TOP).

This should also make notice files work.

Change-Id: I51c7aa1187e68c4c9095687461dd5e76cbd7292d
2016-05-13 12:30:12 -07:00
Dan Willemsen e8b1bc0a68 Lock down environment variable access after all other singletons
To allow other singletons to use new environment variables, move env.go
to the end of the source list, so that its singleton is run last.

Change-Id: Ic92308f72fc0c92a0fedbc5546e337940e32eaab
2016-05-12 19:03:10 -07:00
Dan Willemsen 7f08e21941 Merge "Publish Soong configuration to Make variables" 2016-05-13 01:36:28 +00:00
Evgenii Stepanov 2522660da7 Merge "Support SANITIZE_TARGET=safe-stack in soong." 2016-05-12 21:59:25 +00:00
Treehugger Robot 0414479ba4 Merge "Include objs from whole static libs before local objs" 2016-05-12 21:06:57 +00:00
Evgenii Stepanov 0a8a0d09d1 Support SANITIZE_TARGET=safe-stack in soong.
Change-Id: I570a7033ece82c5e76815dc1b81622b481930de4
2016-05-12 13:54:53 -07:00
Dan Willemsen 4b7d5deb84 Publish Soong configuration to Make variables
For configuration like TARGET_GLOBAL_CFLAGS, it would be good to have
Make and Soong use the same values. This change adds an interface for
packages like cc to verify the current value of make variables match the
Soong equivalents, and once they're satisfied with the results, remove
the make definition and use the value from Soong.

The cc implementation exports a few variables currently that I expect to
match between both implementations in all cases. It also checks
{CLANG,}{HOST,TARGET}_GLOBAL_{C,LD}FLAGS, which should be mostly similar
between make and soong now.

Bug: 23566674
Change-Id: Idc8582ef31ace11a8baefcf525c3683f08a573aa
2016-05-12 13:36:55 -07:00
Dan Willemsen 025b4807cb Include objs from whole static libs before local objs
This matches the make behavior.

Change-Id: I8265fb481424734062b0fca944cdbbe283b7236d
2016-05-12 13:20:52 -07:00
Dan Willemsen 174978cc58 Support custom suffixes on Makefile outputs
This way Make can use different output files for different targets, and
switch between them without having to reparse all the makefiles.

Change-Id: I00001a09d79025772d966f443ab9f130e35f4720
2016-05-11 00:38:00 -07:00
Treehugger Robot ac6697420a Merge "Move local ldflags after the toolchain ldflags" 2016-05-11 01:27:50 +00:00
Dan Willemsen 00ced7675c Move local ldflags after the toolchain ldflags
This way a local module can override a global flag (like libm
overriding -Wl,--hash-style=)

Change-Id: If32774381fc46b5767f2c13bf45c3a84acb2697e
2016-05-10 17:31:21 -07:00
Dan Willemsen 8a35405d33 Add a 32-bit x86_64 arch variant
In make, the current 32-bit configuration for generic x86_64 targets
inherits some variables (SSE4 support) from the 64-bit configuration,
and overrides the make variables used for other configurations (SSSE3).

We don't have that problem in Soong, but this is the configuration
matching what Make is using.

Change-Id: Ia934ff40f9388f9c202a0fe0608e7b45b77a2714
2016-05-10 15:29:33 -07:00
Dan Willemsen f4449451b5 Merge "Fix X86 flags" 2016-05-10 00:09:00 +00:00
Dan Willemsen 2524b414e2 Merge "Fix mips flags" 2016-05-10 00:08:54 +00:00
Dan Willemsen 569b0fa2ae Fix X86 flags
Add extra clang cflags, and correct the clang triple for X86 device
builds.

Change-Id: I95abbd0f0f943ebdede905733785ee3659610058
2016-05-09 15:32:07 -07:00
Dan Willemsen c785ff35af Fix mips flags
Change-Id: Ica7851e19d9a709d03a752dbd4f88f07fc8ce1ee
2016-05-09 15:31:34 -07:00
Dan Willemsen ed89a7aa0c Clean up and fix Krait cflags
For krait, we were using the cortex-a15 cflags for GCC, but a completely
separate set for Clang. To make it more readable, and prevent the LPAE
flag from being missed for Clang, explicitly define krait cflags for GCC
as well.

Change-Id: I6dc00a22e2b298ee3755190bf09f28e427c8c70d
2016-05-09 15:30:53 -07:00
Dan Willemsen b485099bad Fix ArchFeatures decoding with default ArchVariant
We were using the original ArchVariant passed in, not the blank string
that we reset it to if it's considered the default variant.

Change-Id: Ice644cc1d4897af99fe79b55d441f406a7a270de
2016-05-07 00:29:22 +00:00
Dan Willemsen 162d08f35e Add missing arm64 -Werror=implicit-function-declaration
This exists for all of the 64-bit architectures in the make build system

Change-Id: I023ef1afdaaa790aac4243a5c040f533b8814684
2016-05-07 00:27:26 +00:00
Dan Willemsen 4ce4703182 Add -mpopcnt for X86_64 targets if they support popcnt
Change-Id: I09668a220f207d3d7510f058610846e4427d815e
2016-05-06 17:23:20 -07:00
Dan Willemsen 2c044aed20 Remove duplicate -B entry for host linux clang ldflags
In cc/cc.go, we already add -B{GccRoot}/{GccTriple}/bin to all clang
cflags, asflags, and ldflags. So we don't need to add a linux specific
version here.

Change-Id: I42d71662c78a8170463dfec932a633e4d4ff52c8
2016-05-06 17:23:15 -07:00
Colin Cross 6ee75b61cd Support prepended arch-specific properties
Arch-specific static libraries should be prepended so that the common
static libraries can depend on them.

Bug: 26968262
Change-Id: I40a21d18ece8f6d20824437e7180628b29ffdd04
2016-05-05 16:49:43 -07:00
Dan Willemsen 3b1fffa33b Fix Android.mk LOCAL_EXPORT_C_INCLUDE_DIRS generation
We were keeping the original array, and adding duplicates with -I
removed. Instead, only add entries that start with -I, but continue
stripping that off. This removes the -isystem arguments from the NDK
libraries.

Change-Id: I8fd71bbd6b7a051aad7e80a92a05dbdc05a6b87a
2016-05-05 15:11:48 -07:00
Dan Willemsen 66187d987c Stop using the mips32r6 ABI in MegaDevice
It was present in the r10 NDK checked into the platform, but is not
available in the r11 NDK nor the official r10 NDK.

Change-Id: I45a2dcf8acc810174c77a0a19870fb849f674b72
2016-05-05 13:20:45 -07:00
Colin Cross 3a31f1665c Update path to ninja
ninja has been moved from prebuilts/ninja to prebuilts/build-tools so it
can share the hermetic libc++.so there.

Change-Id: I0b6e76baaa6916a8c7fd19c684b792ccef2f9cb1
2016-05-04 16:25:26 -07:00
Colin Cross 1f7c527ee9 Update androidmk translator
support LOCAL_SRC_FILES_EXCLUDE, and fix a typo arm->arch.

Change-Id: I9f789e943d9aca4c5aff2b6b56b1e4a0626ecd86
2016-05-03 18:06:43 -07:00
Colin Cross 30d5f514dd Support sanitizer builds inside make
Make expects libraries built with address sanitizer to be installed into
/data, and can't handle multiple variants of modules.

Change-Id: Ice575ff6f0788a88f296e7b3ee521a2b9771f55f
2016-05-03 18:02:42 -07:00
Colin Cross b8ecdfe039 Fix stripping on Darwin
The strip tool is different on Darwin, use a separate darwinStrip rule
instead of calling strip.sh for host builds on Darwin.

Change-Id: I6d421cba0dcea04367d5bc638a03f64c81e2ead0
2016-05-03 15:52:51 -07:00
Colin Cross e14388b9de Remove trailing / from install path
Prevents make installing files with a double /:
Install: out/target/product/generic_arm64/system/lib//libc.so

Change-Id: Iee237f344e8140c4938aa9d1e6940e4fdbfa7cd8
2016-05-03 14:53:18 -07:00
Colin Cross 9212b1b0d6 Merge "Support stripping shared libraries and binaries" 2016-05-03 21:20:43 +00:00
Colin Cross 7be391bff6 Merge "Move shell and python scripts to scripts/ directory" 2016-05-03 21:13:22 +00:00
Colin Cross 665dce9320 Support stripping shared libraries and binaries
Strip all shared libraries and binaries by default.  Use a shell script
to wrap the long sequences of commands needed by some strip variants.

Change-Id: I465bf7cc48330913e60e24762fd55fa2a7731c26
2016-05-03 14:03:38 -07:00
Colin Cross 98943a0a63 Merge changes I2a3cd53c,I8b9de913
* changes:
  Prevent replacing missing dependency glob rules with errors
  Support nested glob patterns
2016-05-03 21:02:44 +00:00
Colin Cross 1474741435 Move shell and python scripts to scripts/ directory
Change-Id: Icdff44a54d14ddfc2266d99cf0578a8105716918
2016-04-29 13:59:56 -07:00
Colin Cross e2c4874945 Prevent replacing missing dependency glob rules with errors
AndroidModuleContext.Build() replaces all build statements with errors
when the module has missing dependencies, but modules may try to create
glob rules to detect when missing dependencies have been satisified, and
those rules should not be replaced with errors.  Whitelist globRule
build statements.

Change-Id: I2a3cd53c05cea44cec9b5a99090d8778ca954d69
2016-04-27 13:47:35 -07:00
Colin Cross da727cf991 Support nested glob patterns
Globbing separately for path/to/lib and path/to/lib/test would result in
trying to use intermediates/path/to/lib as both a file list file for the
first glob and as a directory to store the file list file for the second
glob, causing ninja to exit with an mkdir "Not a directory" error.

Add ".glob" to the file list file name to avoid collisions.

Change-Id: I8b9de9133d7ef667088a2f13eb28652508f3a290
2016-04-27 13:45:26 -07:00
Stephen Hines 369f01315a Switch to clang-2812033.
Change-Id: Ie44a0536a50aa6b443be0c015fca1ea9fa02590c
2016-04-26 21:47:42 -07:00
Colin Cross 737cb6566f Use exported gtest include directories
Manually inserting gtest include directories causes build failures in
manifests that don't have external/gtest.  external/gtest already
exports its include directories so remove the manual include directory.

Change-Id: I6baac4bd3bea7dba3aa134d18b66f02a6dc9a54a
2016-04-25 15:13:23 -07:00
Colin Cross 16b2349190 Add support for sanitizer property
Add a new feature to cc modules that adds the cflags and libraries
necessary to implement AddressSanitizer, ThreadSanitizer, and
UndefinedBehaviorSanitizer.

Change-Id: Ibe5ffadc7ece56080a2521f2c7c00da9ef712584
2016-04-21 16:42:08 -07:00