Allow CustomizeProperties to override the dynamic linker by setting a
DynamicLinker property. Needed by art, which overrides the linker for
device-on-host testing.
Change-Id: Ia4cb5a85b9a995d8138da33eb13543addf3b38cc
Bug: http://b/31317834
Clang generates invalid beqc compact branch instruction. Disable
compact branch generation until clang is updated to include r278824,
which fixes the issue.
Error:
/tmp/backtrace_test-6a4a4f.s:6603: Error: invalid operands
`beqc $zero,$1,$BB31_ 6' clang++.real: error: assembler command
failed with exit code 1 (use -v to see in vocation)
Test for mips and mips64: cd system/core/libbacktrace && mma
Change-Id: I0b0f189e126621dbadb317ba711993e45004348d
HOST_PREFER_32_BIT was used during the switch to 64-bit host tools to
keep the SDK building as 32-bit, but is never set any more.
Change-Id: I7c2db269d3f7fa1f4e0c022cbced789755a62d81
When the UseGoma flag is set, put all rules except the C compilation
rule in an externally defined local_pool, which will have been created
by kati. The gomacc wrapper will already be in the CC_WRAPPER
environment variable.
Bug: 31142427
Change-Id: I699d4edff2e302eee398dad8692ceb14721a628c
These had only been exposed for shared libraries.
Also fixes testDecorator to not have two baseInstallers both being
written out to the Android.mk.
Bug: 31158868
Test: manual diff of out/soong/Android-aosp_flounder.mk
Test: Verify installed windows binaries end in .exe
Change-Id: I2bded5fb090117d48ade575b4438e0dedd2e3763
Check c.sanitize.inData() when deciding on install paths.
Don't set inData() for sanitized binaries.
Bug: 30773053
Change-Id: I24be75ccc1b25ae53f7f0a98d1632b30735d0931
Bug: http://b/30421084
Change-Id: I8b65669ef9f60f85202295de117d3806d3a5b1f6
Test: Tested build, boot and common usage for several devices in AOSP
and internal branch.
-Wl,-read_only_relocs,suppress is required for libart to build to
avoid the error:
ld: illegal text-relocation to '__ZN3art7Runtime9instance_E' in out/soong/.intermediates/art/runtime/libart/darwin_x86_static/obj/art/runtime/runtime.o from '_art_quick_throw_null_pointer_exception' in out/soong/.intermediates/art/runtime/libart/darwin_x86_static/obj/art/runtime/arch/x86/quick_entrypoints_x86.o for architecture i386
Change-Id: Id9a0fda1dbf12a254f92419a21e5f290895ea62c
Add a symlink_preferred_arch property to binaries to allow compiling the
binary for multiple architectures and then creating a symlink to the
preferred archicture, for example dalvikvm32 and dalvikvm64, with
dalvikvm symlinked to dalvikvm64.
Test: mmma -j art/dalvikvm
Change-Id: Ied15f2be9d52c01006fe8ac207c175b78558eab1
Add an exported DefaultsFactory so that external module types can extend
cc_defaults. DefaultsFactory takes a variadic list of additional
property structures. defaultsFactory remains as the module factory for
cc_defaults.
Change-Id: I03b450ab3a31625e7baca165d393a0007fb3e421
and export the library name to make. Refactor the code a bit to avoid repeating the library name
multiple times.
Bug: 22033465
Test: Ran external/clang/build.py for aosp-llvm
Change-Id: I25eb3858eb92e1dd493b09524d559802551b2547
This adds LOCAL_REQUIRED_MODULES to the generated Android.mk for any
dependencies in the "required" list of a module.
Change-Id: Ibcfe89dce7d247eb441af94e37388a59e71a75a9
cc_benchmark was not propagating the call to baseInstaller.install,
which resulted in no install location being set and the benchmarks
installed in out/.
Change-Id: I4399cd479d9cd7ec1b7332dd0d20a9ab3820b04e
Disable coverage for static binaries where address sanitizer is
disabled, and disable coverage in the mutator when disabling address
sanitizer.
Bug: 29188876
Change-Id: Ia1a21878c3f34cd295a6dec49608c412eb09e7b1
Append .Parallel() to all of the RegisterBottomUpMutator calls to tell
Blueprint it can run them in parallel.
Test: identical build.ninja, passes race detector
Change-Id: I969a0689522d4cba7c8ff51e2aa00fe2fd338a89
Didn't catch these the first time because I hadn't done a clean build.
Test: rm -rf out && make ndk
Change-Id: Ia66ad614d2163272889ee6937a6449c44db16ac0
It's better to clip to the existing versions here rather than build
the lower levels as if they existed.
cc.Module's begin() will now normalize the sdk_version to a valid
value for the given architecture so that doesn't have to be checked
later.
Test: make checkbuild with all other libc ndk_library changes
Change-Id: I2fa834f7a1ac3b03a0723291778d86207fcfda72
For example , instead of trying to have libraryLinker inherit from
baseLinker and libraryCompiler inherit from baseCompiler, create a
single decorator object that wraps both baseLinker and baseCompiler.
Test: Builds, no unexpected changes to build.ninja
Change-Id: I2468adaea8466c203a240259ba5694b8b1df7a52
We were generating this, but not actually using it yet.
Test: `make ndk` with libc/libm migration patches, readelf generated
libs.
Change-Id: I9aadf58307bc645b33cab5207409552c5046937a
Bionic's version scripts are unfortunately complicated enough that the
naive processing I was doing before is not going to be sufficient.
Add a real parser/generator with a bunch of tests to fix this.
Test: cc/test_gen_stub_libs.py && make ndk
Change-Id: I0f73b41ade1e6cf4e31bf70ba43a743429ce770b
This adds the `versioned=API` tag. This should be a very uncommonly
needed tag, and is really only needed to fix versioning mistakes that
are already out in the wild.
For example, some of libc's __aeabi_* functions were originally placed
in the private version, but that was incorrect. They are now in
LIBC_N, but when building against any version prior to N we need the
symbol to be unversioned (otherwise it won't resolve on M where it is
private).
Test: make ndk
Change-Id: I0cd2f80cf4b32356356914cf7ff4119e67f15032
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
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
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
Split cc.go into files per module type, plus files for the compiler,
linker, and installer stages.
Change-Id: Id44c03f42fcd180950ccd008d4de0c144ea3597b
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
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
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
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
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
The kernel include directory bionic/libc/kernel/common has been deleted,
so remove it from the include path.
Bug: 30072483
Change-Id: I71297f7ac1a9a28267b2aab270644abab2a085ae
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
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
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
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
Test: Tested build, boot and common usage for Arm, Arm64, x86, x86_64,
Mips images in AOSP and internal branch.
http://b/28149048http://b/29823425
Disable -Wexpansion-to-defined and -Wnull-dereference. The second bug
above tracks that these warnings get re-enabled.
Change-Id: Ic23f6b51d3f6913fce2b423a15847e8698bab830
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
The NDK stub libraries need to use subname, but should use "." instead
of "_".
Test: Still builds.
Change-Id: Ib4b0303531e03968c55671ea167ab987adebd783
build/core/executable.mk has an extra check to disable asan for static
binaries, do the same in soong.
Bug: 30191800
Change-Id: Ia78063264f3280eb889ba9e45c45dd66e4c64a96
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
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
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
Some obscure modules (like libtest_with_dependency_loop_b_tmp in
bionic/tests/libs/Android.bp) need to override shared library flags like
-Wl,-soname. Put the defaults first so that the module specific ones
can override them.
Change-Id: Icde9ca2cf76c4f3e3218b6b22033bc81a6755b57
In make, BUILD_PREBUILT and BUILD_SHARED_LIBRARY/BUILD_EXECUTABLE use
different defaults for LOCAL_STRIP_MODULE. Explicitly use the
BUILD_SHARED_LIBRARY/BUILD_EXECUTABLE default so that we'll strip
binaries the same way when converting from Make to Soong.
BUILD_SHARED_LIBRARY/BUILD_EXECUTABLE uses the default set in
dynamic_binary.mk: mini-debug-info.
BUILD_PREBUILT (SHARED_LIBRARIES) uses no_debuglink
BUILD_PREBUILT (EXECUTABLES) doesn't strip by default
None of the above support stripping host modules.
Change-Id: I73a6f7bd7d2ed2033936579c78ae4980386dd4a2
In order to strip the -I from the beginning of each flag, the androidmk
functionality expected every flag to be distinct. The existing
functionality was combining them with spaces if a module exported more
than one include directory at a time.
Change-Id: Ief5e22061c58f3d987557e938bae880509ffb121
So that target executables can be static executables, and the same
module can make a host executable that isn't static.
Change-Id: Ibe0de001a8d1e7d59e617c244978098355718527
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
When collapsing properties for applying defaults, string is
appended, *string is replaced, which is the behavior we want here.
Change-Id: I22a8c23e1cb8ec1960cd5d92d80f6c1ddfab1913
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
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
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
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
When sdk_version is specified, we need to use the prebuilt ndk versions
of these libraries instead of the platform versions.
Change-Id: I4ff33a234a985041ebe11ab148d64d0f8df66fc4
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
This was always returning true, which defeats the point. Fix the check,
then add another exception for NDK libraries.
Change-Id: I139d95ef62d1063c083d6381293072ad3277ae74
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
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
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
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
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
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
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
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
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
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
We don't actually need to do any changes to the path for the include
files, so we can just rely on the include_dir search to work.
It would still be useful to verify that the path isn't something bad,
like an absolute path, but we'll handle that by looking at the cflags in
another change.
Change-Id: I0bd609435969191c4ff91f2cd06eccfb75f5097c
Some checks for common errors with user-provided compiler and linker
flags:
* Using -I instead of include_dirs
* Using -l<lib> in ldflags instead of host_ldlibs (or shared_libs)
* Using -L in ldflags
* Splitting a multi-word flag into two flags
* Combining two flags into one list entry
* Using a path that could search outside the source or output trees
* Using a non-whitelisted library in host_ldlibs
Maybe some of the flag checks should happen during a static analysis
pass, but we don't have one right now, and this only adds ~1/2 second to
our 73 second Mega_device runs (recompile the changed code, run
soong_build, then report unknown target).
Change-Id: Icea7436260f1caa62c0cec29817a1cfea27b3e7c
Host builds don't have a separate place to install asan modules, so only
create a single variant for them.
Change-Id: I81f7090debd7935db778f8600d8cbc86dd53b1cb
Create both sanitized and unsanitized variants inside make builds with
sanitizers enabled. Only export the sanitized version to make, and
always install the sanitized version in /data to match the make build.
Change-Id: I5a17bcbddc7a9d871c929c84d3c116228ef3258f
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
Add the clang asan runtime libraries to the mips and mips64 toolchain
definitions. Fixes missing symbol build errors on asan_test.
Change-Id: I10c46599af2c7758f4726814920b8881644c6f97
This better matches the order from cc/cc.go, so that any implicit
ordering behaves the same in Make and Soong.
Change-Id: I802d725f037a22c4b2f0ae28258af95efa37ce79
-msoft-float is equivalent to -mfloat-abi=soft, which means we need to
make sure the order is correct if we also specify -mfloat-abi=softfp.
Since the Neon support (with -mfloat-abi=softfp) is in the cpu-specific
ToolchainCflags, move the generic definition into ToolchainCflags as
well.
This wasn't actually causing problems when compiling, since the normal
toolchain.Cflags is before toolchain.ToolchainCflags, but the makevars
code accidentally reversed this. That will be fixed as well, but this
will protect against similar problems in the future.
Change-Id: If6f37c845210105f84769bab45fde5d7fdc2fe09
This was in HOST_CROSS_GLOBAL_LD_DIRS, which is why it didn't get
translated over here, since Soong does not use global linking
directories. It's being moved to HOST_CROSS_GLOBAL_LDFLAGS so that it
can be shared.
Change-Id: Ie20670278a589ae3cf76e09de4079edfa800cf5b
The variable was defined, but it wasn't being exposed to the Toolchain
interface. It was also using -I instead of -isystem.
Change-Id: Iee9862a4b9c50c9497915175a23864b4b2c29c26
x86_64 and mips64 NDK prebuilt libraries are stored in .../usr/lib64,
but arm64 and all the 32-bit ABIs use .../usr/lib. Add a 64 suffix to
the path for all 64-bit ABIs except arm64.
Change-Id: I98e87ff6a7f1aa75adbeb37c5b1e7208b953322f
Static_executable was still using ModifyProperties, and was otherwise
missing things. Fix all of that up, and implement HostStaticBinaries,
which is the equivalent of BUILD_HOST_static in Make. That will default
host binaries to be static, which is useful for building SDK tools to
run with incompatible C libraries.
Change-Id: I2a62181b5d854b310edc8ae7a6bcbd30b89e7463
We don't ship binutils on Darwin, so there is no point in telling clang
to look in that path. (The path being used doesn't even exist). This
matches the Make behavior.
Change-Id: I663047057ff8df8a349483532da8018af13d50d8
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
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
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
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
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
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
Arch-specific static libraries should be prepended so that the common
static libraries can depend on them.
Bug: 26968262
Change-Id: I40a21d18ece8f6d20824437e7180628b29ffdd04
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
Make expects libraries built with address sanitizer to be installed into
/data, and can't handle multiple variants of modules.
Change-Id: Ice575ff6f0788a88f296e7b3ee521a2b9771f55f
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
Prevents make installing files with a double /:
Install: out/target/product/generic_arm64/system/lib//libc.so
Change-Id: Iee237f344e8140c4938aa9d1e6940e4fdbfa7cd8
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
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
Add a new feature to cc modules that adds the cflags and libraries
necessary to implement AddressSanitizer, ThreadSanitizer, and
UndefinedBehaviorSanitizer.
Change-Id: Ibe5ffadc7ece56080a2521f2c7c00da9ef712584
cc needs to know what stl was selected, promote stl from a generic
feature implementation to a fixed type pointer.
Change-Id: I950ef947f7cd254fe3074f4ff240bb2b90b9116c
Exported cflags are needed by a variety of cc module types. Refactor
them into an object that can be composed into any cc module type.
Change-Id: I7427ba71085917ca3ec522abadfa2bf33ab43440
Add two cc properties: `generated_sources` and `generated_headers`,
instead of just adding genrule modules to `deps`. Label these with the
dep tagging mechanism, add the generated_headers paths to the include
paths, and add dependencies to generated headers for each compile.
Add dependencies so that regular sources can include generated yacc
headers, not just other generated lex/yacc files. Static/shared specific
sources still don't have dependencies to or from regular sources though.
Switch from an implicit dependency on generated files to an orderonly
dependency, since the depfile will take care of the necessary implicit
dependencies for incremental builds.
Change-Id: I436675acb1f57329d98b81c56dcb4384201a68ea
Blueprint now requres DependencyTags to be passed to AddDependency
calls. Use the tags to avoid setting member variables on modules, which
will be lost after the mutators have been called.
Change-Id: I8c1d9ed1db85a300e14394b911a516d361ba9f75
The deps property is handled by blueprint, which doesn't give the
flexibilty of handling it within soong. Switch to using objs instead.
Change-Id: Ib8273546578b31b186a3cf1566e80a5eb11943b7
The make macros add these to the linker lines even if the default
compiler flags are being skipped.
This also allows us to add another runpath for test binaries, which are
currently being installed in:
<out>/host/linux-x86/nativetest[64]/<test>/<binary>
So they need to use ../../lib[64] as a rpath.
Change-Id: Ia7e954cdf63bc627a8f71d01c953530355c248ab
Instead of having the baseCompiler adjust the Ldflags, teach
objectLinker about ToolchainLdflags. And don't assume that
ToolchainLdflags will work for Clang too, add a ToolchainClangLdflags
call.
Change-Id: I5f546e46f32edf3fcf75a44bee2c5ee103bc5de3
Some of these are updates from the old build system, others are just
differences/bugs being corrected.
Change-Id: Ied7f47ade495dcb26ba3611e636869cba283860f
Limit arm cpu variants to armv7-a-neon only, and handle a generic
armv7-a-neon cpu variant. Add arm64 cortex-a53 cpu variant. Sanity check
the arch variant against supported versions.
Change-Id: I8ecdea4cd36d9c82e1f29b158efc131f8b1cbc4d
LOCAL_MODULE_STEM adds the expected extension to the installation path,
remove the extension from the filename.
Change-Id: I54dbcfa73d8d07fc3630caf2d582160003e28f79
Disable installing static libraries for now by resetting the installer
when creating a static library variant.
Change-Id: I9360b5c57d95fc0712539accb9450b5fa402fade
Extract Soong's install path and put it in the generated Android.mk file
so that tests get installed in the correct place.
Change-Id: Id4726855c5677855406de20773a5da533bdd4cea
Refactor all of cc in order to use composition instead of inheritance.
All cc module types exported by cc are now *cc.Module objects, with
compilation, linking, and installing steps delegated to different
objects in order to form the full module type. Additional features that
modify dependencies and flags can be inserted in a features object list,
and custom module types can be created by adding a Customizer object
that can modify properties.
Change-Id: Ie1283d14920f7856f6947b0530606b2f4d58fab0
These are the environment variables used by make to override the
llvm/clang prebuilts. As far as I know, these should only be used when
building or testing a new clang drop.
I would have this handled by make and put in soong.variables, but I
expect this to be one of the first options removed from make and
exported from Soong to Kati.
Change-Id: I7a3a70ee44fc4b1e56a5e200e2a7ced77d4c5692
Currently, whole_static_libs with missing dependencies are silently
ignored. Instead, when getting the object files from the other module,
add its missing dependencies to the current module.
Change-Id: I12472dede2dfafdded56268bfd37f60063b637c4
Build binaries usable on older machines even if older SDKs are not
installed. Older SDKs can no longer be installed on newer Xcode
versions.
Port of https://android-review.googlesource.com/207242
Change-Id: If66f2eef7593bce9fb858fc7b71369f55dd362e4
In make these clang-specific flags are marked as EXTRA and added after
the common flags.
This was causing differences between compiled objects in make and soong
because -fstack-protector-strong was before -fstack-protector in soong
instead of after.
Change-Id: I59dd6dcfdaf5ec9184a09e79efe80b62cfe48dbb
* changes:
Add system/media/audio/include to commonGlobalIncludes
Add -Werror=date-time to target builds
DeviceUsesClang should default to true
clang now supports -fdebug-prefix-map=.
Turn on ninja errors for duplicate rules
Update to use the latest clang-2629532
Sandy Bridge actually doesn't have all of these options. For example AVX is only
available on the higher-end SKUs (not on Celeron G550).
Soong port of https://android-review.googlesource.com/204730
Change-Id: Ib595a9a6b464626d0c88525c6aaa4d69176645cc
Now, instead of combining multiple binaries into a single BUILD_PREBUILT
definition, use separate instances for every module variant. This fixes
HOST vs HOST_CROSS prebuilts, and should be saner overall. From make,
these should look the same, we're only just using one instance of
prebuilt_internal per BUILD_PREBUILT call instead of multiple.
With that simplification, we don't have to store as much state, and can
directly write into the buffer.
Also switch from io.WriteString to fmt.Fprintln, which will require
fewer explicit string concatentations, and we don't need to worry about
newlines.
Allow the module-provided functions to return errors.
Change-Id: If30453b21fa21387f635626618d8fabfc78e6859
We should be using libprofile_rt for clang builds, but we only need to
add either one if code coverage is enabled. This will be added again
when we get more complete support.
Bug: 26525326
Change-Id: Ic3da07c896be266bb35747a79c184e3d5bb8df70
Move the clang extra flags into the *ClangGlobal*flags variables,
instead of adding them to every clang-based module. This means that
they're only applied when !no_default_compiler_flags, like make.
Change-Id: I43b1378d1d932d9aecfd8724a492d0d7716f7631
That way we get the other special cc_test features (test_per_src,
multilib-both default, nativetest install path).
Restrict test_per_src to CCTest instead of allowing all CCBinaries to
use it.
Change-Id: I767540841fe5d1f9755883ee7c3d1f24004f9631
This roughly matches what make uses, but with less string parsing.
Also use a full path to "ar", so that we can depend on it.
Change-Id: I5e9d4c06b6cbbbfbf93e563dace128943db21b02
Explicitly allow installation into the data partition instead of using
"../data" for tests. At the same time, pipe through the information
required for vendor modules.
Change-Id: I6baf9d828c285e1080e43074beef8aebdbb38875
Only add them to the global C include paths if they exist. And make sure
to set up proper dependencies so that we notice when they are added or
removed.
Change-Id: Ia9df14f6ae6869927ad3d3a15fb5a8081f616a81
Unbundled builds may use a subset of the tree, which can bring in unused
modules but not their dependencies. Delay handling of dependency errors
for unbundled builds to ninja time, which will prevent errors if only
modules with satisified dependencies are built.
Change-Id: Ib93bae93fcfa0b55df500a30d8e35231ffb0987c
This centralizes verification and common operations, like converting the
path to a source file to the path for a built object.
It also embeds the configuration knowledge into the path, so that we can
remove "${SrcDir}/path" from the ninja file. When SrcDir is '.', that
leads to paths like './path' instead of just 'path' like make is doing,
causing differences in compiled binaries.
Change-Id: Ib4e8910a6e867ce1b7b420d927c04f1142a7589e
In order to validate that the NDK STL paths exists, we need to know
the full path, including the Gcc version during the go execution. So
instead of returning a ninja variable reference, just return the
contents of the variable.
This also fixes a few invalid uses of armGccVersion to the proper
variable.
Change-Id: I54398ba4aa4000235b7d537a2c4efe3ecbbeec8b
Darwin's ld does not support --version-script, but it does support
-unexported_symbols_list, -force_symbols_not_weak_list, and
-force_symbols_weak_list that all take files as arguments.
Instead of expecting these to be added to the ldflags manually, add
properties for them so that the dependencies are handled appropriately.
Also sanity checks the darwin vs non-darwin usages early, so that the
error message is faster and more obvious.
Change-Id: I42526cc4367b6ea9adfdbb58753e12824e8c321c
This defines another mutator between HostOrDevice and Arch that will
expand host modules into a module for each host type
(Darwin/Linux/Windows) that is currently being built.
Change-Id: I4c8ac6b616c229f6bd45ad8a35902652fb6a4fff
x86 crt partial ld steps need to pass -m32 through ldflags. Use gcc to
run partial ld instead of going directly to ld. Allows reusing
ToolchainLdflags, which have linker arguments prefixed with "-Wl,".
Change-Id: I1e01ca5831061a11c9f550ab198d8e5b8dccf8bd
Some cflags are part of the toolchain selection and should not be
removed by no_default_compiler_flags = true, for example -m32 for x86
compiles. Removing all the cflags results in hacks such as in crt.mk
where the bare minimum cflags are reinserted.
Add new toolchain interface functions ToolchainCflags, ToolchainLdflags
and ToolchainClangCflags that will always be used.
Change-Id: I0ba02d7611e2afb9ad913319740e00c1bb2d654c
Allow architecture toolchains to register "features" supported by the
current variant, and then apply properties from the selected features.
Equivalent to the ARCH_*_HAS_* variables in the combo makefiles.
Change-Id: Ib6823be1c1a52da677d081db9f24336a072eaf39
Post-process the arch and cpu variants to treat the arch name or
"generic" as an empty variant. Filter out extra empty abis. Ignore
empty arches. Print a useful error message when appending properties
fails to find the target field, when an unknown architecture is used, or
when a toolchain has not been implemented for the selected
architecture.
Change-Id: I671d4cd04975f4f29aefc4267b3a624868ce6a75
Depends on https://github.com/google/blueprint/pull/78
This uses the new CommandDeps field to move implicit dependencies
embedded in the Command string next to the definition, instead of having
to specify them in every BuildParam struct. This should make it easier
to verify dependencies.
Change-Id: I2711b160920e22fa962a436e1f7041272166f50f
We cannot use the PWD trick for any compile on Darwin, since /proc
doesn't exist. So instead of checking for darwin host modules, just
check runtime.GOOS.
And since this isn't a per-module decision, don't pass it along as a
variable to every build command, but make it a global variable.
Change-Id: Iea8609f49a9d316c58aed527f62d1986c970eaac
whole_static_libs is used to reexport all the symbols from a static
library when encapsulating it into another static library or shared
library, so reexport the headers as well.
Removes the need for libcxx to explicitly export the headers from
libcxxabi.
Change-Id: I283e043f2d2e819e2fdfa43b3f0f7a4537ba79ff
Add a cc_defaults module, which will prepend any matching properties to
modules that reference it with a "defaults" property.
Change-Id: I5908dd98d204f71b29ad95a4ab85403aa1621ca2
EarlyMutators are identical to BottomUpMutators, except they run before
DynamicDependencies. DynamicDependencies can be replaced with a
BottomUpMutator. Replace both EarlyMutators and DynamicDependencies
with BottomUpMutators, which allows setting the order between all
mutators through registration order.
Change-Id: Id1305d798d3d2da592061c89d7c10a71780b71a3
Blueprint has a generic AppendProperties/AppendMatchingProperties now,
use it, and replace all bool properties that might be modified by a
mutator with *bool, which provides the correct replace-if-set semantics
for append.
Also remove uses of ContainsProperty except when explicitly checking if
a property was set in a blueprints file.
Change-Id: If523af61d6b4630e79504d7fc2840f36e98571cc
-funswitch-loops is in the arm instruction set flags, but unsupported by
clang. Make removes clang unknown cflags from the instruction set flags.
This was producing a warning, causing -Werror to fail on libm.
Change-Id: Ibc69c9af04a738aa8adeb5549900e2b53ab754f0
Contains equivalent changes for:
561b4c1 Set mcpu targets based on cpu variant.
6a66a88 Stop encoding absolute paths in symbols
63e3b02 Enable color output from gcc and clang
eb3e3fa Use exported includes for libc++.
3a0a891 Link libgtest_main before libgtest
Change-Id: I45a06c02e9af1d40f0c52f1e6a20d6cd382a27fb
The existing behavior of using the build directory as the working
directory is useful if you want to move/copy the output directory around
and SRCDIR still refers the the source. But, it's more useful to have
the source directory be the working directory. Tools like cpp(__FILE__)
and other debug prints embed relative paths from the working directory.
We also have tools that expect the working directory to be $TOP.
Change-Id: Ia0f1d3c6b7df72d61cf5628efa2baa98bd19775b
The usecase here is system/core/liblog, which wants to turn off
sanitizer only for the target module, since the target sanitizers depend
on liblog.
Change-Id: I99141574a1c4c4847aa8a72bdcc88901fd9b01cd
The source path was being appended to the module out directory
to create the file list file, which was resulting in .. in the
source path moving the file list file up the directory tree.
Use SrcDirRelPath to convert the globbed resource directories
to be relatiave to $srcDir before appending them.
Also do the same fix to generated aidl, logtags, yacc, and lex
files.
Change-Id: I2e636bd30abf03bc1d80a897951a9812cc3e09ef
-mthumb-interwork was missing from the beginning.
The Clang cflags copy was only a shallow copy, so our clang-specific
fixups were affecting the GCC cflags as well.
The cortex-a15 replacement was removed from build/core with this change:
https://android-review.googlesource.com/#/c/143851
Change-Id: Ib6300e064f6ec4f6a7174d5e2aeacad1c359f7ea
Instead of putting all the blueprint registrations in soong_build,
put them all in init() functions. This puts the registration next
to the implementation.
Change-Id: Ide1a749518f5e9d1367a18ab3bb1d91da3310c76
To align with the current make build system, add exclude_srcs and
exclude_java_resource_dirs. These replace the functionality of
arch_subtract and glob exclusions that use "-file" to exclude a file.
Change-Id: I91c23d5e3c9409f2d9f7921f950153a03a68ad61
Improve the comments associated with properties to work better with
Blueprint's auto-documenting feature.
Make all properties structs into named types so that thet types can be
found using reflection and cross-referenced to the source code to
auto-extract docs.
Remove the leading <property>: text from properties, the documentation
will include the lowercased name of the property.
Add filter tags to the nested arch properties.
Change-Id: I4ef5db86358886fe61456c24eb2dbe6f7b876115
Make common.Glob take an interface that is the intersection of
blueprint.ModuleContext and blueprint.SingletonContext used by
Glob and GlobRule, allowing it to be called on either. Also
move ExpandSources and Glob into AndroidModuleContext.
Change-Id: I8d1a3160c5dd201033afdb37210e82d8065b137d
ccCmd was being added as a dependency each time through the object
file loop, tripling the size of the build.ninja file. Create a
new slice for dependencies on each object file.
Change-Id: Id768d8ea6e5300c15f0f1a5fac5fcbdfdf5e6b0a
Require directories listed in the include_dirs, local_include_dirs, and
exported_include_dirs properties to exist.
Change-Id: I5b079bd2c607839bb28dae43801cd7345bde2299
Take HostOrDevice out of Arch, and put it into AndroidModuleBase
instead. Also separate out the host vs. device mutator from
ArchMutator. This will make it possible for genrules to depend
on a host tool, regardless of which host arches it is compiled
for.
Change-Id: I22bbfd28b65c3eebdfa101a712f90dd615148dc8
Various build rule changes to match AOSP:
Add libunwind_llvm and libdl as dependencies for libc++ on device
Always add libcompiler_rt-extras as a dependency
Add libm, libc, and libdl as depnendencies for libc++ static binaries
Disable some clang warnings, and add some clang filtered cflags
Add -fstack-protector to host linux builds
Add jack_flags property to java modules (currently ignored)
Change-Id: Ic0da617bdeaf25f58cb8298dd9ea91b7d6509151
Make static or shared cflags properties apply to all source files,
not just the source files defined in the static or shared block.
Needed for libunwind, which passes -DUNW_ADDITIONAL_PREFIX to source
files for the static library, but not for the shared library.
Change-Id: I3cd88cc1099e505eeee077c697db00de22a8b03a
Add genrule, which uses a host executable (possibly built by the
build system) to generate a single source file. This differs slightly
from gensrcs, which takes a list of sources and translates them through
a host executable to individual source files.
Change-Id: I94bda62c4c53fb3f3817def190e6a7561508d297
Add libgtest to native test dependencies before adding stl
dependencies to resolve link errors between libgtest and
libc++_static.
Install device native tests to /dava/nativetest32 and
/data/nativetest64.
Change-Id: I6d9ddba8d5cdbacaa86cae0833fd7e656657e4d9
Allow combined static/shared libraries to specify separate dependencies,
and recompile objects if static or shared cflags are set.
Change-Id: I9fd71d8debd5ade5637389ee38e793082d6d18bb
Host gcc libraries should only apply to static binaries, not all
static libraries. Add c.staticBinary(), and rework everything
else to use c.static(), removing c.shared().
Change-Id: I8addae9b6848010cef94d873f48e7e358e4f5059
Pass --fix-cortex-a8 only on Cortex A8 and generic ARM builds, and
pass --no-fix-cortex-a8 on everything else.
Change-Id: I4b12afee4de443b5d55df66be3c6a05251715e31
Targeting the platform-provided libc++ on the host requires passing
-nodefautlibs to gcc, and then re-adding all the default libs except
libc++.
Change-Id: I5a42375bcc819b07f6ee02e9d76e7f5088fa00e0
Instead of the complicated Flags and DepNames system used now
for overriding CC modules, export all the main structs and the
properties structs so that module types that override them can
modify properties before build rule generation starts.
Change-Id: I6d71550def1ef07798b27d5fec40739ef3ac8165
Reduce the number of flags variables when compiling C by getting
rid of the separately-tracked IncludeDirs variables, and putting
them directly in GlobalFlags. Also changes exportedIncludeDirs
to exportedFlags, which will allow exporting flags besides -I.
Also fixes a bug when building a module with the NDK and -Werror
by passing NDK exported include directories with -isystem instead
of -I, which will ignore warnings from those includes.
Also fixes a bug where the default includes were being inserted
into all cflags by the arm and arm64 toolchain modules.
Change-Id: Ice97f84e637b21d20c38c85b881afa315f9f92ae
Modules built against the NDK shouldn't get the global or arch-specific
include paths, all headers will be provided by depenendencies or the
NDK.
Change-Id: I13b9530a365e11e9cf6bd2b99b756b36944e0a9e
Support specifying an install path relative to the default install
path for cc libraries and binaries.
Change-Id: I47a97de9beaedde27d99c498c3f26c9d36358d94
Add support for aidl files listed in srcs for java builds, and
an aidl_preprocess module type for framework and sdk aidls.
Change-Id: I3aa537f4483822e5b534c74d0b35f13a938f8947
Support -file or -path/glob in file lists that contain globs to
subtract files from the resulting glob. Also move source file
prefixing and handling into a common function.
Change-Id: Ib6d74ce22f53cae7348c4ba35b779976d90359a6
Using ctx.Config().(Config) everywhere is a mouthful, and it is
inefficient to do the type assertion. Put the Config interface into
the context, and provide an AConfig() to return the Config already
converted to the right type.
Change-Id: I301a1fd7d2a005580aabca7866a37c5d42ad8c69
Add support for yacc (.y or .yy) and lex (.l or .ll) files. Also
tweak locations of .o files for normal and generated sources to
makes sure they don't collide.
Change-Id: I03172cddbdc022525bf392a81d72050406b8cdb3
ld and ar command lines often end up larger than ARG_MAX, use Ninja's
rsp file support to automatically write the object files to a temporary
file and pass it in using @file support.
This isn't going to work on Darwin host builds, where the host
toolchains don't support @.
Change-Id: Ida2f4e114ab02df6967e863577fa324e197827d5
Move ndk linking against libc and libm out of system shared libraries
so that static libraries that link against the ndk can depend on
libc and libm, which is required to get the ndk sysroot include path.
Also make ndk stl versions only apply to the device variant of
multi-target builds.
Change-Id: I6926541da17b9baf3aa7f811a839c3b65c5d804d
Instead of setting a string property to magic default value and then
checking for it later, call ctx.ContainsProperty to determine if it
was set. Use the same method on the clang bool property, which
couldn't be set to a magic value.
blueprint's ModuleContext.ContainsProperty only works on a single
property, not on all arch variant properties -
ModuleContext.ContainsProperty("clang") will return false if
clang was not set but arch.arm.clang was set - so track which
properties were extended inside extendProperties, and override
ModuleContext.ContainsProperty in AndroidModuleContext to also
check the extended properties.
Change-Id: I03cbe71dc69344972e23d6c794da9be05e720c45
The suffix property will modify the name of the resulting binary
by adding its value to the module name.
Change-Id: I188e97d4c88f26c060ba2ffbd37f832d701fe0cb
The linker needs to add __dl_ to the beginning of all of its symbols
to avoid conflicts. Add support for a prefix_symbols property, and
insert an objcopy --prefix_symbols build step to produce the final
binary.
Change-Id: I70de7c830cd64305e5900c6de53efecea2e17c75
ccLibrary uses ccDynamic for linking shared libraries, but bypasses
it by calling directly into ccBase for static libraries. Instead of
duplicating the same mess for ccBinary, rename ccDynamic to ccLinked
and add the logic for dealing with static or shared linkage. This
also allows moving the stl logic out of ccBase and into ccLinked.
Change-Id: Idfa6d86de16911c8851f694d6ed92681c8939281
CC module dependencies need to be handled in both AndroidDynamicDependencies
and GenerateAndroidBuildActions. Replace handling them in both with
splitting out individual functions to list each type of dependency,
and then call them from both AndroidDynamicDependencies and collectDeps
in GenerateAndroidBuildActions.
Change-Id: If8104f6ec4846a389a41ab599b1167bcf47b45b7
Add Host(), Device(), and Debug() to AndroidModuleContext to allow
build rule generators to easily determine build options.
Change-Id: Ib93a462cb45189399063f641b3a8df175db0592e
Art needs a custom module type in order to perform complicated
build logic like depending on environment variables and varying
cflags based on cpu variant. Export enough of the types and
functions from cc for art_cc_library to inherit from cc_library.
While I'm touching every line, also rename the New* methods
to *Factory.
Change-Id: I7123aa47019c4ced7a1ab57c394225bc7844b5ea
Add art and libnativehelper to the root Blueprints file, and
add a warning used by art to the clang unknown flags list.
Change-Id: If282413103fa20fa66422e4330fbabff61b66144
Some cc_test modules want a test per source file, for example when
there is global state that needs to be reset between each test
suite, but no way to reset it. Allow them to specify test_per_src: true,
which will cause a separate test to be built for each source file.
Change-Id: I3dbf1202fb070437cb0109f195dc11a6440061ee
Exported include dirs were only being copied to the build flags
in ccDynamic. Move the copy to after collectDeps is run so it
picks up the extra includes from all the overriden functions.
Also check exported include dirs of shared library dependencies
of static libraries.
Change-Id: Idb94277f88bbb10869e72011113df57f586274de
Add sdk_version property that will be used later for NDK builds.
For now, use it to determine if libnativehelper/include/nativehelper
should be added to the global include dirs.
Change-Id: I4e0f9b3f27c380b1ac28f163b1d2b43a46d7191c
Add debug: { cflags: [...] } and release: { cflags: [...] }.
For now it always takes the release cflags, later a per-module
debug selector will allow using the debug cflags.
Change-Id: I40bc68267287db901e47e74983d0d61fda2b9367
This behaves slightly differently than it does in the make based build.
1. The make based build manually passes -DGTEST_OS_ANDROID (or
whatever). gtest-port.h already has logic that does this, so it's a
no-op.
2. Host libraries are named identically, rather than libgtest_host.
Change-Id: Ic40a1025c698611d202cb7c8ec45abd8fe130065
Refactor common code out of NewCC* to initialize the ccBase,
ccDynamic, and ccLibrary structures. Also adds an enum for the
default multilib values.
Change-Id: Iaeffe86bf2568b6054be4ddcee725818af45e14f
Initial build logic for building android with soong. It can build
a variety of C and C++ files for arm/arm64 and host.
Change-Id: I10eb37c2c2a50be6af1bb5fd568c0962b9476bf0