function lUseCompilerCommandFile = useCompilerCommandFile(tcInfo)

% Copyright 2018 The MathWorks, Inc.

lRequiresCommandFile = isAttribute(tcInfo, 'RequiresCommandFile') ...
&& getAttribute(tcInfo, 'RequiresCommandFile');

% Some toolchains (LCC) can use linker command files but do not support
% compiler command files
lNoCompilerCommandFile = isAttribute(tcInfo, 'NoCompilerCommandFile') ...
&& getAttribute(tcInfo, 'NoCompilerCommandFile');

lUseCompilerCommandFile = lRequiresCommandFile && ~lNoCompilerCommandFile;