Commit graph

10 commits

Author SHA1 Message Date
Colin Cross
aabf67968c Make *Context.Config return a Config instead of a interface{}
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
2017-11-30 00:44:11 +00:00
Colin Cross
0875c52de7 Wrap PackageContext and SingletonContext
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
2017-11-29 05:04:30 +00:00
Colin Cross
d00350c61b Add license headers to all go and shell files
Test: none
Change-Id: I75c443e05f2b1e17fcb6823182717d2e6f5df7c4
2017-11-17 23:05:26 +00:00
Colin Cross
51d4ab2d5e Run gofmt
Test: builds
Change-Id: I2a873fc65cf414a14d6b58ef4ed6b9f5e57d75f7
2017-05-09 13:44:49 -07:00
Colin Cross
c31994825a Fix include order
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
2017-03-31 00:48:53 +00:00
Fabien Sanglard
d9233f1e7c [CMakeList generator] Add headers to source files
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
2017-03-27 17:32:14 -07:00
Fabien Sanglard
7da4926263 [CMakeList generator] Fix executable name
Treble genererated project name feature character no accepted by
CMake. So far only @ is a problem.

Change-Id: Iac460033f1181f46ab8205e5706271f99ab798d3
2017-03-23 17:50:26 -07:00
Fabien Sanglard
6747241b83 CMakelists generator: Maintain include order
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
2017-03-21 11:18:10 -07:00
Fabien Sanglard
5cb35194c2 Fix CMakeList generator CFlag bug
Properly process CFlags featuring quotes and double quotes.

Test: on libui and libgui
Change-Id: I8581cef9ccc595b6e05d77bee7bea82f2efd219b
2017-02-07 09:43:02 -08:00
Fabien Sanglard
d61f1f4559 Add support for CMakefile generation
Test: Manually generated CMakeLists.txt for gui/ui/aapt2.

Change-Id: I7dedc300c1e50b8e39bc58091b650c0bbe2c62da
2017-02-07 09:43:02 -08:00