Commit graph

619 commits

Author SHA1 Message Date
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
Dan Willemsen
3f32f03067 Support no configured device architectures
There are some builds where we only want to build host tools, and we may
not have a valid device configuration. Support 0 device architectures
and modules that don't have any configured way to build.

Change-Id: I732251e1cd3cdbfafbc6ef6a550e33e653876f7c
2016-07-11 14:36:48 -07:00
Dan Willemsen
76f0827ce3 Apply export_include_dirs to assembly files
Instead of putting these in CFlags, use GlobalFlags instead. This
matches the Make behavior.

The exportFlagProducer could be generic, but for now only has include
directories, so it should be safe for all file types.

Change-Id: I2862f08e7ad473ebacaa88ad2c4510248cad316f
2016-07-09 07:20:59 +00:00
Dan Willemsen
72d3993c9b Stop exporting NDK prebuilt modules to Make
Make isn't going to use any of these anytime soon. So hide them from
make for now, and be sure to save the AndroidMk shared library
dependencies before we convert them to NDK dependencies.

And $(ACP) is no longer used by $(copy-file-to-target)

Change-Id: I8f8f7d0177d31ba4206c0bc1f2ff952dce53b6b4
2016-07-08 23:41:36 -07:00
Dan Willemsen
97704edd5d Support linking against NDK prebuilt libraries
When sdk_version is specified, we need to use the prebuilt ndk versions
of these libraries instead of the platform versions.

Change-Id: I4ff33a234a985041ebe11ab148d64d0f8df66fc4
2016-07-08 20:44:54 +00:00
Colin Cross
6886183d8f Remove cc.ModuleContext.module()
cc.ModuleContext.module() returns a *cc.Module, and is left over from
when the cc package tried to use inheritance.  Remove it and the last
few users.

Change-Id: I9b42ca59689c1b0ada7980fbec923747ed3a53d3
2016-07-08 11:18:46 -07:00
Dan Willemsen
3c316bc03b Fix SDK link type check
This was always returning true, which defeats the point. Fix the check,
then add another exception for NDK libraries.

Change-Id: I139d95ef62d1063c083d6381293072ad3277ae74
2016-07-07 21:38:29 -07:00
Dan Willemsen
6871062821 Merge "Allow static/shared modules to be disabled per-arch" 2016-07-08 03:38:53 +00:00
Colin Cross
da84958b15 Merge "Return copies of global sanitizer slices" 2016-07-07 21:32:30 +00:00
Evgenii Stepanov
db6509c2f8 Merge "Target sanitize properties can disable the global sanitizer." 2016-07-07 20:08:11 +00:00
Treehugger Robot
bec7c12043 Merge "Don't specify LOCAL_STRIP_MODULE for static libraries" 2016-07-07 19:14:54 +00:00
Colin Cross
7b5c22b1f0 Don't specify LOCAL_STRIP_MODULE for static libraries
After I92a838b07fe4116d5a4b8521fe1ce8d44e6e84e2 in build/,
LOCAL_STRIP_MODULE := keep_symbols will be honored for prebuilts, which
will trigger an error if it is set on a static library.  Only set
LOCAL_STRIP_MODULE for binaries and shared libraries.

Change-Id: I4e17a78afa7c5810dbf9003166c14a1ff3a59c9e
2016-07-07 11:21:53 -07:00
Evgenii Stepanov
fcfe56d194 Target sanitize properties can disable the global sanitizer.
With this change, sanitize: { address: false } disables
SANITIZE_TARGET=address for one target.

Also rename SafeStack to Safestack, because the former can not be
used as a target property.

Bug: 27729263
2016-07-07 10:54:42 -07:00
Evgenii Stepanov
05bafd3784 Revert "Target sanitize properties can disable the global sanitizer."
This reverts commit bb02886451.

Breaks SANITIZE_HOST=address

Change-Id: I9791a034e32a83d567b8739a7ec7b61890cb1b97
2016-07-07 17:38:41 +00:00
Dan Willemsen
fed4d19cbb Allow static/shared modules to be disabled per-arch
libz has a case where the static and shared versions of the device
library are supported, but the host shared library must not be defined,
since it would conflict with the system provided version. There's a
separate module 'libz-host' that provides the host shared library
implementation.

