Skip to content

Fix typo in /OPT:REF description #210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 10, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/build/reference/opt-optimizations.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Controls the optimizations that LINK performs during a build.
**REF** | **NOREF**
**/OPT:REF** eliminates functions and data that are never referenced; **/OPT:NOREF** keeps functions and data that are never referenced.

When /OFT:REF is enabled, LINK removes unreferenced packaged functions and data. An object contains packaged functions and data (COMDATs) if it was compiled by using the [/Gy](../../build/reference/gy-enable-function-level-linking.md) option. This optimization is known as transitive COMDAT elimination. By default, **/OPT:REF** is enabled in non-debug builds. To override this default and keep unreferenced COMDATs in the program, specify **/OPT:NOREF**. You can use the [/INCLUDE](../../build/reference/include-force-symbol-references.md) option to override the removal of a specific symbol.
When /OPT:REF is enabled, LINK removes unreferenced packaged functions and data. An object contains packaged functions and data (COMDATs) if it was compiled by using the [/Gy](../../build/reference/gy-enable-function-level-linking.md) option. This optimization is known as transitive COMDAT elimination. By default, **/OPT:REF** is enabled in non-debug builds. To override this default and keep unreferenced COMDATs in the program, specify **/OPT:NOREF**. You can use the [/INCLUDE](../../build/reference/include-force-symbol-references.md) option to override the removal of a specific symbol.

When **/OPT:REF** is enabled either explicitly or by default, a limited form of **/OPT:ICF** is enabled that only folds identical functions. If you want **/OPT:REF** but not **/OPT:ICF**, you must specify either **/OPT:REF,NOICF** or **/OPT:NOICF**.

Expand Down Expand Up @@ -94,4 +94,4 @@ Controls the optimizations that LINK performs during a build.

## See Also
[Setting Linker Options](../../build/reference/setting-linker-options.md)
[Linker Options](../../build/reference/linker-options.md)
[Linker Options](../../build/reference/linker-options.md)