Commit graph

2366 commits

Author SHA1 Message Date
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
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
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
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
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
6871062821 Merge "Allow static/shared modules to be disabled per-arch" 2016-07-08 03:38:53 +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
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
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
Dan Willemsen
0fda89f4a8 Add support for logtags
This lets modules declare logtags files, which will then be exported to
make using LOCAL_LOGTAGS_FILES. Make still generates event-log-tags and
the java code.

Bug: 28989759
Change-Id: Ie6be79d3ef8a17a74d42eba681a25a08b4c0e7ae
2016-06-01 15:31:28 -07:00
Dan Willemsen
c2aa4a9c52 Start using blueprint_go_binary
And install the tools into a more obvious location. soong_env is not
moved, since we need it to exist early, so that we can use it in
soong.bash in case there's a build failure.

Change-Id: I9bd1fa320d84d180b2cf3deb90782d380666f7a6
2016-05-31 18:31:56 -07:00
Dan Willemsen
17f052647f Support installing non-native arch binaries
For the x86_arm target, which uses two 32-bit architectures, x86
libraries should be installed into ".../lib", and arm libraries should
be installed into ".../lib/arm".

This shouldn't be necessary for binaries, but non-native binaries aren't
supported in Make right now, so we can revisit this once it's necessary.

Change-Id: I4d883c85d3ef4945ff6149d9c4fc81af5023e12b
2016-05-31 16:27:00 -07:00
Dan Willemsen
558e517ae9 Check more Make variables
Some more common makevars methods were required in order to remove the
"-isystem" prefixes from the toolchain.IncludeFlags() value. In Make,
the -isystem is prepended at time of use, not in TARGET_C_INCLUDES
itself.

Change-Id: If07e69ddb7357d11c7dd48ab60f503d219f29de8
2016-05-20 00:19:14 -07:00
Colin Cross
635c3b0157 Rename common to android
Rename the "common" package to "android", because common is too
generic.  Also removes all android.Android naming stutter.

Ran:
gomvpkg -from 'android/soong/common' -to 'android/soong/android'
gorename -from '"android/soong/android".AndroidModuleContext' -to 'ModuleContext'
gorename -from '"android/soong/android".AndroidBaseContext' -to 'BaseContext'
gorename -from '"android/soong/android".AndroidModuleBase' -to 'ModuleBase'
gorename -from '"android/soong/android".AndroidBottomUpMutatorContext' -to 'BottomUpMutatorContext'
gorename -from '"android/soong/android".AndroidTopDownMutatorContext' -to 'TopDownMutatorContext'
gorename -from '"android/soong/android".AndroidModule' -to 'Module'

Change-Id: I3b23590b8ce7c8a1ea1139411d84a53163288da7
2016-05-18 15:37:25 -07:00