You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/build/reference/linker-options.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,7 +77,7 @@ You can use the [comment](../../preprocessor/comment-c-cpp.md) pragma to specify
77
77
|[/LARGEADDRESSAWARE](largeaddressaware-handle-large-addresses.md)|Tells the compiler that the application supports addresses larger than two gigabytes|
78
78
|[/LIBPATH](libpath-additional-libpath.md)|Specifies a path to search before the environmental library path.|
79
79
|[/LINKREPRO](linkrepro.md)|Specifies a path to generate link repro artifacts in.|
80
-
|[/LINKREPROTARGET](linkreprotarget.md)|Specifies a file name to use for generated link repro artifacts.|
80
+
|[/LINKREPROTARGET](linkreprotarget.md)|Specifies a file name to filter generated link repro artifacts.|
Copy file name to clipboardExpand all lines: docs/build/reference/linkrepro.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,13 +20,19 @@ The user-specified directory to store the link repro in. Directory names that in
20
20
21
21
## Remarks
22
22
23
+
::: moniker range=">=vs-2019"
24
+
23
25
The **/LINKREPRO** linker option is used to create a *link repro*. It's a set of build artifacts that allow Microsoft to reproduce a problem that occurs at link time. It's useful for problems such as a backend crash involving Link-Time Code Generation (LTCG), an LNK1000 linker error, or a linker crash. The linker produces a link repro when you specify the **/LINKREPRO** linker option, or when you set the `link_repro` environment variable in your command-line build environment.
24
26
25
27
Create a link repro to get support for an LTCG crash, a linker crash, or an internal error that happens at link time. For more information, see the [Link repros](../../overview/how-to-report-a-problem-with-the-visual-cpp-toolset.md#link-repros) section of [How to report a problem with the Microsoft C++ toolset](../../overview/how-to-report-a-problem-with-the-visual-cpp-toolset.md).
26
28
27
29
Both the **/LINKREPRO** linker option and the `link_repro` environment variable require you to specify an output directory for the link repro. On the command line or in the IDE, specify the directory by using a **/LINKREPRO:**_directory-name_ option. The _directory-name_ you specify may be an absolute or relative path, but the directory must exist. The command-line option overrides any directory value set in the `link_repro` environment variable. You must also specify the [/OUT](out-output-file-name.md) linker option when you use the **/LINKREPRO** option.
28
30
29
-
For information on how to set a link repro file name, see the [/LINKREPROTARGET](linkreprotarget.md) linker option. This option can be used to specify different names for different link repros. It's useful in complex builds that invoke the linker more than once.
31
+
For information on how to filter link repro generation on a file name, see the [/LINKREPROTARGET](linkreprotarget.md) linker option. This option can be used to specify a specific target to generate a link repro for. It's useful in complex builds that invoke the linker more than once.
32
+
33
+
::: moniker-end
34
+
35
+
The **/LINKREPRO** option is available starting in Visual Studio 2019 version 16.1.
30
36
31
37
### To set this linker option in the Visual Studio development environment
Tells the linker to generate a link repro that has a specified file name.
10
+
Tells the linker to generate a link repro filtered by the specified file name.
11
11
12
12
## Syntax
13
13
@@ -16,15 +16,23 @@ Tells the linker to generate a link repro that has a specified file name.
16
16
### Arguments
17
17
18
18
**/LINKREPROTARGET:**_file-name_\
19
-
The user-specified file name to store the link repro in. File names that include spaces must be enclosed in double quotes.
19
+
The user-specified file name to generate the link repro for. File names that include spaces must be enclosed in double quotes. The file name should include the base name and the extension, but not the path.
20
20
21
21
## Remarks
22
22
23
-
The **/LINKREPROTARGET** linker option is used to specify a file name for a *link repro*. A link repro is a set of build artifacts that allow Microsoft to reproduce a problem that occurs at link time. The linker produces a link repro when you specify the [/LINKREPRO](linkrepro.md) linker option, or when you set the `link_repro` environment variable in your command-line build environment. The **/LINKREPROTARGET** linker option is useful in complex builds that invoke the linker more than once. It lets you specify a different name for each link repro.
23
+
::: moniker range=">=vs-2019"
24
+
25
+
The **/LINKREPROTARGET** linker option is used to specify a file name to filter *link repro* generation. A link repro is a set of build artifacts that allow Microsoft to reproduce a problem that occurs at link time. The linker produces a link repro when you specify the [/LINKREPRO](linkrepro.md) linker option, or when you set the `link_repro` environment variable in your command-line build environment.
26
+
27
+
The **/LINKREPROTARGET** linker option is useful in complex builds that invoke the linker more than once. It lets you specify a specific target for the link repro, such as *problem.dll*. This lets you generate the link repro only when you link a specific file.
24
28
25
29
For more information about how and when to create a link repro, see the [Link repros](../../overview/how-to-report-a-problem-with-the-visual-cpp-toolset.md#link-repros) section of [How to report a problem with the Microsoft C++ toolset](../../overview/how-to-report-a-problem-with-the-visual-cpp-toolset.md).
26
30
27
-
To specify a **/LINKREPROTARGET** linker option, the **/LINKREPRO** and [/OUT](out-output-file-name.md) linker options must also be set.
31
+
The **/LINKREPRO** and [/OUT](out-output-file-name.md) linker options must be set for the **/LINKREPROTARGET** option to have any effect.
32
+
33
+
::: moniker-end
34
+
35
+
The **/LINKREPROTARGET** option is available starting in Visual Studio 2019 version 16.1.
28
36
29
37
### To set this linker option in the Visual Studio development environment
Copy file name to clipboardExpand all lines: docs/overview/how-to-report-a-problem-with-the-visual-cpp-toolset.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -312,7 +312,7 @@ Finally, attach the preprocessed repro files (*filename*.i and *modulename*.i) a
312
312
313
313
### Link repros
314
314
315
-
A *link repro* is the linker-generated contents of a directory specified either by the **link\_repro** environment variable, or as an argument to the [/LINKREPRO](../build/reference/linkrepro.md) linker option. It contains build artifacts that collectively demonstrate a problem that occurs at link time. Examples include a backend crash involving Link-Time Code Generation (LTCG), or a linker crash. These build artifacts are the ones needed as linker input so the problem can be reproduced. A link repro can be created easily by using this environment variable. It enables the linker's built-in repro generation capability.
315
+
A *link repro* is the linker-generated contents of a directory, specified either by the **link\_repro** environment variable, or as an argument to the [/LINKREPRO](../build/reference/linkrepro.md) linker option. It contains build artifacts that collectively demonstrate a problem that occurs at link time. Examples include a backend crash involving Link-Time Code Generation (LTCG), or a linker crash. These build artifacts are the ones needed as linker input so the problem can be reproduced. A link repro can be created easily by using this environment variable. It enables the linker's built-in repro generation capability.
316
316
317
317
#### To generate a link repro using the link_repro environment variable
318
318
@@ -336,7 +336,7 @@ A *link repro* is the linker-generated contents of a directory specified either
336
336
337
337
Finally, package the repro by compressing the entire linkrepro directory into a .zip file or similar, and attach it to your report.
338
338
339
-
The **/LINKREPRO** linker option has the same effect as the **link\_repro** environment variable. You can use the [/LINKREPROTARGET](../build/reference/linkreprotarget.md) option to specify the name to use for the generated link repro. To use **/LINKREPROTARGET**, you must also specify the **/OUT** linker option.
339
+
The **/LINKREPRO** linker option has the same effect as the **link\_repro** environment variable. You can use the [/LINKREPROTARGET](../build/reference/linkreprotarget.md) option to specify the name to filter on for the generated link repro. To use **/LINKREPROTARGET**, you must also specify the **/OUT** linker option.
340
340
341
341
#### To generate a link repro using the /LINKREPRO option
0 commit comments