function lConfigChecksum = getCompileConfigChecksum...
(lBuildConfiguration, lBuildVariant, lToolchainInfo, lTMFProperties, ...
lBuildArgKeys, lBuildArgValues, lCompileFlags, lMakeArgs)
%getCompileConfigChecksum

%Copyright 2019-2020 The MathWorks, Inc.

if isempty(lTMFProperties)
tmfChecksum = [];
else
tmfChecksum = lTMFProperties.TMFChecksum;
end

if ~isempty(lToolchainInfo)
lToolchainName = lToolchainInfo.Name;
else
lToolchainName = '';
end

lBuildArgs = [lBuildArgKeys(:) lBuildArgValues(:)];

lConfigChecksum = struct ...
('BuildConfiguration', {lBuildConfiguration}, ...
'BuildVariant', {lBuildVariant}, ...
'ToolchainName', {lToolchainName}, ...
'TemplateMakefile', {tmfChecksum}, ...
'BuildArgs', {lBuildArgs},...
'CompileFlags', {lCompileFlags}, ...
'MakeArgs', {lMakeArgs});