Skip to content

Commit

Permalink
Revert "[Bff] Move the build only dependencies to the target alias in…
Browse files Browse the repository at this point in the history
…stead of the prebuild of the node that outputs."

This can create issues with executables finishing to link before their
dependencies, especially with postbuild steps like unit-tests.

This reverts commit a184e66.
  • Loading branch information
belkiss committed Oct 5, 2021
1 parent e49edea commit 9ec1d18
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions Sharpmake.Generators/FastBuild/Bff.cs
Expand Up @@ -416,17 +416,18 @@ List<string> skipFiles
if (isExport)
continue;

string shortProjectName = GetShortProjectName(depProjConfig.Project, depProjConfig);

if (depProjConfig.Output != Project.Configuration.OutputType.Exe &&
depProjConfig.Output != Project.Configuration.OutputType.Utility)
{
string shortProjectName = GetShortProjectName(depProjConfig.Project, depProjConfig);
if (!dependenciesInfo.IgnoredLibraryNames.Contains(depProjConfig.TargetFileFullNameWithExtension))
fastBuildProjectDependencies.Add(shortProjectName + "_LibraryDependency");
fastBuildBuildOnlyDependencies.Add(shortProjectName);
}
else if (!depProjConfig.IsExcludedFromBuild)
{
fastBuildProjectExeUtilityDependencyList.Add(GetShortProjectName(depProjConfig.Project, depProjConfig));
}

if (!depProjConfig.IsExcludedFromBuild)
fastBuildProjectExeUtilityDependencyList.Add(shortProjectName);
}

orderedProjectDeps = UtilityMethods.GetOrderedFlattenedBuildOnlyDependencies(conf);
Expand All @@ -439,8 +440,15 @@ List<string> skipFiles
if (isExport)
continue;

string shortProjectName = GetShortProjectName(depProjConfig.Project, depProjConfig);
fastBuildProjectExeUtilityDependencyList.Add(shortProjectName);
if (depProjConfig.Output != Project.Configuration.OutputType.Exe &&
depProjConfig.Output != Project.Configuration.OutputType.Utility)
{
fastBuildBuildOnlyDependencies.Add(GetShortProjectName(depProjConfig.Project, depProjConfig));
}
else
{
fastBuildProjectExeUtilityDependencyList.Add(GetShortProjectName(depProjConfig.Project, depProjConfig));
}
}
}

Expand Down

0 comments on commit 9ec1d18

Please sign in to comment.