Search in sources :

Example 6 with ToolProvider

use of com.facebook.buck.rules.ToolProvider in project buck by facebook.

the class RustBinaryDescription method findDepsForTargetFromConstructorArgs.

@Override
public Iterable<BuildTarget> findDepsForTargetFromConstructorArgs(BuildTarget buildTarget, CellPathResolver cellRoots, Arg constructorArg) {
    ImmutableSet.Builder<BuildTarget> deps = ImmutableSet.builder();
    ToolProvider compiler = rustBuckConfig.getRustCompiler();
    deps.addAll(compiler.getParseTimeDeps());
    deps.addAll(CxxPlatforms.getParseTimeDeps(cxxPlatforms.getValues()));
    deps.addAll(rustBuckConfig.getLinker().map(ToolProvider::getParseTimeDeps).orElse(ImmutableList.of()));
    return deps.build();
}
Also used : ToolProvider(com.facebook.buck.rules.ToolProvider) ImmutableSet(com.google.common.collect.ImmutableSet) BuildTarget(com.facebook.buck.model.BuildTarget)

Aggregations

ToolProvider (com.facebook.buck.rules.ToolProvider)6 ConstantToolProvider (com.facebook.buck.rules.ConstantToolProvider)4 Path (java.nio.file.Path)4 HashedFileTool (com.facebook.buck.rules.HashedFileTool)3 HumanReadableException (com.facebook.buck.util.HumanReadableException)3 BuildTarget (com.facebook.buck.model.BuildTarget)2 ImmutableSet (com.google.common.collect.ImmutableSet)2 CompilerProvider (com.facebook.buck.cxx.CompilerProvider)1 CxxPlatform (com.facebook.buck.cxx.CxxPlatform)1 CxxToolProvider (com.facebook.buck.cxx.CxxToolProvider)1 DefaultLinkerProvider (com.facebook.buck.cxx.DefaultLinkerProvider)1 GnuArchiver (com.facebook.buck.cxx.GnuArchiver)1 HeaderVerification (com.facebook.buck.cxx.HeaderVerification)1 MungingDebugPathSanitizer (com.facebook.buck.cxx.MungingDebugPathSanitizer)1 PosixNmSymbolNameTool (com.facebook.buck.cxx.PosixNmSymbolNameTool)1 PrefixMapDebugPathSanitizer (com.facebook.buck.cxx.PrefixMapDebugPathSanitizer)1 PreprocessorProvider (com.facebook.buck.cxx.PreprocessorProvider)1 VisibleForTesting (com.google.common.annotations.VisibleForTesting)1 ImmutableBiMap (com.google.common.collect.ImmutableBiMap)1 IOException (java.io.IOException)1