Google develops assembly system
Soong build files do not support conditional statements and branching expressions, but only describe the project structure, modules and dependencies used in the build. Files to be built are described using wildcards and grouped into packages, each of which is a collection of files with their associated dependencies. It is possible to define variables. Variables and properties are strongly typed (the type of variables is selected dynamically on first assignment, and for properties statically, depending on the module type). Complex elements of assembly logic are moved to handlers,
Soong intertwines with a more general project
This approach allows for large and heterogeneous projects, such as Android, to implement complex elements of assembly logic in code in a high-level programming language, while maintaining the ability to make changes to modules related to assembly organization and project structure using a simple declarative syntax. For example, in Soong, the choice of compiler flags is made by the handler
cc_library {
...
srcs: ["generic.cpp"],
arch: {
arm: {
srcs: ["arm.cpp"],
},
x86:{
srcs: ["x86.cpp"],
},
},
}
Source: opennet.ru