@@ -29,6 +29,41 @@ comes from a non-Google open source project needs to have an acceptable license
2929and be committed to the Emboss repository in a specific location.
3030
3131
32+ ### Updating Build Helper Files
33+
34+ The Emboss project provides a set of generated files in the ` gen/ ` directory
35+ that can be used by other build systems (like CMake, GN, etc.) to easily
36+ include the Emboss compiler and C++ runtime sources.
37+
38+ These files are generated from a single source of truth: ` build.json ` .
39+
40+ - ** ` build.json ` ** : This file, located in the project root, contains the
41+ canonical lists of source files required for the compiler and the C++
42+ runtime. It is the only file in this system that should be manually
43+ edited, though it is typically updated via a script.
44+
45+ - ** ` gen/ ` ** : This directory contains the generated helper files. ** Do not
46+ edit these files directly** , as they will be overwritten.
47+
48+ If you change the dependencies of the Emboss compiler or runtime in the Bazel
49+ build system, you will need to update ` build.json ` and regenerate the helper
50+ files.
51+
52+ - To update ` build.json ` with the latest sources from Bazel, run:
53+ ``` bash
54+ ./scripts/build_helpers/manage_build_json.py
55+ ```
56+
57+ - To regenerate the files in ` gen/` after modifying ` build.json` , run:
58+ ` ` ` bash
59+ ./scripts/build_helpers/generate_build_files.py
60+ ` ` `
61+
62+ A CI check is in place to ensure that ` build.json` is always in sync with the
63+ Bazel build. If this check fails, you will need to run the ` manage_build_json.py`
64+ script and commit the changes.
65+
66+
3267# ## How-To Guides
3368
3469This document covers the process of getting a change into the main Emboss
0 commit comments