function resp = getBuildToolInfo(h, field)

% Copyright 2012-2019 The MathWorks, Inc.

lBuildTools = h.BuildTools;

switch(field)
  case 'ToolchainInfo'
    if isempty(lBuildTools)
        resp = [];
    else
        resp = lBuildTools.ToolchainInfo;
    end
  case 'BuilderClassName'
    resp = lBuildTools.BuilderClassName;
  case 'Alias'
    resp = lBuildTools.Alias;
  case 'BuildArtifact'
    resp = lBuildTools.BuildArtifact;
  case 'Platform'
    resp = lBuildTools.Platform;
  case 'SupportsBuildingMEXFuncs'
    resp = lBuildTools.SupportsBuildingMEXFuncs;
  case 'BuildVariant'
    resp = lBuildTools.BuildVariant;
  case 'BuildOpts'
    resp = lBuildTools.BuildOpts;
  case 'BuildActions'
    resp = lBuildTools.BuildActions;
  case 'IsToolchainInstalled'
    resp = lBuildTools.IsToolchainInstalled;
  otherwise
    assert(false, 'Unrecognized BuildTools property, %s', field);
end
