mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 12:18:03 +02:00
LazBuild: Prevent exception when dependent packages fail and prog is halted. Issue #32340.
git-svn-id: trunk@55748 -
This commit is contained in:
parent
b5cc5adcef
commit
8e28624ed6
@ -785,25 +785,22 @@ var
|
||||
// apply options
|
||||
MainBuildBoss.SetBuildTargetProject1(true,smsfsSkip);
|
||||
|
||||
if not SkipDependencies then begin
|
||||
try
|
||||
if not SkipDependencies then
|
||||
begin
|
||||
// compile required packages
|
||||
CheckPackageGraphForCompilation(nil,Project1.FirstRequiredDependency);
|
||||
|
||||
PackageGraph.BeginUpdate(false);
|
||||
try
|
||||
// automatically compile required packages
|
||||
CompilePolicy:=pupAsNeeded;
|
||||
if BuildRecursive and BuildAll then
|
||||
CompilePolicy:=pupOnRebuildingAll;
|
||||
if PackageGraph.CompileRequiredPackages(nil,
|
||||
Project1.FirstRequiredDependency,
|
||||
not (pfUseDesignTimePackages in Project1.Flags),
|
||||
CompilePolicy)<>mrOk
|
||||
then
|
||||
Error(ErrorBuildFailed,'Project dependencies of '+AFilename);
|
||||
finally
|
||||
PackageGraph.EndUpdate;
|
||||
end;
|
||||
// automatically compile required packages
|
||||
CompilePolicy:=pupAsNeeded;
|
||||
if BuildRecursive and BuildAll then
|
||||
CompilePolicy:=pupOnRebuildingAll;
|
||||
if PackageGraph.CompileRequiredPackages(nil,
|
||||
Project1.FirstRequiredDependency,
|
||||
not (pfUseDesignTimePackages in Project1.Flags),
|
||||
CompilePolicy)<>mrOk
|
||||
then
|
||||
Error(ErrorBuildFailed,'Project dependencies of '+AFilename);
|
||||
end;
|
||||
|
||||
WorkingDir:=Project1.Directory;
|
||||
@ -895,6 +892,10 @@ var
|
||||
|
||||
// no need to check for mrOk, we are exit if it wasn't
|
||||
Result:=true;
|
||||
finally
|
||||
if not SkipDependencies then
|
||||
PackageGraph.EndUpdate;
|
||||
end;
|
||||
end;
|
||||
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user