* with the precompile artifacts as input.
*/
public ArtifactSet invokeLinkForOnePermutation(TreeLogger logger,
StandardCompilationResult permResult, ArtifactSet permArtifacts)
throws UnableToCompleteException {
ArtifactSet workingArtifacts = new ArtifactSet(permArtifacts);
workingArtifacts.add(permResult);
for (Linker linker : linkers) {
if (linker.isShardable()) {
TreeLogger linkerLogger = logger.branch(TreeLogger.TRACE,
"Invoking Linker " + linker.getDescription(), null);
try {
workingArtifacts.freeze();
workingArtifacts = linker.link(logger, this, workingArtifacts, true);
} catch (Throwable e) {
linkerLogger.log(TreeLogger.ERROR, "Failed to link", e);
throw new UnableToCompleteException();
}
}
}
/*
* Reset linkers so that they don't accidentally carry any state across
* permutations
*/
resetLinkers(logger);
workingArtifacts.freeze();
return workingArtifacts;
}