285296519a
The default target selector uses the name of the host OS. Modules can implement their own target selector by implementing the context.TargetSelector interface and its unique selectTarget() method. Targets are defined this way in Blueprint files: cc_library { name: "libmylib", deps: ["libmath", "libutils"], zones: ["frontend"], srcs: ["main.cpp"], targets: { darwin: { moduleCflags: "-framework OpenGL -framework GLUT", }, linux: { deps: ["libx11headers", "libglu"], }, }, } In this example, a set of C flags are defined on OS X only and on Linux, two new dependencies are added. When a target is selected, its properties are merged with the properties of the modules: - a list is appended to the original list (see deps above) - a string is concatenated to the original string - a bool replaces the original bool - a map adds or replaces the key/value pairs of the original map Change-Id: Ic627d47f795d6a4ff56ca5f6f099cad157621af1 |
||
---|---|---|
.. | ||
bootstrap | ||
parser | ||
pathtools | ||
context.go | ||
context_test.go | ||
globals.go | ||
live_tracker.go | ||
mangle.go | ||
module_ctx.go | ||
ninja_defs.go | ||
ninja_strings.go | ||
ninja_strings_test.go | ||
ninja_writer.go | ||
ninja_writer_test.go | ||
scope.go | ||
singleton_ctx.go | ||
unpack.go | ||
unpack_test.go |