about summary refs log tree commit diff
path: root/src/doc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-08-22 06:14:49 +0000
committerbors <bors@rust-lang.org>2019-08-22 06:14:49 +0000
commit201e52e5fe73ccf3dd22946b1216ad8d64f8c2ba (patch)
tree806f2cb070e65c8e1bd10e8d41c5ad3d4367c55d /src/doc
parent42dcd4b7c5fb7b61bc2f4c0842f66e5ad40057e4 (diff)
parentd9497749a87440d836495da6d40a5ce667a67ccb (diff)
downloadrust-201e52e5fe73ccf3dd22946b1216ad8d64f8c2ba.tar.gz
rust-201e52e5fe73ccf3dd22946b1216ad8d64f8c2ba.zip
Auto merge of #63175 - jsgf:argsfile, r=jsgf
rustc: implement argsfiles for command line

Many tools, such as gcc and gnu-ld, support "args files" - that is, being able to specify @file on the command line.  This causes `file` to be opened and parsed for command line options. They're separated with whitespace; whitespace can be quoted with double or single quotes, and everything can be \\-escaped. Args files may recursively include other args files via `@file2`.

See https://sourceware.org/binutils/docs/ld/Options.html#Options for the documentation of gnu-ld's @file parameters.

This is useful for very large command lines, or when command lines are being generated into files by other tooling.
Diffstat (limited to 'src/doc')
-rw-r--r--src/doc/rustc/src/command-line-arguments.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/doc/rustc/src/command-line-arguments.md b/src/doc/rustc/src/command-line-arguments.md
index d774e465118..5eea9c86879 100644
--- a/src/doc/rustc/src/command-line-arguments.md
+++ b/src/doc/rustc/src/command-line-arguments.md
@@ -304,3 +304,10 @@ to customize the output:
 
 Note that it is invalid to combine the `--json` argument with the `--color`
 argument, and it is required to combine `--json` with `--error-format=json`.
+
+## `@path`: load command-line flags from a path
+
+If you specify `@path` on the command-line, then it will open `path` and read
+command line options from it. These options are one per line; a blank line indicates
+an empty option. The file can use Unix or Windows style line endings, and must be
+encoded as UTF-8.