LLVM has complicated static library layering that sometimes changes.
The make solution was to list all the static libraries twice, but
Soong dedups the list. Add a group_static_libs flag to allow
surrounding the static libs with -Wl,--start-group and
-Wl,--end-group.
Test: mmma -j external/llvm
Change-Id: Ic08a183d7def9c9249d4a3014760759f16b68d04
libchrome uses Objective C++ (.mm) files, treat them like .cc files
and pass them to g++/clang++.
Test: mmma -j external/libchrome
Change-Id: Ib9e5e82d8a9eff5f80a9fe06498a988d70ca4553
In lieu of having an environment variable to override prebuilts
preferences (for now), fall back to prebuilts whenever the source
module is disabled. Complicated source modules (like LLVM) that
already have Go logic can then use an environment variariable to
disable their source module whenever they want to use prebuilts.
Computes UsePrebuilt once using information from both the source
and prebuilt modules, and stores the result in the prebuilt module.
Test: m -j libLLVM
Test: m -j libLLVM FORCE_BUILD_LLVM_COMPONENTS=true
Change-Id: Ib0819a03e9492e55f55de3402e05b3a043644a39
Prebuilts must have every variant that their source module has, so
split all cc_prebuilt_shared_library modules into both static and
shared variants.
Test: m -j checkbuild
Change-Id: I3c32315227f779e832e041cfab604ff7402c7e13
If the source module is being used instead of the prebuilt module,
disable installing the prebuilt module.
Test: m -j checkbuild
Change-Id: I55e77021b0f9572b0737d960cba89274f696775d
Move the calls to the AndroidMkProvider to after checking if the
module is disabled. Disabled modules may not have all the state
necessary to generate the data.
Test: m -j libLLVM
Change-Id: Iab27a26e604f3810bcc2d9f61b1839aa7bc428b4
Export a list of libraries in the VNDK, which is currently empty.
Take in Make's global BOARD_VNDK_VERSION, and use that as the SDK
version for modules that specify use_vndk: true.
Modules that use the vndk have some configuration as if they were
building against the NDK (the absence of globally defined headers), but
in other cases look like platform modules (using the platform libc++,
for now).
This change does not attempt to enforce any linking constraints, that
will come in a later patch.
Test: out/soong/build.ninja doesn't change
Change-Id: I3be206b67015ac5177b7eef4a451c579e3dc903f
Global cppflags should come first so they can be overriden by module
cppflags.
Test: m -j checkbuild
Change-Id: I3454370a6b35f37982b1e0de2e0ec52b54974a8a
If a genrule sets deps_file: true, use a file in the gen directory
as a GCC-style deps file.
Test: m -j libLLVMObject
Change-Id: Id410165847e4eaea1853a392512e38787c431523
Instead of exporting the generated sources dir as headers, let
the Android.bp file specify subdirectories as exported.
Test: m -j checkbuild
Change-Id: I18dd900d63ce7485c8fbfcc39dc77abad6f733d7
An escaped $ sign in an expanded string needs to be re-escaped so it
can pass through to ninja.
Test: m -j libLLVMObject
Change-Id: I2f7890417fd6f534e6e21cace3d86ae9ef708ce5
Add AppKit, Foundation and Security to darwin for libchrome.
Add -lm and -lversion to windows for llvm.
Test: m -j libLLVMObject
Change-Id: Ie5c922d3fbb41fba1de5f1ce9e530683bf411c5a
Bug: http://b/31532493
As I have been updating to LLVM ~4.0, there are numerous locations where
3.8 is hard-coded, and unable to be overridden. This change adds a new
function for getting the ClangShortVersion(), which can look at
environment variables that override this value (particularly useful for
two-stage compilation, where version numbers change between builds).
Change-Id: Iaec19908cf47b3b2317844d6e1329f7bcd81f022
Move some cc ctx.Host() / ctx.Device() checks over to using
ctx.toolchain().Bionic(). There will be more changes, these are just the
obvious ones dealing with host_ldlibs / crt / system libraries.
Bug: 31559095
Test: out/soong/build.ninja is identical
Change-Id: Ibba60483b4ab0e01f6996eb7d883120e4acc1830
Currently our only default-disabled Os is Windows since it's HostCross,
but we'll be adding non-default Host and Device types in the future.
Bug: 31559095
Test: out/soong/build.ninja is identical
Change-Id: I2bc3a3cc76f2c95ea040bc34ba6706fcc178c68d
We need to fall back to the old CRT objects since we aren't generating
those yet.
Test: Created a test module using "current", checked that it linked
the libs from current.
Bug: None
Change-Id: I5fe170d7b26154da8877672ac2acb7da0262fe38
Test: Added a test module that uses this
find $SOONG_OUT -name libfoo.so # only shows up in current
Bug: None
Change-Id: Ic88d7c598cd5b6ded8fb851a7eaf859806336af7
Support for using this coming in an upcoming patch.
Test: nose2
readelf to check the following:
* bsd_signal unversioned before current
* bsd_signal versioned in current
* catclose missing before current
* catclose present and versioned in current
Bug: None
Change-Id: I861862161426d3ec5b530e3156d3a8ae96fed468
N has merged into aosp now.
Test: OUT_DIR=ndk-out DIST_DIR=ndk-dist \
build/soong/scripts/build-ndk-prebuilts.sh
Bug: None
Change-Id: I2685c700e2cb138708a3e8a5f51281c30fb582db
Extract PREBUILT_SDK_VERSION from the make build system and pass
it to soong when doing ndk builds.
Test: untested
Change-Id: I573900dfb83aa8665c2bc349b7823e64497754d3
To allow genrules with more than one tool, rename the tool property to
tools and make it an array, replace $tool with $(location <label>),
and use $() for other variables for consistency.
Also remove the host bin directory from the genrule path, and the
$srcDir variable, using either of them would have caused dependency
issues.
Bug: 31948427
Test: compare build.ninja
Change-Id: Icf6d3bce2bea00fec1363fd65c0bdf96d09281bf
(cherry picked from commit de6bd86d24)
We tried to support this by version name convention (foo_PLATFORM and
foo_PRIVATE), but not everything follows those conventions. libm has
a LIBC_DEPRECATED, which is a bit to generic to apply this convention
to.
Support a "platform-only" tag which omits the tagged version in the
NDK.
Test: nose2
Bug: None
Change-Id: Iba34628ea02a813d22c8b32d10e54064f17ac6df
Move Soong's globbing-with-dependencies support into Blueprint so it can
be used for subdirs= lines in Android.bp files.
Blueprint has a slight change in behavior around subname= lines, it now
always uses the subname and doesn't fall back to Blueprints. To support
the Blueprints files in build/blueprint, use them directly with build=.
Test: build, add source file that matches glob, rebuild
Change-Id: Ifd0b0d3bc061aae0a16d6c7ca9a1cd8672656b4d