1<!--- AUTOGENERATED BY `./recipes.py test train` --> 2# Repo documentation for [gn]() 3## Table of Contents 4 5**[Recipe Modules](#Recipe-Modules)** 6 * [macos_sdk](#recipe_modules-macos_sdk) — The `macos_sdk` module provides safe functions to access a semi-hermetic XCode installation. 7 * [target](#recipe_modules-target) 8 * [windows_sdk](#recipe_modules-windows_sdk) 9 10**[Recipes](#Recipes)** 11 * [gn](#recipes-gn) — Recipe for building GN. 12 * [macos_sdk:examples/full](#recipes-macos_sdk_examples_full) 13 * [target:examples/full](#recipes-target_examples_full) 14 * [windows_sdk:examples/full](#recipes-windows_sdk_examples_full) 15## Recipe Modules 16 17### *recipe_modules* / [macos\_sdk](/infra/recipe_modules/macos_sdk) 18 19[DEPS](/infra/recipe_modules/macos_sdk/__init__.py#5): [recipe\_engine/cipd][recipe_engine/recipe_modules/cipd], [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/step][recipe_engine/recipe_modules/step] 20 21 22The `macos_sdk` module provides safe functions to access a semi-hermetic 23XCode installation. 24 25Available only to Google-run bots. 26 27#### **class [MacOSSDKApi](/infra/recipe_modules/macos_sdk/api.py#14)([RecipeApi][recipe_engine/wkt/RecipeApi]):** 28 29API for using OS X SDK distributed via CIPD. 30 31  **@contextmanager**<br>— **def [\_\_call\_\_](/infra/recipe_modules/macos_sdk/api.py#30)(self):** 32 33Sets up the XCode SDK environment. 34 35This call is a no-op on non-Mac platforms. 36 37This will deploy the helper tool and the XCode.app bundle at 38`[START_DIR]/cache/macos_sdk`. 39 40To avoid machines rebuilding these on every run, set up a named cache in 41your cr-buildbucket.cfg file like: 42 43 caches: { 44 # Cache for mac_toolchain tool and XCode.app 45 name: "macos_sdk" 46 path: "macos_sdk" 47 } 48 49If you have builders which e.g. use a non-current SDK, you can give them 50a uniqely named cache: 51 52 caches: { 53 # Cache for N-1 version mac_toolchain tool and XCode.app 54 name: "macos_sdk_old" 55 path: "macos_sdk" 56 } 57 58Usage: 59 with api.macos_sdk(): 60 # sdk with mac build bits 61 62Raises: 63 StepFailure or InfraFailure. 64 65  **@property**<br>— **def [sdk\_dir](/infra/recipe_modules/macos_sdk/api.py#25)(self):** 66### *recipe_modules* / [target](/infra/recipe_modules/target) 67 68[DEPS](/infra/recipe_modules/target/__init__.py#5): [recipe\_engine/platform][recipe_engine/recipe_modules/platform] 69 70 71#### **class [TargetApi](/infra/recipe_modules/target/api.py#83)([RecipeApi][recipe_engine/wkt/RecipeApi]):** 72 73  **@property**<br>— **def [host](/infra/recipe_modules/target/api.py#88)(self):** 74### *recipe_modules* / [windows\_sdk](/infra/recipe_modules/windows_sdk) 75 76[DEPS](/infra/recipe_modules/windows_sdk/__init__.py#5): [recipe\_engine/cipd][recipe_engine/recipe_modules/cipd], [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/step][recipe_engine/recipe_modules/step] 77 78 79#### **class [WindowsSDKApi](/infra/recipe_modules/windows_sdk/api.py#10)([RecipeApi][recipe_engine/wkt/RecipeApi]):** 80 81API for using Windows SDK distributed via CIPD. 82 83  **@contextmanager**<br>— **def [\_\_call\_\_](/infra/recipe_modules/windows_sdk/api.py#19)(self):** 84 85Setups the Windows SDK environment. 86 87This call is a no-op on non-Windows platforms. 88 89Raises: 90 StepFailure or InfraFailure. 91## Recipes 92 93### *recipes* / [gn](/infra/recipes/gn.py) 94 95[DEPS](/infra/recipes/gn.py#8): [macos\_sdk](#recipe_modules-macos_sdk), [target](#recipe_modules-target), [windows\_sdk](#recipe_modules-windows_sdk), [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket], [recipe\_engine/cas][recipe_engine/recipe_modules/cas], [recipe\_engine/cipd][recipe_engine/recipe_modules/cipd], [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/file][recipe_engine/recipe_modules/file], [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step] 96 97 98Recipe for building GN. 99 100— **def [RunSteps](/infra/recipes/gn.py#98)(api, repository):** 101### *recipes* / [macos\_sdk:examples/full](/infra/recipe_modules/macos_sdk/examples/full.py) 102 103[DEPS](/infra/recipe_modules/macos_sdk/examples/full.py#5): [macos\_sdk](#recipe_modules-macos_sdk), [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/step][recipe_engine/recipe_modules/step] 104 105 106— **def [RunSteps](/infra/recipe_modules/macos_sdk/examples/full.py#13)(api):** 107### *recipes* / [target:examples/full](/infra/recipe_modules/target/examples/full.py) 108 109[DEPS](/infra/recipe_modules/target/examples/full.py#5): [target](#recipe_modules-target), [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/step][recipe_engine/recipe_modules/step] 110 111 112— **def [RunSteps](/infra/recipe_modules/target/examples/full.py#13)(api):** 113### *recipes* / [windows\_sdk:examples/full](/infra/recipe_modules/windows_sdk/examples/full.py) 114 115[DEPS](/infra/recipe_modules/windows_sdk/examples/full.py#5): [windows\_sdk](#recipe_modules-windows_sdk), [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/step][recipe_engine/recipe_modules/step] 116 117 118— **def [RunSteps](/infra/recipe_modules/windows_sdk/examples/full.py#13)(api):** 119 120[recipe_engine/recipe_modules/buildbucket]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/9dea1246fd8548d96decbcc0718e1c95fa1d985f/README.recipes.md#recipe_modules-buildbucket 121[recipe_engine/recipe_modules/cas]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/9dea1246fd8548d96decbcc0718e1c95fa1d985f/README.recipes.md#recipe_modules-cas 122[recipe_engine/recipe_modules/cipd]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/9dea1246fd8548d96decbcc0718e1c95fa1d985f/README.recipes.md#recipe_modules-cipd 123[recipe_engine/recipe_modules/context]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/9dea1246fd8548d96decbcc0718e1c95fa1d985f/README.recipes.md#recipe_modules-context 124[recipe_engine/recipe_modules/file]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/9dea1246fd8548d96decbcc0718e1c95fa1d985f/README.recipes.md#recipe_modules-file 125[recipe_engine/recipe_modules/json]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/9dea1246fd8548d96decbcc0718e1c95fa1d985f/README.recipes.md#recipe_modules-json 126[recipe_engine/recipe_modules/path]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/9dea1246fd8548d96decbcc0718e1c95fa1d985f/README.recipes.md#recipe_modules-path 127[recipe_engine/recipe_modules/platform]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/9dea1246fd8548d96decbcc0718e1c95fa1d985f/README.recipes.md#recipe_modules-platform 128[recipe_engine/recipe_modules/properties]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/9dea1246fd8548d96decbcc0718e1c95fa1d985f/README.recipes.md#recipe_modules-properties 129[recipe_engine/recipe_modules/raw_io]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/9dea1246fd8548d96decbcc0718e1c95fa1d985f/README.recipes.md#recipe_modules-raw_io 130[recipe_engine/recipe_modules/step]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/9dea1246fd8548d96decbcc0718e1c95fa1d985f/README.recipes.md#recipe_modules-step 131[recipe_engine/wkt/RecipeApi]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/9dea1246fd8548d96decbcc0718e1c95fa1d985f/recipe_engine/recipe_api.py#473 132