Document rust_sysroot variable.
reference.md was updated to match using
`out/gn --markdown help all > docs/reference.md`
Bug: chromium/1269992
Change-Id: I0921f74a229dc14f43ae523cf032dedcaa0814f0
Reviewed-on: https://gn-review.googlesource.com/c/gn/+/12440
Reviewed-by: Brett Wilson <brettw@chromium.org>
Commit-Queue: Brett Wilson <brettw@chromium.org>
diff --git a/docs/reference.md b/docs/reference.md
index 1dde971..922f1d9 100644
--- a/docs/reference.md
+++ b/docs/reference.md
@@ -3671,6 +3671,14 @@
If specified, this list is the subset of the outputs that should be
added to runtime deps (see "gn help runtime_deps"). By default (if
runtime_outputs is empty or unspecified), it will be the link_output.
+
+ rust_sysroot
+ Valid for: Rust tools
+
+ A path relative to root_out_dir. This is not used in the build
+ process, but may be used when generating metadata for rust-analyzer.
+ (See --export-rust-project). It enables such metadata to include
+ information about the Rust standard library.
```
#### **Expansions for tool variables**
diff --git a/src/gn/function_toolchain.cc b/src/gn/function_toolchain.cc
index a6deec6..b0fc5e1 100644
--- a/src/gn/function_toolchain.cc
+++ b/src/gn/function_toolchain.cc
@@ -584,6 +584,14 @@
added to runtime deps (see "gn help runtime_deps"). By default (if
runtime_outputs is empty or unspecified), it will be the link_output.
+ rust_sysroot
+ Valid for: Rust tools
+
+ A path relative to root_out_dir. This is not used in the build
+ process, but may be used when generating metadata for rust-analyzer.
+ (See --export-rust-project). It enables such metadata to include
+ information about the Rust standard library.
+
)" // String break to prevent overflowing the 16K max VC string length.
R"(Expansions for tool variables