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 1406621 commit 4fc3f5f
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -318,12 +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 (!supportsFederated(platform)) {
messageReporter
.at(targetDecl)
.error("Federations are not supported by the " + platform.getcMakeName() + " platform.");
targetOK = false;
if (target.equals(Target.C) || target.equals(Target.CCPP)) {
// Currently, only the C runtime has a platform abstraction.
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 4fc3f5f

Please sign in to comment.