This switches:
BUILD_COPY_HEADERS / LOCAL_COPY_HEADERS
BUILD_HOST_EXECUTABLE
BUILD_HOST_SHARED_LIBRARY
BUILD_HOST_STATIC_LIBRARY
to errors by default. Devices can set
BUILD_BROKEN_USES_BUILD_HOST_EXECUTABLE (etc) to turn these errors back
to warnings. I've done that for all of our internal devices.
Bug: 130719878
Bug: 130696912
Bug: 130722971
Bug: 130723227
Test: remove the BUILD_BROKEN_USES_* lines from a device, see errors
Change-Id: I1aecf97f64e281df3682ff0a0fb3ac4283790acd
Merged-In: I1aecf97f64e281df3682ff0a0fb3ac4283790acd
(cherry picked from commit c4bdff5f7e)
We've considered these deprecated for a while, and have reduced where
they may be used, but let's actually throw warnings and call them out
specifically now.
Bug: 130719878
Test: lunch aosp_arm; m nothing [see no warnings]
Test: lunch aosp_crosshatch; m nothing [see LOCAL_COPY_HEADERS warnings]
Test: lunch aosp_taimen; m nothing [see BUILD_COPY_HEADERS warnings]
Change-Id: I8c12012366d84667de0d223bbde38d8b90419e36
There are no common users left.
Also add some sanity checks to ensure that people don't attempt to use
LOCAL_IS_HOST_MODULE := true with the BUILD_(STATIC|SHARED)_LIBRARY
module types (I'm not sure it would work, but it definitely wouldn't be
good).
Bug: 130722971
Test: treehugger
Test: check the warnings on the build_test builds from treehugger
Change-Id: I3e571ef80379955149adbceff4500e51dfa016c6
Creates a build_system_stats.txt build artifact that contains statistics
on how many BUILD_* modules are defined in a build. Also writes out
information about the Soong module types sent from the Soong build.
Change-Id: Iaf0c7062f542dc6942b5349854f3d49267cac4a5
By resetting we lose LOCAL_*MODULE_STEM values for the second include
of the *_internal.mk.
We don't need to reset because we now store the default value to a
temporary variable my_*module_stem in configure_module_stem.mk.
Bug: 27775991
Change-Id: I36d1ff3d177818677fb38bdb3d340dd2ff34c404
This change basically ported our target multilib to the host side.
It supports 2 host build modes: x86 and x86_64 multilib build.
For now you need to set "BUILD_HOST_64bit=true" to switch to x86_64
multilib build. Later we'll default to x86_64 build and have a flag
to force 32-bit only build, which may be needed by SDK build.
In host module definition, like in target ones, you can use the
following
LOCAL variables to set up multilib configuration:
LOCAL_MULTILIB: can be "both", "first", "32" or "64".
It also supports the same set of arch or 32-vs-64 specific LOCAL
variables.
By default, it builds only for the first arch.
To keep path compatibility, in x86_64 build files are still output to
out/host/linux-x86; Both 32-bit and 64-bit executables are in
out/host/linux-86/bin;
In x86_64 build 32-bit shared libraries are installed to
out/host/linux-x86/lib32
and 64-bit shared libraries are installed to out/host/linux-x86/lib;
32-bit object files are output to out/host/linux-x86/obj32 and 64-bit
object files
are output to out/host/linux-x86/obj.
Bug: 13751317
Change-Id: I6044f83b7db369a33e05209e8c588eb6dc83409f
LOCAL_MULTILIB replaces LOCAL_32_BIT_ONLY and
LOCAL_NO_2ND_ARCH, although both are still supported.
Set LOCAL_MULTILIB := 32 to always build a module 32-bit.
This is the same as specifying LOCAL_32_BIT_ONLY.
Set LOCAL_MULTILIB := first to always build a module for
the first architecture (64-bit on a 64-bit target, 32-bit on a
32-bit target). This is the same as specifying LOCAL_NO_2ND_ARCH.
Set LOCAL_MULTILIB := both to build for both architectures
on a mulitlib (64-bit) target.
If LOCAL_MULTILIB is not set libraries will default to "both",
and executables, packages, and prebuilts will default to building
for the first architecture if supported by the module, otherwise
the second.
Executables that set LOCAL_MULTILIB := both must set either
LOCAL_MODULE_STEM_32 and LOCAL_MODULE_STEM_64 or
LOCAL_MODULE_PATH_32 and LOCAL_MODULE_PATH_64 to specify how to
differentiate the install locations of the two versions.
Change-Id: I22ab6aa342b231c307b1d8a86cea4fd91eea39f5
This makes sure copy_headers.mk only be included onces, no matter
it's for the 1st arch or the 2nd arch.
Change-Id: I80a558fbdb52861f176bd27a21c302069a5cc3ce
Add four new variables for module makefiles:
LOCAL_MODULE_TARGET_ARCH specifies that a module is only supported for
one or more architectures. Any architecture not in the list will be
not attempt to build the module. The expected use case is prebuilts
that are only suitable for a single architecture, or modules like llvm
that need per-architecture support.
LOCAL_MODULE_UNSUPPORTED_TARGET_ARCH specifies that a module cannot be
built for one or more architectures.
LOCAL_MODULE_TARGET_ARCH_WARN and LOCAL_MODULE_UNSUPPORTED_TARGET_ARCH_WARN
are the same, but warn that the arch is not supported, which is useful
for modules that are critical but not yet working.
The logic for whether or not to build an architecture is fairly
complicated, so this patch consolidates it into module_arch_supported.mk
Change-Id: I120caf4a375f484e1fd6017b60c2f53882ae01e6
By default, an executable is built for TARGET_ARCH.
To build it for TARGET_2ND_ARCH in a 64bit product, use:
LOCAL_32BIT_ONLY := true
To skip a module for TARGET_2ND_ARCH, use:
LOCAL_NO_2ND_ARCH := true
Bug: 11654773
Change-Id: Ieb293d25b21024bfe1b554044df338e064ac7b46
The rules for the 2nd arch are set up in the second inclusion
of static_library_internal.mk.
libfoo of the 2nd arch will be built into
$(PRODUCT_OUT)/obj_$(TARGET_2ND_ARCH)/libfoo_intermediates/libfoo.a.
Bug: 11654773
Change-Id: I1d92733968fc442e9225b4df5bd1b551a81d89f7
Bug: 5573756
With this change, we can set LOCAL_EXPORT_C_INCLUDE_DIRS in the module
definition to export include dir paths.
Paths in LOCAL_EXPORT_C_INCLUDE_DIRS should be relative to the top dir
of the source tree.
If a library (shared or static) exports some include paths, any module
using it will import the include paths and add them to the compiler
command line.
Change-Id: I49aabc589d2cf214044d13ccd5532ef68209adf0
Currently, if LOCAL_WHOLE_STATIC_LIBRARIES is specified, its values is
ignored. This patch addresses this limitation and works as follows:
For every whole lib specified, it extracts the archive into a sub-directory
under the target lib's intermediate, and then seeds the initial target
archive with all the members.
Signed-off-by: Dima Zavin <dima@android.com>