use of org.gradle.nativeplatform.toolchain.internal.SystemLibraries in project gradle by gradle.
the class VisualCppToolChain method select.
@Override
public PlatformToolProvider select(NativePlatformInternal targetPlatform) {
ToolChainAvailability result = new ToolChainAvailability();
result.mustBeAvailable(getAvailability());
if (!result.isAvailable()) {
return new UnavailablePlatformToolProvider(targetPlatform.getOperatingSystem(), result);
}
VisualCpp platformVisualCpp = visualCpp == null ? null : visualCpp.forPlatform(targetPlatform);
if (platformVisualCpp == null) {
return new UnsupportedPlatformToolProvider(targetPlatform.getOperatingSystem(), String.format("Don't know how to build for %s.", targetPlatform.getDisplayName()));
}
WindowsSdk platformSdk = windowsSdk.forPlatform(targetPlatform);
SystemLibraries cRuntime = ucrt == null ? new EmptySystemLibraries() : ucrt.getCRuntime(targetPlatform);
DefaultVisualCppPlatformToolChain configurableToolChain = instantiator.newInstance(DefaultVisualCppPlatformToolChain.class, targetPlatform, instantiator);
configureActions.execute(configurableToolChain);
return new VisualCppPlatformToolProvider(buildOperationExecutor, targetPlatform.getOperatingSystem(), configurableToolChain.tools, visualStudio, platformVisualCpp, platformSdk, cRuntime, execActionFactory, compilerOutputFileNamingSchemeFactory, workerLeaseService);
}
Aggregations