So extend the 'static'/'shared' properties to include 'enabled', which
uses arch_variant so that it can be mutated per-arch. It cannot override
a top level 'enabled: false'.

Change-Id: Ia0f1ff31ad77dc4cb148c531b70158e3245031d5
2016-07-06 21:54:12 -07:00
Evgenii Stepanov
bb02886451 Target sanitize properties can disable the global sanitizer.
With this change, sanitize: { address: false } disables
SANITIZE_TARGET=address for one target.

Also rename SafeStack to Safestack, because the former can not be
used as a target property.

Bug: 27729263
Change-Id: I20f55c0e62b2fdd191ba66c0f661a039109bd78f
2016-07-06 16:38:58 -07:00
Colin Cross
cc85e683a4 Return copies of global sanitizer slices
sanitize.begin() modifies the slice returned by Config.SanitizeHost()
and Config.SanitizeDevice(), return a copy so the global slice doesn't
get corrupted.

Bug: 29188876
Change-Id: I4c7a59b7e96529166519b23a1ebda39b8e060c58
2016-07-06 14:30:32 -07:00
Pirama Arumuga Nainar
58e2dcdeda Disable integrated-as for Mips
Bug: http://b/29771478

Hand-coded assembly in various projects will fail to compile after Clang
switches to integrated assembler for Mips.  Disable integrated-as for
Mips.

