The suffix property will modify the name of the resulting binary
by adding its value to the module name.
Change-Id: I188e97d4c88f26c060ba2ffbd37f832d701fe0cb
The linker and a few other executables and libraries need to know
if they are a 32-bit process running on a 64-bit host. Add
android64 and android32 target types to set custom cflags.
Change-Id: I142378e2d5be17a87ff761257dacc1734b093048
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
Ninja can't depend on environment variables, so modifying build
behavior based on environment variables requires coordinating
between the soong script that invokes ninja and the soong_build
manifest generator.
Allow any module to call Config.Getenv to get the contents of an
environment variable while registering a dependency on it.
After all modules have been processed write out the state of
all used environment variables to a JSON file called
.soong.environment. During the next build the soong script
will use the soong_env tool to compare the contents of
.soong.environment to the current environment, and force a
build manifest regeneration by deleting the .soong.environment
file if any variables have changed.
Change-Id: Id0d81933a857bc2fc1cd7a393a3c6cec73dc4824
bootstrap.bash creates a soong script in the output directory using
build/soong/soong.in. This requires a manual rebootstrap any time
soong.in changes. Instead, have bootstrap.bash symlink
build/soong/soong.bash to soong in the output directory, and create
a file called .soong.bootstrap in the output directory that contains
the variables that bootstrap.bash sets.
Change-Id: I5e6e54c2e8bdde876941e2e082f9ba177c757cbf
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
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
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
This creates the infrastructure that will be used to bootstrap the
soong primary builder through blueprint and ninja.
Change-Id: Iebed8f369e4db41b207d0b2a48a7a54a4dd7d45d