Main Content

getLinkFlags

ビルド情報からリンク オプションを取得

説明

options = getLinkFlags(buildinfo,includeGroups,excludeGroups) は、ビルド情報からリンカー オプションを返します。

関数は、引数 buildinfo を必要とします。オプション引数 includeGroupsexcludeGroups を使用できます。これらのオプション引数を使用すると、関数で返されたコンパイラ オプションから、グループを選択的に含めるか、除外することができます。

excludeGroups を指定して includeGroups を除外する場合は includeGroups にヌル文字ベクトル ('') を指定してください。

すべて折りたたむ

ビルド情報 myBuildInfo からリンカー オプションを取得します。

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

linkflags = 

    '-MD -Gy'    '-T'

ビルド情報 myBuildInfo から、グループ名 Debug のリンカー オプションを取得します。

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

linkflags = 

    '-MD -Gy'

Debug というグループ名をもつリンカー オプションを除いて、ビルド情報 myBuildInfo に含まれるリンカー オプションを取得します。

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

linkflags = 

    '-T'

入力引数

すべて折りたたむ

生成されたコードのコンパイルとリンクに関する情報を格納する RTW.BuildInfo オブジェクト。

includeGroups 引数を使用するには、myGroups = getGroups(buildInfo) を使用して、利用可能なグループを表示します。

例: ''

excludeGroups 引数を使用するには、myGroups = getGroups(buildInfo) を使用して、利用可能なグループを表示します。

例: ''

出力引数

すべて折りたたむ

ビルド情報に含まれるリンカー オプション。

バージョン履歴

R2006a で導入