Skip to content

Commit f2cbb18

Browse files
author
Colin Robertson
committed
Fixes per comments by Kevin, YongKang
1 parent 2879d8f commit f2cbb18

File tree

4 files changed

+22
-8
lines changed

4 files changed

+22
-8
lines changed

docs/build/reference/linker-options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ You can use the [comment](../../preprocessor/comment-c-cpp.md) pragma to specify
7777
|[/LARGEADDRESSAWARE](largeaddressaware-handle-large-addresses.md)|Tells the compiler that the application supports addresses larger than two gigabytes|
7878
|[/LIBPATH](libpath-additional-libpath.md)|Specifies a path to search before the environmental library path.|
7979
|[/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.|
8181
|[/LTCG](ltcg-link-time-code-generation.md)|Specifies link-time code generation.|
8282
|[/MACHINE](machine-specify-target-platform.md)|Specifies the target platform.|
8383
|[/MANIFEST](manifest-create-side-by-side-assembly-manifest.md)|Creates a side-by-side manifest file and optionally embeds it in the binary.|

docs/build/reference/linkrepro.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,19 @@ The user-specified directory to store the link repro in. Directory names that in
2020

2121
## Remarks
2222

23+
::: moniker range=">=vs-2019"
24+
2325
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.
2426

2527
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).
2628

2729
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.
2830

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.
3036

3137
### To set this linker option in the Visual Studio development environment
3238

docs/build/reference/linkreprotarget.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ helpviewer_keywords: ["LINKREPROTARGET linker option", "/LINKREPROTARGET linker
77
---
88
# /LINKREPROTARGET (Link repro file name)
99

10-
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.
1111

1212
## Syntax
1313

@@ -16,15 +16,23 @@ Tells the linker to generate a link repro that has a specified file name.
1616
### Arguments
1717

1818
**/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.
2020

2121
## Remarks
2222

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.
2428

2529
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).
2630

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.
2836

2937
### To set this linker option in the Visual Studio development environment
3038

docs/overview/how-to-report-a-problem-with-the-visual-cpp-toolset.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ Finally, attach the preprocessed repro files (*filename*.i and *modulename*.i) a
312312

313313
### Link repros
314314

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.
316316

317317
#### To generate a link repro using the link_repro environment variable
318318

@@ -336,7 +336,7 @@ A *link repro* is the linker-generated contents of a directory specified either
336336

337337
Finally, package the repro by compressing the entire linkrepro directory into a .zip file or similar, and attach it to your report.
338338

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.
340340

341341
#### To generate a link repro using the /LINKREPRO option
342342

0 commit comments

Comments
 (0)