function clearSharedLibLinkFlags(varargin)
% Clears the link flags from shared library.

%   Copyright 2022 The MathWorks, Inc.

fileGenCfg = Simulink.fileGenControl('getConfig');
if isequal(fileGenCfg.CodeGenFolderStructure, Simulink.filegen.CodeGenFolderStructure.ModelSpecific)
    sharedUtilsFolder = fullfile(fileGenCfg.CodeGenFolder,'slprj','ert','_sharedutils');
else
    sharedUtilsFolder = fullfile(fileGenCfg.CodeGenFolder,'TIC2000','_shared');
end
buildInfoMatFile = fullfile(sharedUtilsFolder,'buildInfo.mat');
if isfile(buildInfoMatFile)
    % Remove all linker options: empty out LinkFlags
    delete(buildInfoMatFile);
end
end
