We were keeping the original array, and adding duplicates with -I
removed. Instead, only add entries that start with -I, but continue
stripping that off. This removes the -isystem arguments from the NDK
libraries.
Change-Id: I8fd71bbd6b7a051aad7e80a92a05dbdc05a6b87a
Make expects libraries built with address sanitizer to be installed into
/data, and can't handle multiple variants of modules.
Change-Id: Ice575ff6f0788a88f296e7b3ee521a2b9771f55f
Prevents make installing files with a double /:
Install: out/target/product/generic_arm64/system/lib//libc.so
Change-Id: Iee237f344e8140c4938aa9d1e6940e4fdbfa7cd8
Blueprint now requres DependencyTags to be passed to AddDependency
calls. Use the tags to avoid setting member variables on modules, which
will be lost after the mutators have been called.
Change-Id: I8c1d9ed1db85a300e14394b911a516d361ba9f75
LOCAL_MODULE_STEM adds the expected extension to the installation path,
remove the extension from the filename.
Change-Id: I54dbcfa73d8d07fc3630caf2d582160003e28f79
Extract Soong's install path and put it in the generated Android.mk file
so that tests get installed in the correct place.
Change-Id: Id4726855c5677855406de20773a5da533bdd4cea
Refactor all of cc in order to use composition instead of inheritance.
All cc module types exported by cc are now *cc.Module objects, with
compilation, linking, and installing steps delegated to different
objects in order to form the full module type. Additional features that
modify dependencies and flags can be inserted in a features object list,
and custom module types can be created by adding a Customizer object
that can modify properties.
Change-Id: Ie1283d14920f7856f6947b0530606b2f4d58fab0
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
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