Clang is always used now, so we can remove all the GCC checks. Removing
GCC-specific configuration will happen in the next CL.
Test: m
Change-Id: I4835ecf6062159315d0dfb07b098e60bff033a8a
* Add relativeFilePathFlag compiler flag category whose format must be
a=b/c/d, where "a" is the flag name and "b/c/d" is the flag value that
is a relative path
* During CMake conversion, "b/c/d" will be prefixed with ANDROID_ROOT
before being written to CMakeLists.txt
Bug: 112599284
Test: cd system/bt; mm -j40
croot; make -j40
Change-Id: I4bb039678482201db60f0af97ab280d5028e0463
Modules may have multiple variants for each architecture, and
SOONG_GEN_CMAKEFILES=1 was generating CMakeLists.txt for all of
them, overwriting the first normal variant with the last (and
likely least normal) variant.
Keep a map of generated CMakeLists.txt files, and only generate
each one once.
Bug: 72283227
Test: m SOONG_GEN_CMAKEFILES=1
Change-Id: If31087264d2809088fe36965b9a0ff0f44089852
In Soong, a Config() method will always return a Config. Make
ModuleContext, SingletonContext, TopDownMutatorContext and
BottomUpMutatorContext's Config() methods explictly return
a Config to avoid having to type-assert everywhere. Overriding
the Config method requires duplicating the list of methods in
blueprint.BaseModuleContext and blueprint.BottomUpMutatorContext,
following the same pattern used by the other *Contexts.
Config() obsoletes the AConfig() method used in some places, which
will be cleaned up in the next patch.
Test: m checkbuild
Change-Id: Ibe21efde933959811d52443496967ab8ce71215e
Wrap blueprint.PackageContext so that the *Func methods can provide
an android.Config instead of an interface{}. The modified signatures
means that every method in ModuleContext and SingletonContext
that takes a blueprint.PackageContext now needs to be wrapped to
take an android.PackageContext.
SingletonContext wasn't previously wrapped at all, but as long
as it is, wrap everything like ModuleContext does. This requires
updating every Singleton to use the android-specific methods.
Test: builds, all Soong tests pass
Change-Id: I4f22085ebca7def6c5cde49e8210b59d994ba625
Include order should be module includes, dependency exported includes,
and then global includes. Module includes and global includes are
computed during compileFlags, but dependency exported includes are
not handled until later. Move the global includes into a new
flags variable so that the dependency includes can be appended
to the module includes.
Test: m -j native
Change-Id: Ifc3894f0a898a070d6da8eed4f4b9e8cc0cd2523
Refactor doesn't work in CLion unless we also add the headers in
the header search path to the list of source file in a project.
Change-Id: Idc6223149ecf7ddf0c21bc0873ad3019ec6ccdd3
Treble genererated project name feature character no accepted by
CMake. So far only @ is a problem.
Change-Id: Iac460033f1181f46ab8205e5706271f99ab798d3
For some library, the order of includes is important. e.g: library
can include "system/window.h". Dependending on the dependency order
this could mean libs/nativewindow/include/system/window.h or
system/core/include/system/window.h
This patch changes search path storage from map to array in order
to preserve order the order in which they were received from
soong.
Change-Id: I8ef788633985f4ed04ec3432686eb1427f73d600
Test: Manual