Test: Verified Mips builds on AOSP both with the old Clang prebuilts and
the new prebuilts (https://android-review.googlesource.com/#/c/243871/)

Change-Id: Idf441cb9c6c2afc8997d5ee56420885930087918
2016-06-30 04:50:50 +00:00
Dan Willemsen
5d2038fe06 Remove build/libs
Bug: 28001743
Change-Id: Id5bcc11a08b3677ee1caf5b564ef0f2fb65026da
2016-06-16 15:22:09 -07:00
Dan Willemsen
d8315c8d1a Merge "Remove support for libstdc++ on Android/Linux/Darwin" 2016-06-15 22:49:33 +00:00
Colin Cross
c30f10e390 Merge changes from topic 'parser'
* changes:
  Add CommentGroups
  Rename Pos members
  Remove blueprint/parser.Ident
2016-06-15 22:39:32 +00:00
Dan Willemsen
141d566f2b Remove support for libstdc++ on Android/Linux/Darwin
It's now only supported on Windows, where we don't have libc++ support
yet.

Change-Id: I64891b7558d3d2942588687017a0c2f695c18d5c
2016-06-15 13:47:51 -07:00
Colin Cross
7b6ba5c7fa Add CommentGroups
Follows blueprint change 1e73794d42

Change-Id: If3539e2d9370a0224a2364608c496a1e4385dbbf
2016-06-14 19:04:53 -07:00
Colin Cross
e538e410cb Rename Pos members
Follows blueprint change b3d0b8dab4

Change-Id: I10f53498557325d26c6b690583596ac4f9206c79
2016-06-14 19:04:28 -07:00
Colin Cross
2867296203 Remove blueprint/parser.Ident
Follows blueprint change c32c47938f

Change-Id: I8f479704504f7bbefed3ed63bd0d040f65a2fdd5
2016-06-14 19:03:10 -07:00
Dan Willemsen
7517ed0b46 Export strip information to Make
Change-Id: I3c69451a505ac2b97f3112050acc4b64b1cd7394
2016-06-10 17:20:30 -07:00
Colin Cross
d20b36be5d Update androidmk to match blueprint changes
blueprint/parser.Value is now an Expression interface, update androidmk
to match.

Change-Id: I01e0b2a83cf430c1981b450d35c8ab0aab6975f1
2016-06-08 14:50:11 -07:00
Colin Cross
a43f9b3cbf Rename androidmk/test.go so go test can find it
Change-Id: If18c749fe9bc883552952284a469ea8e8f3e8f6d
2016-06-08 14:49:55 -07:00
Dan Willemsen
a96ff64527 Check NDK linking, expose SDK_VERSION to Make
Modules defining sdk_version should only be allowed to link against the
ndk prebuilt libraries and other modules defining sdk_version. Implement
this, and expose the necessary information to Make so that it can be
implemented there as well.

Change-Id: I051498b595f8711883bc120f0394b8bfe2f65bce
2016-06-07 21:52:12 -07:00
Dan Willemsen
92ca32e6b9 Merge changes Ia7e7fb61,Iede67e2c
* changes:
  androidmk: Fix LOCAL_FORCE_STATIC_EXECUTABLE
  Implement re-exporting of library headers
2016-06-08 04:43:18 +00:00
Dan Willemsen
c79e0e7dd3 androidmk: Fix LOCAL_FORCE_STATIC_EXECUTABLE
Change-Id: Ia7e7fb61ffff212a5b6170743c429417a528cef3
2016-06-06 22:34:37 -07:00
Dan Willemsen
490a8dc2d5 Implement re-exporting of library headers
This matches LOCAL_EXPORT_(SHARED|STATIC)_LIBRARY_HEADERS in Make.

Change-Id: Iede67e2c24a24cf51e68a50123299effbe4e4196
2016-06-06 18:35:57 -07:00
Dan Willemsen
29d9f87e7f Allow -lz on Darwin
Change-Id: Ied37d4dca499f55e28494d1ce8eac59122827d67
2016-06-06 16:26:48 -07:00
Dan Willemsen
0c41054bec Add built/libs/* to root.bp
Change-Id: I05af556dde2df5a1ef38d1cc9eb557c8e2729490
2016-06-06 14:52:54 -07:00
Dan Willemsen
22abd40ed0 androidmk: TOP is always "."
But if it comes out to ./, remove both characters.

Change-Id: Ia86c1a60522736773b2e8ee0cf54a4348d302573
2016-06-05 22:47:40 -07:00
Dan Willemsen
58f9bb1160 androidmk: Support version_script
This only translates the common case using $(LOCAL_PATH). If it doesn't
match here, Soong will throw an error with a suggested fix.

Change-Id: If64c8fca008a1a414fc12389e6b1bb40af0df899
2016-06-03 13:56:55 -07:00
Dan Willemsen
0c236aba6e androidmk: Update LOCAL_SANITIZE* support
Change-Id: Ib3d5473869f69e9e3a74ebb403653e5918ad240a
2016-06-03 12:57:05 -07:00
Dan Willemsen
31a6a69f9f Add _<OS> suffix support, remove USE_MINGW
USE_MINGW is no longer supported by Make

Change-Id: I399190ac9e92a2e633bf5438d8deb653beae1bb1
2016-06-03 12:57:05 -07:00
Dan Willemsen
42e20e6063 Add logtags support to androidmk
Generalize the list splitting function used by include_dirs and
export_include_dirs to also support splitting sources.

Change-Id: I11b8f817fb32309511522074fe6b26052ae3d65f
2016-06-03 12:57:05 -07:00
Dan Willemsen
6c2ac0673d Add tests for androidmk
Change-Id: Ic31bf68f75c8dd4d7737d9ea01f2d93637cdaca2
2016-06-03 00:00:50 -07:00
Colin Cross
a1ad8d1889 Simplify arch target handling
Soong's multi-architecture building has grown complex, with the
combination of HostOrDevice+HostType+Arch necessary to determine how to
build a variant of a module, and three separate mutators to split each
into its variations.

Combine HostOrDevice+HostType into Os, which will be Linux, Darwin,
Windows, or Android.  Store Os+Arch as a single Target.

Change-Id: I92f2e2dac53617d595a35cc285d2bd348baa0fbd
2016-06-02 19:09:32 -07:00
Colin Cross
b9db480385 Revert "Simplify arch target handling"
This reverts commit 6713fb26cbcadf525cd75e47d7d0cbc23d282b3e.

Change-Id: Ic473cea2563b0b37dc08b0bc5d3a0ac8c4b6afe6
2016-06-03 01:50:47 +00:00
Colin Cross
54c7112c43 Simplify arch target handling
Soong's multi-architecture building has grown complex, with the
combination of HostOrDevice+HostType+Arch necessary to determine how to
build a variant of a module, and three separate mutators to split each
into its variations.

Combine HostOrDevice+HostType into Os, which will be Linux, Darwin,
Windows, or Android.  Store Os+Arch as a single Target.

Change-Id: Iae677eff61a851b65a7192a47f2dc17c1abb4160
2016-06-02 17:37:02 -07:00