diff options
author | Jacob Parker <jacob@solidangle.ca> | 2017-11-27 09:35:02 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2017-11-27 09:36:34 -0800 |
commit | bc4f97114dd6c82228c5b79868dcfdcd18818c24 (patch) | |
tree | c2063d617e524259202f8ae5c553fc69564736da /site/docs/toolchains.md | |
parent | fa9b01efdb1b444fc1a7f3f850c836dd84c74fce (diff) |
(Minor) Use consistent indentation in toolchain docs
Closes #4160.
PiperOrigin-RevId: 177028049
Diffstat (limited to 'site/docs/toolchains.md')
-rw-r--r-- | site/docs/toolchains.md | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/site/docs/toolchains.md b/site/docs/toolchains.md index 7eacb0cfe3..57c69de329 100644 --- a/site/docs/toolchains.md +++ b/site/docs/toolchains.md @@ -86,18 +86,19 @@ def _my_toolchain_impl(ctx): return [toolchain] my_toolchain = rule( - _my_toolchain_impl, - attrs = { - 'compiler': attr.string(), - 'system_lib': attr.string(), - 'arch_flags': attr.string_list(), - }) + _my_toolchain_impl, + attrs = { + 'compiler': attr.string(), + 'system_lib': attr.string(), + 'arch_flags': attr.string_list(), + }) ``` An example invocation of the rule looks as follows: ```python -my_toolchain(name = 'linux_toolchain_impl', +my_toolchain( + name = 'linux_toolchain_impl', compiler = '@remote_linux_repo//compiler:compiler_binary', system_lib = '@remote_linux_repo//library:system_library', arch_flags = [ @@ -106,7 +107,8 @@ my_toolchain(name = 'linux_toolchain_impl', ] ) -my_toolchain(name = 'darwin_toolchain_impl', +my_toolchain( + name = 'darwin_toolchain_impl', compiler = '@remote_darwin_repo//compiler:compiler_binary', system_lib = '@remote_darwin_repo//library:system_library', arch_flags = [ @@ -126,15 +128,16 @@ lazy loading of toolchains. Below is an example toolchain definition: ```python -toolchain(name = 'linux_toolchain', - toolchain_type = '//path/to:my_toolchain_type', - exec_compatible_with = [ - '@bazel_tools//platforms:linux', - '@bazel_tools//platforms:x86_64'], - target_compatible_with = [ - '@bazel_tools//platforms:linux', - '@bazel_tools//platforms:x86_64'], - toolchain = ':linux_toolchain_impl', +toolchain( + name = 'linux_toolchain', + toolchain_type = '//path/to:my_toolchain_type', + exec_compatible_with = [ + '@bazel_tools//platforms:linux', + '@bazel_tools//platforms:x86_64'], + target_compatible_with = [ + '@bazel_tools//platforms:linux', + '@bazel_tools//platforms:x86_64'], + toolchain = ':linux_toolchain_impl', ) ``` @@ -160,9 +163,9 @@ definition. For example: ```python my_library = rule( - ... - toolchains = ['//path/to:my_toolchain_type'] - ...) + ... + toolchains = ['//path/to:my_toolchain_type'] + ...) ``` When using the `ctx.toolchains` rule, Bazel checks the execution and target |