LIB /LINKREPRO

This option sets a directory for test-case reproduction.

Syntax

/linkrepro:path

The assumed path argument consists of everything after the colon. By “assumed”, it is meant here that the code that does the parsing does not check whether the option extends as far as including a path.  Indeed, the colon is assumed too, and may in fact be replaced by any single character. Since these assumptions are almost certainly coding errors, the syntax is shown above as if path is required.

The form /?linkrepro, with the usually inconsequential question mark, is not recognised and causes a warning (LNK4044).

Behaviour

The path argument names a directory that is to receive copies of all input files and also a text file that records what was asked. The idea is that whatever was done can be reproduced by re-running with this “repro” directory as the current directory. Reproduction by other hands is made easier because the contents of this directory may be sent as one package.

The command line, including expansions from environment variables and command files, is searched for /linkrepro (and /libpath) options in an early pass, so that test-case reproduction will be active even for options that precede any /linkrepro.