diff options
| author | Jeremy Fitzhardinge <jsgf@fb.com> | 2019-07-30 15:57:10 -0700 |
|---|---|---|
| committer | Jeremy Fitzhardinge <jsgf@fb.com> | 2019-08-19 19:06:46 -0700 |
| commit | d2219c2e2e287d50c0f9761203d26d5fe3b0e639 (patch) | |
| tree | ffa424e0cfa2350cbc589c6ce85f2865e0ce81ec /src/test/ui/commandline-argfile-missing.rs | |
| parent | 859657f2c5dbe2cf55cf7a7665383a81e676bdf3 (diff) | |
| download | rust-d2219c2e2e287d50c0f9761203d26d5fe3b0e639.tar.gz rust-d2219c2e2e287d50c0f9761203d26d5fe3b0e639.zip | |
rustc: implement argsfiles for command line
This makes `rustc` support `@path` arguments on the command line. The `path` is opened and the file is interpreted as new command line options which are logically inserted at that point in the command-line. The options in the file are one per line. The file is UTF-8 encoded, and may have either Unix or Windows line endings. It does not support recursive use of `@path`. This is useful for very large command lines, or when command-lines are being generated into files by other tooling.
Diffstat (limited to 'src/test/ui/commandline-argfile-missing.rs')
| -rw-r--r-- | src/test/ui/commandline-argfile-missing.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/commandline-argfile-missing.rs b/src/test/ui/commandline-argfile-missing.rs new file mode 100644 index 00000000000..34faf076335 --- /dev/null +++ b/src/test/ui/commandline-argfile-missing.rs @@ -0,0 +1,16 @@ +// Check to see if we can get parameters from an @argsfile file +// +// build-fail +// normalize-stderr-test: "Argument \d+" -> "Argument $$N" +// normalize-stderr-test: "os error \d+" -> "os error $$ERR" +// normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " +// compile-flags: --cfg cmdline_set @{{src-base}}/commandline-argfile-missing.args + +#[cfg(not(cmdline_set))] +compile_error!("cmdline_set not set"); + +#[cfg(not(unbroken))] +compile_error!("unbroken not set"); + +fn main() { +} |
