Skip to content

Commit

Permalink
Reduce scope of check
Browse files Browse the repository at this point in the history
  • Loading branch information
lhstrh committed Sep 29, 2024
1 parent 0e07fe3 commit 1431858
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -318,13 +318,15 @@ private boolean federatedExecutionIsSupported(Resource resource, LFGeneratorCont
.error("Federated LF programs with a C target are currently not supported on Windows.");
targetOK = false;
}
var platform = context.getTargetConfig().get(PlatformProperty.INSTANCE).platform();
if ((target.equals(Target.C) || target.equals(Target.CPP)) && !supportsFederated(platform)) {
if (target.equals(Target.C) || target.equals(Target.CCPP)) {
// Currently, only the C runtime has a platform abstraction.
messageReporter
.at(targetDecl)
.error("Federations are not supported by the " + platform.getcMakeName() + " platform.");
targetOK = false;
var platform = context.getTargetConfig().get(PlatformProperty.INSTANCE).platform();
if (!supportsFederated(platform)) {
messageReporter
.at(targetDecl)
.error("Federations are not supported by the " + platform.getcMakeName() + " platform.");
targetOK = false;
}
}

return targetOK;
Expand Down

0 comments on commit 1431858

Please sign in to comment.