Search in sources :

Example 1 with SystemLibraries

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);
}
Also used : EmptySystemLibraries(org.gradle.nativeplatform.toolchain.internal.EmptySystemLibraries) UnavailablePlatformToolProvider(org.gradle.nativeplatform.toolchain.internal.UnavailablePlatformToolProvider) ToolChainAvailability(org.gradle.platform.base.internal.toolchain.ToolChainAvailability) EmptySystemLibraries(org.gradle.nativeplatform.toolchain.internal.EmptySystemLibraries) SystemLibraries(org.gradle.nativeplatform.toolchain.internal.SystemLibraries) UnsupportedPlatformToolProvider(org.gradle.nativeplatform.toolchain.internal.UnsupportedPlatformToolProvider)

Aggregations

EmptySystemLibraries (org.gradle.nativeplatform.toolchain.internal.EmptySystemLibraries)1 SystemLibraries (org.gradle.nativeplatform.toolchain.internal.SystemLibraries)1 UnavailablePlatformToolProvider (org.gradle.nativeplatform.toolchain.internal.UnavailablePlatformToolProvider)1 UnsupportedPlatformToolProvider (org.gradle.nativeplatform.toolchain.internal.UnsupportedPlatformToolProvider)1 ToolChainAvailability (org.gradle.platform.base.internal.toolchain.ToolChainAvailability)1