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
Make was depending on the installed path for ckati/makeparallel, since I
didn't want to hardcode intermediate paths.
For modules in USE_SOONG, we export the intermediate paths, so we don't
need to install.
Change-Id: I90bf3ad1461e239a8a40fd0c8ddbc679cf00d126
* changes:
Add Mega_device configuration option
Toolchain modules use GCC
Apply ToolchainLdflags to clang builds
Add Clang Asflags for mips
Remove libgcov for now to fix X86 devices
Change clang extra flags behavior
This lets you configure soong to build for every supported architecture
in one build. Installation is disabled, since it's not actually setting
up multiple devices, and would try to install multiple versions to a
single path.
Configurations that do not build are commented out.
Change-Id: I92ddea0b9ddbd53e12187c7f581b8ac5bd5fdec3
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
Some bionic subdirectories need to be built with soong, and others with
makefiles. Search the bionic subdirectories invidivdually so the
bionic/Android.bp file doesn't prevent bionic/Android.mk from being parsed.
Change-Id: I66846f0175a5a01266adc0b792820bb82ffd1e14
Export all modules to out/soong/Android.mk, even if they have a
corresponding Android.mk file next to the Android.bp file.
Change-Id: I14b67b1108f0c0ed8f9d9202c4af3a37f5cbf7d1
art and libnativehelper have collisions between the top level directory
name and a module name, remove them from the root Android.bp file until
they have an Android.bp file to avoid a glob dependency on the directory.
Bug: 25797955
Change-Id: Ibd33df17450b171ec2390653e4cf3b00fc242831
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
Detect when a specific path component tries to escape the path that came
before it -- so that a user-provided value can't use '..' to escape the
directories laid out by the build system.
Change-Id: I02d52d9baadb7152448a34f4e8b573fe3c032b12
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
Sort the modules before writing them to the Android.mk file to prevent
it changing every time soong rebuilts itself. Avoids unnecessary
makefile reparses by kati when it sees Android.mk change.
Change-Id: Ie2cebb25a82d131ee5b556f8e4b3b317d080692c
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
When building inside make, Soong is not responsible for installing any
modules, so make everything optional.
Change-Id: I1190c78663c9d5ff6f511ca43b317031c619afe7
cortex-a53.a57 is a valid cpu variant, and needs to be translated to
cortex_a53_a57 when used as a field name. Replace
dashToUnderscoreReplacer with a replacer that also converts "." to "_".
Change-Id: I1c496249b50d8e3a8d2bd830bc890f43ad9ee29e
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