}
@TaskAction
public void compile(IncrementalTaskInputs inputs) {
NativeCompileSpec spec = createCompileSpec();
spec.setTargetPlatform(targetPlatform);
spec.setTempDir(getTemporaryDir());
spec.setObjectFileDir(getObjectFileDir());
spec.include(getIncludes());
spec.source(getSource());
spec.setMacros(getMacros());
spec.args(getCompilerArgs());
spec.setPositionIndependentCode(isPositionIndependentCode());
spec.setIncrementalCompile(inputs.isIncremental());
PlatformToolProvider platformToolProvider = toolChain.select(targetPlatform);
WorkResult result = getIncrementalCompilerBuilder().createIncrementalCompiler(this, platformToolProvider.newCompiler(spec), toolChain).execute(spec);
setDidWork(result.getDidWork());