/OPT

Syntax:

/OPT:{REF|NOREF}

Controls the optimizations LINK performs during a build. Optimizations generally decrease the image size and increase the program speed, at a cost of increased link time.

By default, LINK removes unreferenced packaged functions (COMDATs). This optimization is called transitive COMDAT elimination. To override this default and keep unused packaged functions in the program, specify /OPT:NOREF. You can use the /INCLUDE option to override the removal of a specific symbol. It is not possible to create packaged functions with the Visual Fortran compiler. This description is included for mixed-language applications with languages such as Visual C++ that support packaged functions (with the /Gy compiler option).

If you specify the /DEBUG option, the default for /OPT changes from REF to NOREF and all functions are preserved in the image. To override this default and optimize a debugging build, specify /OPT:REF. The /OPT:REF option disables incremental linking.