-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #82261 - ojeda:rustdoc-argfile, r=jyn514
rustdoc: Support argument files Factors out the `rustc_driver` logic that handles argument files so that rustdoc supports them as well, e.g.: rustdoc `@argfile` This is needed to be able to generate docs for projects that already use argument files when compiling them, e.g. projects that pass a huge number of `--cfg` arguments. The feature was stabilized for `rustc` in #66172.
- Loading branch information
Showing
11 changed files
with
77 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,2 @@ | ||
--cfg | ||
unbroken� |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,12 @@ | ||
// Check to see if we can get parameters from an @argsfile file | ||
// | ||
// compile-flags: --cfg cmdline_set @{{src-base}}/commandline-argfile-badutf8.args | ||
|
||
#[cfg(not(cmdline_set))] | ||
compile_error!("cmdline_set not set"); | ||
|
||
#[cfg(not(unbroken))] | ||
compile_error!("unbroken not set"); | ||
|
||
fn main() { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,2 @@ | ||
error: Failed to load argument file: Utf8 error in $DIR/commandline-argfile-badutf8.args | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,15 @@ | ||
// Check to see if we can get parameters from an @argsfile file | ||
// | ||
// ignore-tidy-linelength | ||
// 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() { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,2 @@ | ||
error: Failed to load argument file: IO Error: $DIR/commandline-argfile-missing.args: $FILE_MISSING (os error $ERR) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,2 @@ | ||
--cfg | ||
unbroken |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,13 @@ | ||
// Check to see if we can get parameters from an @argsfile file | ||
// | ||
// check-pass | ||
// compile-flags: --cfg cmdline_set @{{src-base}}/commandline-argfile.args | ||
|
||
#[cfg(not(cmdline_set))] | ||
compile_error!("cmdline_set not set"); | ||
|
||
#[cfg(not(unbroken))] | ||
compile_error!("unbroken not set"); | ||
|
||
fn main() { | ||
} |