Lines Matching full:build
1 # CHRE Framework Build System
5 The CHRE build system is based on Make, and uses a set of Makefiles that allow
8 is also flexible to different build toolchains (though LLVM/Clang or GCC are
11 build system, it can be beneficial to leverage the existing build system to
13 should be possible to build nanoapps from the CHRE build system (to have
14 commonality across devices), and the CHRE framework build shares configuration
15 with the nanoapp build.
17 By default, the output of the build is linked into both a static archive
23 The CHRE build system was originally designed around the philosophy that a
24 vanilla invocation of `make` or `make all` should build any given nanoapp for
26 build system for multi-threaded builds and also promotes a level of separation
28 construct, merely convention). In practice, the CHRE build system is rarely used
29 to build multiple targets with one invocation of Make. However, the design goal
35 build details between targets. This is important because not all compiler or
39 with the CHRE build. The goal is for the CHRE build to be as flexible as
42 ### Build Template
44 The CHRE build system is implemented using template meta-programming techniques.
45 A build template is used to create Make rules for tasks that are common to all
48 when adding support for a new build target.
50 The build template is located at `build/build_template.mk`, and is documented
51 with all the variables used to generate build targets, like `TARGET_CFLAGS`.
53 ## Build Targets (Variants)
55 Compiling the framework for different devices is done by specifying the build
56 target when invoking `make`. Conventionally, build targets consist of three
67 build, such as the target memory region for the binary. If a vendor,
73 collection of platform software called GladOS/Cake, then a suitable build target
76 The build target may optionally have `_debug` appended, which is a common suffix
79 ### Creating a New Build Target
83 The architecture-specific portion of the build deals with mainly the build
86 It is easiest to check if the architecture is currently listed in `build/arch`,
88 read through to know how the build is layered.
90 CHRE expects the build toolchain to be exported via Makefile variables,
95 `build/arch` and `build/build_template.mk` for details.
97 #### Build Target Makefile
99 Makefiles for each build target can be found at
100 `build/variant/<target_name>.mk`. These files are included at the end of the
102 build template and invoking it to instantiate build rules. This involves doing
107 * Configuring (if needed) and including the apporpriate `build/arch/*.mk` file
112 * Including `build/build_template.mk` to instantiate the build targets - this
115 Refer to existing files under `build/variant` for examples.
119 While the build target is primarily concerned with configuring the CHRE build
123 additional build customization outside of the Makefiles contained in the
124 system/chre project. The build system supports configuration at this level via
126 into the build by setting the `CHRE_VARIANT_MK_INCLUDES` environment variable
135 sources used with the simulator build target), and not `COMMON_SRCS` or other
136 common variables, to avoid affecting other build targets.
138 ## Build Artifacts
140 At the end of a successful build, the following are generated in the `out`
148 * Depending on the build target, additional intermediates (e.g. `nanopb_gen` for