-code_merging

Removes duplicated functions to reduce object code size.

Syntax
  -code_merging keyword[,...]

  

The choices for keyword are:

all

Use the all argument to specify that the linker should remove all duplicate functions except one.

safe

Use the safe argument to specify that only duplicate functions marked as weak should be reduced to one function.

aggressive

Use the aggressive option to specify that the linker should ignore references to function addresses when considering which duplicate functions to remove.

off

Use the off argument to disable code merging optimization.

Remarks

This linker optimization removes duplicate copies of functions with identical executable code.

The linker does not apply this optimization to functions that have been declared with the __declspec(no_linker_opts) directive.

By default the code merging optimization is off.