Skip to Main Content Skip to Search
Product Documentation

addLinkFlags - Add link options to model build information

Syntax

addLinkFlags(buildinfo, options, groups)

groups is optional.

Arguments

buildinfo

Build information returned by RTW.BuildInfo.

options

A character array or cell array of character arrays that specifies the linker options to be added to the build information. The function adds each option to the end of a linker option vector. If you specify multiple options within a single character array, for example '-MD -Gy', the function adds the string to the vector as a single element. For example, if you add '-MD -Gy' and then '-T', the vector consists of two elements, as shown below.

'-MD -Gy'    '-T'
groups (optional)

A character array or cell array of character arrays that groups specified linker options. You can use groups to

  • Document the use of specific linker options

  • Retrieve or apply groups of linker options

You can apply

  • A single group name to one or more linker options

  • Multiple group names to collections of linker options (available for nonmakefile build environments only)

To...Specify groups as a...
Apply one group name to all linker optionsCharacter array.
Apply different group names to linker optionsCell array of character arrays such that the number of group names matches the number of elements you specify for options.

    Note   To specify linker options to be used in the standard Simulink Coder makefile build process, specify groups as either 'OPTS' or 'OPT_OPTS'.

Description

The addLinkFlags function adds specified linker options to the model build information. The Simulink Coder software stores the linker options in a vector. The function adds options to the end of the vector based on the order in which you specify them.

In addition to the required buildinfo and options arguments, you can use an optional groups argument to group your options.

Examples

See Also

addCompileFlags | addDefines | getLinkFlags

How To

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS