use of com.oracle.svm.core.graal.meta.SubstrateTargetDescription in project graal by oracle.
the class NativeImageGenerator method createTarget.
public static TargetDescription createTarget(Platform platform) {
if (includedIn(platform, Platform.AMD64.class)) {
Architecture architecture;
if (NativeImageOptions.NativeArchitecture.getValue()) {
architecture = GraalAccess.getOriginalTarget().arch;
} else {
EnumSet<AMD64.CPUFeature> features = EnumSet.noneOf(AMD64.CPUFeature.class);
// SSE and SSE2 are added by defaults as they are required by Graal
features.add(AMD64.CPUFeature.SSE);
features.add(AMD64.CPUFeature.SSE2);
features.addAll(parseCSVtoEnum(AMD64.CPUFeature.class, NativeImageOptions.CPUFeatures.getValue()));
architecture = new AMD64(features, SubstrateTargetDescription.allFlags());
}
assert architecture instanceof AMD64 : "SVM supports only AMD64 architectures.";
return new SubstrateTargetDescription(architecture, true, 16, 0, false);
} else {
throw UserError.abort("Architecture specified by platform is not supported: " + platform.getClass().getTypeName());
}
}
Aggregations