getLinkFlags

Get link options from model build information

Description

example

options = getLinkFlags(buildinfo,includeGroups,excludeGroups) returns linker options from the build information.

The function requires the buildinfo argument. You can use optional includeGroups and excludeGroups arguments. These optional arguments let you include or exclude groups selectively from the compiler options returned by the function.

If you choose to specify excludeGroups and omit includeGroups, specify a null character vector ('') for includeGroups.

Examples

collapse all

Get the linker options from the build information, myModelBuildInfo.

myModelBuildInfo = RTW.BuildInfo;
addLinkFlags(myModelBuildInfo,{'-MD -Gy' '-T'},'OPTS');
linkflags = getLinkFlags(myModelBuildInfo);
>> linkflags

linkflags = 

    '-MD -Gy'    '-T'

Get the linker options with the group name Debug from the build information, myModelBuildInfo.

myModelBuildInfo = RTW.BuildInfo;
addLinkFlags(myModelBuildInfo,{'-MD -Gy' '-T'}, ...
   {'Debug' 'MemOpt'});
linkflags = getLinkFlags(myModelBuildInfo,{'Debug'});
>> linkflags

linkflags = 

    '-MD -Gy'

Get the linker options from the build information myModelBuildInfo, except those options with the group name Debug.

myModelBuildInfo = RTW.BuildInfo;
addLinkFlags(myModelBuildInfo,{'-MD -Gy' '-T'}, ...
   {'Debug' 'MemOpt'});
linkflags = getLinkFlags(myModelBuildInfo,'',{'Debug'});
>> linkflags

linkflags = 

    '-T'

Input Arguments

collapse all

To use the includeGroups argument, view available groups by using myGroups = getGroups(buildInfo).

Example: ''

To use the excludeGroups argument, view available groups by using myGroups = getGroups(buildInfo).

Example: ''

Output Arguments

collapse all

Introduced in R2006a