Add 'rustenv' to 'gn desc' output
This commit adds each target's 'rustenv' property, which stores
key/value environment variables to pass to the Rust compiler,
in the output of 'gn desc'.
This also fixes a few typos in code comments in the 'desc' command.
Change-Id: I3e0995dab2656ad23fbce9069eb7a83aa4e4cb9d
Reviewed-on: https://gn-review.googlesource.com/c/gn/+/12020
Reviewed-by: Brett Wilson <brettw@chromium.org>
Commit-Queue: Brett Wilson <brettw@chromium.org>
diff --git a/src/gn/desc_builder.cc b/src/gn/desc_builder.cc
index 2b4ac52..bcd30f3 100644
--- a/src/gn/desc_builder.cc
+++ b/src/gn/desc_builder.cc
@@ -44,7 +44,9 @@
// "depfile : "file name for action input dependencies",
// "outputs" : [ list of target outputs ],
// "arflags", "asmflags", "cflags", "cflags_c",
-// "clfags_cc", "cflags_objc", "clfags_objcc" : [ list of flags],
+// "cflags_cc", "cflags_objc", "cflags_objcc",
+// "rustflags" : [ list of flags],
+// "rustenv" : [ list of Rust environment variables ],
// "defines" : [ list of preprocessor definitions ],
// "include_dirs" : [ list of include directories ],
// "precompiled_header" : "name of precompiled header file",
@@ -514,6 +516,8 @@
kRecursiveWriterKeepDuplicates)
CONFIG_VALUE_ARRAY_HANDLER(rustflags, std::string,
kRecursiveWriterKeepDuplicates)
+ CONFIG_VALUE_ARRAY_HANDLER(rustenv, std::string,
+ kRecursiveWriterKeepDuplicates)
CONFIG_VALUE_ARRAY_HANDLER(defines, std::string,
kRecursiveWriterSkipDuplicates)
CONFIG_VALUE_ARRAY_HANDLER(include_dirs, SourceDir,