Commit graph

4528 commits

Author SHA1 Message Date
Tim Kilbourn
3f0c9ede6d Add support for LOCAL_ARM_MODE in androidmk
Uses a hack to nest it inside of an arch-arm block.

Change-Id: Id36c7398e4a91fc8dd69fa7d1f78c9d30258281a
2015-03-19 17:26:22 -07:00
Colin Cross
6b29069d42 Allow cc_test to build a test per source file
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
2015-03-19 14:05:33 -07:00
Colin Cross
ed9f868f49 Fix exported include dirs
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
2015-03-19 10:51:41 -07:00
Colin Cross
efd8e48c4d Add sdk_version property
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
2015-03-19 10:51:41 -07:00
Colin Cross
5049f02e60 Add gensrcs module type
gensrcs allows sources to be generated by a specified command.

Change-Id: I725086fcdcd72bfe6c07fb8903e7b520678a247f
2015-03-19 10:51:41 -07:00
Colin Cross
70a255f3c9 Remove LOCAL_CPP_EXTENSION during Android.mk translation
LOCAL_CPP_EXTENSION is unnecesary in soong, it can accept files
with .cc or .cpp extension.

Change-Id: I64cb37f199e25f1fed7e53144f85e52ba616529a
2015-03-19 10:51:40 -07:00
Colin Cross
af19a29bb7 Add debug and release cflags
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
2015-03-19 10:51:40 -07:00
Tim Kilbourn
5ccc730672 Fix path to gtest headers.
Change-Id: Ieb64c4439125e95aecc4200ac6f9ea3375b347e7
2015-03-19 10:15:22 -07:00
Dan Albert
c403f7ce6d Add support for cc_test.
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
2015-03-18 23:39:02 -07:00
Dan Albert
512e24f441 Merge "Fix LOCAL_CXX_STL translation (now maps to stl)." into master-soong 2015-03-19 06:23:33 +00:00
Tim Kilbourn
1a9bf268ad Add an instruction_set property to Arch
Used to allow switching between thumb and arm ISAs

Change-Id: I94aa83cee7179e83c97eedc32fd216965b626d33
2015-03-18 17:19:35 -07:00
Dan Albert
483665904f Fix LOCAL_CXX_STL translation (now maps to stl).
Change-Id: Ib365255bfa1cdd80ac87b8ed452e70410ea0eb3c
2015-03-18 15:35:18 -07:00
Colin Cross
c472d57f57 Refactor cc compiling to shared ccBase and ccDynamic initialization
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
2015-03-17 15:11:14 -07:00
Colin Cross
e2e6fc2b37 Enable checkbuild by default
Temporarily enable checkbuild by default while we are adding lots
of modules to the build.

Change-Id: I26671d90b13fc2dcbb7a458a86e9be9cd070a918
2015-03-17 13:26:49 -07:00
Colin Cross
9454bfafcb Add support for checkbuild target
Modules can choose to add "installed files", which are files that
a product can depend on to cause the module to build, and "checkbuild
files", which will only be built if another module that needs to build
depends on them.  For every target, add a module-install and a
module-checkbuild target that create dependencies on those files,
and then add a global checkbuild target that depends on all the
module-checkbuild targets.  Also add a module target for each module
that depends on module-install and module-checkbuild.

Change-Id: I801389ad6ab9806b71d92cd327a0f9cb7582e0df
2015-03-17 13:24:18 -07:00
Colin Cross
3075ad07e4 Add dependencies on late static libraries
Late static libraries were added to the build command line, but not
the implicit dependencies.

Change-Id: I20ed8be6ae1ec7c1b78f16a6d1da7d1535ff5cba
2015-03-17 10:47:08 -07:00
Colin Cross
a360e8b0fa Update clang flags for latest AOSP master
Change-Id: I492b5a4b87689f4eb95466fc92241a0f88415012
2015-03-16 16:22:52 -07:00
Colin Cross
6072ad4e9b Fix soname
-Wl,soname= was missing the .so extension

Change-Id: Ide5f2b22f5c37a20463a2314047560e501b95987
2015-03-16 16:22:52 -07:00
Colin Cross
bdd7b1c818 Add more missing clang flags
Add clangExtraCflags, clangExtraConlyflags, and clangExtraTargetCflags

Change-Id: I99a12ba3af43c2fcf97a1d96a0a32efd8d4bfde5
2015-03-16 16:22:52 -07:00
Colin Cross
77b00fa6f1 Add late static libraries for libgcc
libgcc has to be last on the command line, after -lc for libc.

Change-Id: I5c867cef59ca84e23ff5cea406da3ec3f261aa76
2015-03-16 16:22:52 -07:00
Colin Cross
13af54da2d Fix arm compile flags to match makefile build
Fix a few flags that don't match the makefile build flags in
build/core/combo/TARGET_linux-arm.mk

Change-Id: Ib951da32d7828aff17a32f10ba18ed678b3571de
2015-03-16 16:22:52 -07:00
Tim Kilbourn
f294814398 Add common cpp flags
Change-Id: Iba486b121e9a1b0c1761cf6402c61a0228105a5b
2015-03-16 15:50:11 -07:00
Colin Cross
8003131d5a Add androidmk to Blueprints
Change-Id: I2c8f17bda7ff0b5fc95a80e5bf72776f6e23be05
2015-03-14 14:28:49 -07:00
Colin Cross
ba44287610 Reformat soong Blueprints back to old style
Change-Id: Ic53ff0123bab9f8876f3c53f6c1ea8f07d225604
2015-03-14 14:28:49 -07:00
Colin Cross
3f40fa460d Add soong_build primary builder
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
2015-03-13 20:28:16 -07:00
Colin Cross
e441b9df9a Initial soong
This creates the infrastructure that will be used to bootstrap the
soong primary builder through blueprint and ninja.

Change-Id: Iebed8f369e4db41b207d0b2a48a7a54a4dd7d45d
2015-03-04 16:13:27 -08:00
Bill Yi
8a051b802f Initial empty repository 2015-01-30 19:37:31 +00:00
Bill Yi
9284ddcbc9 Initial empty repository 2015-01-30 11:36:39 -08:00