The change to enable embedding in make change the default behavior to
produce an Android.mk file, change the ninja builddir, and add the
-soong suffix to the end of target names. These don't make sense if
we're not building inside make, so detect if we're running under make
by checking for a .soong.in_make file in the builddir.
Change-Id: I1a0f4c1becb327c769b8a130cafef11d83eb49f4
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
If there are multiple blueprint files in one directory, say an
Android.bp, and a build=['other.bp'] entry that pulls in another
blueprint file from the same directory, we'd look for a matching
Android.mk twice. This would cause duplicate glob rules.
Instead, keep track of blueprint directories rather than files.
Change-Id: I4f224e51337ffd5e5e48257ac3458c2d8b2061fa
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 changes the build system to no longer run zipalign when signapk
is also run. Running zipalign is no longer needed because signapk
takes care of alignment.
Bug: 25794543
Change-Id: I7bb43421c993bf32f09b0acce2a652376378964f
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
Use blueprint's new anonymous embedded struct feature to move the arch
variant properties down a level, replacing arch.cortex_a9.srcs with
arch.arm.cortex_a9.srcs, while still supporting top-level properties
like arch.arm.srcs.
Change-Id: I14820b75b31586ef1e16a4812dcb1f5fdf1ff941
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
androidbp is gone, replaced with combining kati ninja output for
makefiles with blueprint ninja output for soong.
Change-Id: I00b9e28877abf2ceb2223d3ccf0637bc1b7571bb
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
Renames cortex_a53 to cortex_a53_64, since we need to set options for
both. Also adds the cortex_a53_a57 big/little configuration.
Change-Id: Ia0e8104867f9aed7cbf5be8be1ead6ddc30c42c4