Search in sources :

Example 1 with Pair

use of com.facebook.buck.model.Pair in project buck by facebook.

the class AndroidNativeLibsPackageableGraphEnhancer method enhance.

public AndroidNativeLibsGraphEnhancementResult enhance(AndroidPackageableCollection packageableCollection) throws NoSuchBuildTargetException {
    @SuppressWarnings("PMD.PrematureDeclaration") AndroidNativeLibsGraphEnhancementResult.Builder resultBuilder = AndroidNativeLibsGraphEnhancementResult.builder();
    ImmutableMultimap<APKModule, NativeLinkable> nativeLinkables = packageableCollection.getNativeLinkables();
    ImmutableMultimap<APKModule, NativeLinkable> nativeLinkablesAssets = packageableCollection.getNativeLinkablesAssets();
    if (nativeLibraryMergeMap.isPresent() && !nativeLibraryMergeMap.get().isEmpty()) {
        NativeLibraryMergeEnhancementResult enhancement = NativeLibraryMergeEnhancer.enhance(cxxBuckConfig, ruleResolver, pathResolver, ruleFinder, buildRuleParams, nativePlatforms, nativeLibraryMergeMap.get(), nativeLibraryMergeGlue, nativeLinkables, nativeLinkablesAssets);
        nativeLinkables = enhancement.getMergedLinkables();
        nativeLinkablesAssets = enhancement.getMergedLinkablesAssets();
        resultBuilder.setSonameMergeMap(enhancement.getSonameMapping());
    }
    // Iterate over all the {@link AndroidNativeLinkable}s from the collector and grab the shared
    // libraries for all the {@link TargetCpuType}s that we care about.  We deposit them into a map
    // of CPU type and SONAME to the shared library path, which the {@link CopyNativeLibraries}
    // rule will use to compose the destination name.
    ImmutableMap.Builder<APKModule, CopyNativeLibraries> moduleMappedCopyNativeLibriesBuilder = ImmutableMap.builder();
    boolean hasCopyNativeLibraries = false;
    List<NdkCxxPlatform> platformsWithNativeLibs = new ArrayList<>();
    List<NdkCxxPlatform> platformsWithNativeLibsAssets = new ArrayList<>();
    // Make sure we process the root module last so that we know if any of the module contain
    // libraries that depend on a non-system runtime and add it to the root module if needed.
    ImmutableSet<APKModule> apkModules = FluentIterable.from(apkModuleGraph.getAPKModules()).filter(input -> !input.isRootModule()).append(apkModuleGraph.getRootAPKModule()).toSet();
    for (APKModule module : apkModules) {
        ImmutableMap.Builder<Pair<NdkCxxPlatforms.TargetCpuType, String>, SourcePath> nativeLinkableLibsBuilder = ImmutableMap.builder();
        ImmutableMap.Builder<Pair<NdkCxxPlatforms.TargetCpuType, String>, SourcePath> nativeLinkableLibsAssetsBuilder = ImmutableMap.builder();
        // TODO(andrewjcg): We currently treat an empty set of filters to mean to allow everything.
        // We should fix this by assigning a default list of CPU filters in the descriptions, but
        // until we do, if the set of filters is empty, just build for all available platforms.
        ImmutableSet<NdkCxxPlatforms.TargetCpuType> filters = cpuFilters.isEmpty() ? nativePlatforms.keySet() : cpuFilters;
        for (NdkCxxPlatforms.TargetCpuType targetCpuType : filters) {
            NdkCxxPlatform platform = Preconditions.checkNotNull(nativePlatforms.get(targetCpuType), "Unknown platform type " + targetCpuType.toString());
            // Populate nativeLinkableLibs and nativeLinkableLibsAssets with the appropriate entries.
            if (populateMapWithLinkables(nativeLinkables.get(module), nativeLinkableLibsBuilder, targetCpuType, platform) && !platformsWithNativeLibs.contains(platform)) {
                platformsWithNativeLibs.add(platform);
            }
            if (populateMapWithLinkables(nativeLinkablesAssets.get(module), nativeLinkableLibsAssetsBuilder, targetCpuType, platform) && !platformsWithNativeLibsAssets.contains(platform)) {
                platformsWithNativeLibsAssets.add(platform);
            }
            if (module.isRootModule()) {
                // If we're using a C/C++ runtime other than the system one, add it to the APK.
                NdkCxxPlatforms.CxxRuntime cxxRuntime = platform.getCxxRuntime();
                if ((platformsWithNativeLibs.contains(platform) || platformsWithNativeLibsAssets.contains(platform)) && !cxxRuntime.equals(NdkCxxPlatforms.CxxRuntime.SYSTEM)) {
                    nativeLinkableLibsBuilder.put(new Pair<>(targetCpuType, cxxRuntime.getSoname()), new PathSourcePath(buildRuleParams.getProjectFilesystem(), platform.getCxxSharedRuntimePath().get()));
                }
            }
        }
        ImmutableMap<Pair<NdkCxxPlatforms.TargetCpuType, String>, SourcePath> nativeLinkableLibs = nativeLinkableLibsBuilder.build();
        ImmutableMap<Pair<NdkCxxPlatforms.TargetCpuType, String>, SourcePath> nativeLinkableLibsAssets = nativeLinkableLibsAssetsBuilder.build();
        if (packageableCollection.getNativeLibsDirectories().get(module).isEmpty() && nativeLinkableLibs.isEmpty() && nativeLinkableLibsAssets.isEmpty()) {
            continue;
        }
        if (relinkerMode == RelinkerMode.ENABLED && (!nativeLinkableLibs.isEmpty() || !nativeLinkableLibsAssets.isEmpty())) {
            NativeRelinker relinker = new NativeRelinker(buildRuleParams.copyReplacingExtraDeps(Suppliers.ofInstance(ImmutableSortedSet.<BuildRule>naturalOrder().addAll(ruleFinder.filterBuildRuleInputs(nativeLinkableLibs.values())).addAll(ruleFinder.filterBuildRuleInputs(nativeLinkableLibsAssets.values())).build())), pathResolver, ruleFinder, cxxBuckConfig, nativePlatforms, nativeLinkableLibs, nativeLinkableLibsAssets);
            nativeLinkableLibs = relinker.getRelinkedLibs();
            nativeLinkableLibsAssets = relinker.getRelinkedLibsAssets();
            for (BuildRule rule : relinker.getRules()) {
                ruleResolver.addToIndex(rule);
            }
        }
        ImmutableMap<StripLinkable, StrippedObjectDescription> strippedLibsMap = generateStripRules(buildRuleParams, ruleFinder, ruleResolver, originalBuildTarget, nativePlatforms, nativeLinkableLibs);
        ImmutableMap<StripLinkable, StrippedObjectDescription> strippedLibsAssetsMap = generateStripRules(buildRuleParams, ruleFinder, ruleResolver, originalBuildTarget, nativePlatforms, nativeLinkableLibsAssets);
        ImmutableSortedSet<BuildRule> nativeLibsRules = BuildRules.toBuildRulesFor(originalBuildTarget, ruleResolver, packageableCollection.getNativeLibsTargets().get(module));
        BuildRuleParams paramsForCopyNativeLibraries = buildRuleParams.withAppendedFlavor(InternalFlavor.of(COPY_NATIVE_LIBS + "_" + module.getName())).copyReplacingDeclaredAndExtraDeps(Suppliers.ofInstance(ImmutableSortedSet.<BuildRule>naturalOrder().addAll(nativeLibsRules).addAll(ruleFinder.filterBuildRuleInputs(packageableCollection.getNativeLibsDirectories().get(module))).addAll(strippedLibsMap.keySet()).addAll(strippedLibsAssetsMap.keySet()).build()), Suppliers.ofInstance(ImmutableSortedSet.of()));
        moduleMappedCopyNativeLibriesBuilder.put(module, new CopyNativeLibraries(paramsForCopyNativeLibraries, ImmutableSet.copyOf(packageableCollection.getNativeLibsDirectories().get(module)), ImmutableSet.copyOf(strippedLibsMap.values()), ImmutableSet.copyOf(strippedLibsAssetsMap.values()), cpuFilters, module.getName()));
        hasCopyNativeLibraries = true;
    }
    return resultBuilder.setCopyNativeLibraries(hasCopyNativeLibraries ? Optional.of(moduleMappedCopyNativeLibriesBuilder.build()) : Optional.empty()).build();
}
Also used : NativeLinkable(com.facebook.buck.cxx.NativeLinkable) ArrayList(java.util.ArrayList) SourcePath(com.facebook.buck.rules.SourcePath) BuildTargetSourcePath(com.facebook.buck.rules.BuildTargetSourcePath) PathSourcePath(com.facebook.buck.rules.PathSourcePath) BuildRule(com.facebook.buck.rules.BuildRule) Pair(com.facebook.buck.model.Pair) PathSourcePath(com.facebook.buck.rules.PathSourcePath) NativeRelinker(com.facebook.buck.android.relinker.NativeRelinker) ImmutableMap(com.google.common.collect.ImmutableMap) BuildRuleParams(com.facebook.buck.rules.BuildRuleParams)

Example 2 with Pair

use of com.facebook.buck.model.Pair in project buck by facebook.

the class AppleTest method getTestCommand.

public Pair<ImmutableList<Step>, ExternalTestRunnerTestSpec> getTestCommand(ExecutionContext context, TestRunningOptions options, SourcePathResolver pathResolver, TestRule.TestReportingCallback testReportingCallback) {
    ImmutableList.Builder<Step> steps = ImmutableList.builder();
    ExternalTestRunnerTestSpec.Builder externalSpec = ExternalTestRunnerTestSpec.builder().setTarget(getBuildTarget()).setLabels(getLabels()).setContacts(getContacts());
    Path resolvedTestBundleDirectory = pathResolver.getAbsolutePath(Preconditions.checkNotNull(testBundle.getSourcePathToOutput()));
    Path pathToTestOutput = getProjectFilesystem().resolve(getPathToTestOutputDirectory());
    steps.add(new MakeCleanDirectoryStep(getProjectFilesystem(), pathToTestOutput));
    Path resolvedTestLogsPath = getProjectFilesystem().resolve(testLogsPath);
    steps.add(new MakeCleanDirectoryStep(getProjectFilesystem(), resolvedTestLogsPath));
    Path resolvedTestOutputPath = getProjectFilesystem().resolve(testOutputPath);
    Optional<Path> testHostAppPath = Optional.empty();
    if (testHostApp.isPresent()) {
        Path resolvedTestHostAppDirectory = pathResolver.getAbsolutePath(Preconditions.checkNotNull(testHostApp.get().getSourcePathToOutput()));
        testHostAppPath = Optional.of(resolvedTestHostAppDirectory.resolve(testHostApp.get().getUnzippedOutputFilePathToBinary()));
    }
    if (!useXctest) {
        if (!xctool.isPresent()) {
            throw new HumanReadableException("Set xctool_path = /path/to/xctool or xctool_zip_target = //path/to:xctool-zip " + "in the [apple] section of .buckconfig to run this test");
        }
        ImmutableSet.Builder<Path> logicTestPathsBuilder = ImmutableSet.builder();
        ImmutableMap.Builder<Path, Path> appTestPathsToHostAppsBuilder = ImmutableMap.builder();
        if (testHostAppPath.isPresent()) {
            appTestPathsToHostAppsBuilder.put(resolvedTestBundleDirectory, testHostAppPath.get());
        } else {
            logicTestPathsBuilder.add(resolvedTestBundleDirectory);
        }
        xctoolStdoutReader = Optional.of(new AppleTestXctoolStdoutReader(testReportingCallback));
        Optional<String> destinationSpecifierArg;
        if (!destinationSpecifier.get().isEmpty()) {
            destinationSpecifierArg = Optional.of(Joiner.on(',').join(Iterables.transform(destinationSpecifier.get().entrySet(), input -> input.getKey() + "=" + input.getValue())));
        } else {
            destinationSpecifierArg = defaultDestinationSpecifier;
        }
        Optional<String> snapshotReferenceImagesPath = Optional.empty();
        if (this.snapshotReferenceImagesPath.isPresent()) {
            if (this.snapshotReferenceImagesPath.get().isLeft()) {
                snapshotReferenceImagesPath = Optional.of(pathResolver.getAbsolutePath(this.snapshotReferenceImagesPath.get().getLeft()).toString());
            } else if (this.snapshotReferenceImagesPath.get().isRight()) {
                snapshotReferenceImagesPath = Optional.of(getProjectFilesystem().getPathForRelativePath(this.snapshotReferenceImagesPath.get().getRight()).toString());
            }
        }
        XctoolRunTestsStep xctoolStep = new XctoolRunTestsStep(getProjectFilesystem(), pathResolver.getAbsolutePath(xctool.get()), options.getEnvironmentOverrides(), xctoolStutterTimeout, platformName, destinationSpecifierArg, logicTestPathsBuilder.build(), appTestPathsToHostAppsBuilder.build(), resolvedTestOutputPath, xctoolStdoutReader, xcodeDeveloperDirSupplier, options.getTestSelectorList(), context.isDebugEnabled(), Optional.of(testLogDirectoryEnvironmentVariable), Optional.of(resolvedTestLogsPath), Optional.of(testLogLevelEnvironmentVariable), Optional.of(testLogLevel), testRuleTimeoutMs, snapshotReferenceImagesPath);
        steps.add(xctoolStep);
        externalSpec.setType("xctool-" + (testHostApp.isPresent() ? "application" : "logic"));
        externalSpec.setCommand(xctoolStep.getCommand());
        externalSpec.setEnv(xctoolStep.getEnv(context));
    } else {
        xctestOutputReader = Optional.of(new AppleTestXctestOutputReader(testReportingCallback));
        HashMap<String, String> environment = new HashMap<>();
        environment.putAll(xctest.getEnvironment(pathResolver));
        environment.putAll(options.getEnvironmentOverrides());
        if (testHostAppPath.isPresent()) {
            environment.put("XCInjectBundleInto", testHostAppPath.get().toString());
        }
        XctestRunTestsStep xctestStep = new XctestRunTestsStep(getProjectFilesystem(), ImmutableMap.copyOf(environment), xctest.getCommandPrefix(pathResolver), resolvedTestBundleDirectory, resolvedTestOutputPath, xctestOutputReader, xcodeDeveloperDirSupplier);
        steps.add(xctestStep);
        externalSpec.setType("xctest");
        externalSpec.setCommand(xctestStep.getCommand());
        externalSpec.setEnv(xctestStep.getEnv(context));
    }
    return new Pair<>(steps.build(), externalSpec.build());
}
Also used : Path(java.nio.file.Path) ForwardingBuildTargetSourcePath(com.facebook.buck.rules.ForwardingBuildTargetSourcePath) SourcePath(com.facebook.buck.rules.SourcePath) OptionalCompat(com.facebook.buck.util.OptionalCompat) HasRuntimeDeps(com.facebook.buck.rules.HasRuntimeDeps) SourcePathRuleFinder(com.facebook.buck.rules.SourcePathRuleFinder) TestCaseSummary(com.facebook.buck.test.TestCaseSummary) TestRunningOptions(com.facebook.buck.test.TestRunningOptions) TestResults(com.facebook.buck.test.TestResults) SourcePathResolver(com.facebook.buck.rules.SourcePathResolver) Pair(com.facebook.buck.model.Pair) TestRule(com.facebook.buck.rules.TestRule) BuildRuleParams(com.facebook.buck.rules.BuildRuleParams) Path(java.nio.file.Path) ImmutableSet(com.google.common.collect.ImmutableSet) AddToRuleKey(com.facebook.buck.rules.AddToRuleKey) ForwardingBuildTargetSourcePath(com.facebook.buck.rules.ForwardingBuildTargetSourcePath) ImmutableMap(com.google.common.collect.ImmutableMap) BuildableContext(com.facebook.buck.rules.BuildableContext) BuildTarget(com.facebook.buck.model.BuildTarget) StandardCharsets(java.nio.charset.StandardCharsets) AbstractBuildRule(com.facebook.buck.rules.AbstractBuildRule) List(java.util.List) Stream(java.util.stream.Stream) ExternalTestRunnerTestSpec(com.facebook.buck.rules.ExternalTestRunnerTestSpec) Optional(java.util.Optional) Joiner(com.google.common.base.Joiner) ExternalTestRunnerRule(com.facebook.buck.rules.ExternalTestRunnerRule) Iterables(com.google.common.collect.Iterables) Step(com.facebook.buck.step.Step) Supplier(com.google.common.base.Supplier) SourcePath(com.facebook.buck.rules.SourcePath) HashMap(java.util.HashMap) Callable(java.util.concurrent.Callable) Either(com.facebook.buck.model.Either) BuildRule(com.facebook.buck.rules.BuildRule) ExecutionContext(com.facebook.buck.step.ExecutionContext) Label(com.facebook.buck.rules.Label) Tool(com.facebook.buck.rules.Tool) ImmutableList(com.google.common.collect.ImmutableList) MoreCollectors(com.facebook.buck.util.MoreCollectors) MakeCleanDirectoryStep(com.facebook.buck.step.fs.MakeCleanDirectoryStep) Files(java.nio.file.Files) IOException(java.io.IOException) HumanReadableException(com.facebook.buck.util.HumanReadableException) InputStreamReader(java.io.InputStreamReader) BuildContext(com.facebook.buck.rules.BuildContext) Preconditions(com.google.common.base.Preconditions) BufferedReader(java.io.BufferedReader) BuildTargets(com.facebook.buck.model.BuildTargets) Collections(java.util.Collections) InputStream(java.io.InputStream) HashMap(java.util.HashMap) ImmutableList(com.google.common.collect.ImmutableList) Step(com.facebook.buck.step.Step) MakeCleanDirectoryStep(com.facebook.buck.step.fs.MakeCleanDirectoryStep) ImmutableMap(com.google.common.collect.ImmutableMap) ImmutableSet(com.google.common.collect.ImmutableSet) HumanReadableException(com.facebook.buck.util.HumanReadableException) MakeCleanDirectoryStep(com.facebook.buck.step.fs.MakeCleanDirectoryStep) ExternalTestRunnerTestSpec(com.facebook.buck.rules.ExternalTestRunnerTestSpec) Pair(com.facebook.buck.model.Pair)

Example 3 with Pair

use of com.facebook.buck.model.Pair in project buck by facebook.

the class AbstractPrebuiltCxxLibraryGroupDescription method getSharedLinkArgs.

/**
   * @return the link args formed from the user-provided shared link line after resolving library
   *         macro references.
   */
private Iterable<Arg> getSharedLinkArgs(BuildTarget target, ImmutableMap<String, SourcePath> libs, ImmutableList<String> args) {
    ImmutableList.Builder<Arg> builder = ImmutableList.builder();
    for (String arg : args) {
        Optional<Pair<String, String>> libRef = getLibRef(ImmutableSet.of(LIB_MACRO, REL_LIB_MACRO), arg);
        if (libRef.isPresent()) {
            SourcePath lib = libs.get(libRef.get().getSecond());
            if (lib == null) {
                throw new HumanReadableException("%s: library \"%s\" (in \"%s\") must refer to keys in the `sharedLibs` parameter", target, libRef.get().getSecond(), arg);
            }
            Arg libArg;
            if (libRef.get().getFirst().equals(LIB_MACRO)) {
                libArg = SourcePathArg.of(lib);
            } else if (libRef.get().getFirst().equals(REL_LIB_MACRO)) {
                if (!(lib instanceof PathSourcePath)) {
                    throw new HumanReadableException("%s: can only link prebuilt DSOs without sonames", target);
                }
                libArg = new RelativeLinkArg((PathSourcePath) lib);
            } else {
                throw new IllegalStateException();
            }
            builder.add(libArg);
        } else {
            builder.add(StringArg.of(arg));
        }
    }
    return builder.build();
}
Also used : SourcePath(com.facebook.buck.rules.SourcePath) PathSourcePath(com.facebook.buck.rules.PathSourcePath) ImmutableList(com.google.common.collect.ImmutableList) HumanReadableException(com.facebook.buck.util.HumanReadableException) SourcePathArg(com.facebook.buck.rules.args.SourcePathArg) StringArg(com.facebook.buck.rules.args.StringArg) Arg(com.facebook.buck.rules.args.Arg) PathSourcePath(com.facebook.buck.rules.PathSourcePath) Pair(com.facebook.buck.model.Pair)

Example 4 with Pair

use of com.facebook.buck.model.Pair in project buck by facebook.

the class AbstractElfDynamicSectionScrubberStep method execute.

@Override
public StepExecutionResult execute(ExecutionContext context) throws IOException {
    try (FileChannel channel = FileChannel.open(getFilesystem().resolve(getPath()), StandardOpenOption.READ, StandardOpenOption.WRITE)) {
        MappedByteBuffer buffer = channel.map(READ_WRITE, 0, channel.size());
        Elf elf = new Elf(buffer);
        Optional<ElfSection> section = elf.getSectionByName(SECTION).map(Pair::getSecond);
        if (!section.isPresent()) {
            throw new IOException(String.format("Error parsing ELF file %s: no such section \"%s\"", getPath(), SECTION));
        }
        for (ByteBuffer body = section.get().body; body.hasRemaining(); ) {
            ElfDynamicSection.DTag dTag = ElfDynamicSection.DTag.valueOf(elf.header.ei_class == ElfHeader.EIClass.ELFCLASS32 ? Elf.Elf32.getElf32Sword(body) : (int) Elf.Elf64.getElf64Sxword(body));
            if (!WHITELISTED_TAGS.contains(dTag)) {
                if (elf.header.ei_class == ElfHeader.EIClass.ELFCLASS32) {
                    // d_ptr
                    Elf.Elf32.putElf32Addr(body, 0);
                } else {
                    // d_ptr
                    Elf.Elf64.putElf64Addr(body, 0);
                }
            } else {
                if (elf.header.ei_class == ElfHeader.EIClass.ELFCLASS32) {
                    // d_ptr
                    Elf.Elf32.getElf32Addr(body);
                } else {
                    // d_ptr
                    Elf.Elf64.getElf64Addr(body);
                }
            }
        }
    }
    return StepExecutionResult.SUCCESS;
}
Also used : ElfDynamicSection(com.facebook.buck.cxx.elf.ElfDynamicSection) MappedByteBuffer(java.nio.MappedByteBuffer) FileChannel(java.nio.channels.FileChannel) IOException(java.io.IOException) ElfSection(com.facebook.buck.cxx.elf.ElfSection) ByteBuffer(java.nio.ByteBuffer) MappedByteBuffer(java.nio.MappedByteBuffer) Elf(com.facebook.buck.cxx.elf.Elf) Pair(com.facebook.buck.model.Pair)

Example 5 with Pair

use of com.facebook.buck.model.Pair in project buck by facebook.

the class AbstractElfSymbolTableScrubberStep method execute.

@Override
public StepExecutionResult execute(ExecutionContext context) throws IOException {
    try (FileChannel channel = FileChannel.open(getFilesystem().resolve(getPath()), StandardOpenOption.READ, StandardOpenOption.WRITE)) {
        MappedByteBuffer buffer = channel.map(READ_WRITE, 0, channel.size());
        Elf elf = new Elf(buffer);
        // Locate the symbol table section.
        Optional<ElfSection> section = elf.getSectionByName(getSection()).map(Pair::getSecond);
        if (!section.isPresent()) {
            if (isAllowMissing()) {
                return StepExecutionResult.SUCCESS;
            } else {
                throw new IOException(String.format("Error parsing ELF file %s: no such section \"%s\"", getPath(), getSection()));
            }
        }
        // Read in and fixup the symbol table then write it back out.
        ElfSymbolTable table = ElfSymbolTable.parse(elf.header.ei_class, section.get().body);
        ElfSymbolTable fixedUpTable = fixUpSymbolTable(table);
        Preconditions.checkState(table.entries.size() == fixedUpTable.entries.size());
        section.get().body.rewind();
        fixedUpTable.write(elf.header.ei_class, section.get().body);
    }
    return StepExecutionResult.SUCCESS;
}
Also used : ElfSymbolTable(com.facebook.buck.cxx.elf.ElfSymbolTable) MappedByteBuffer(java.nio.MappedByteBuffer) FileChannel(java.nio.channels.FileChannel) IOException(java.io.IOException) ElfSection(com.facebook.buck.cxx.elf.ElfSection) Elf(com.facebook.buck.cxx.elf.Elf) Pair(com.facebook.buck.model.Pair)

Aggregations

Pair (com.facebook.buck.model.Pair)32 Path (java.nio.file.Path)15 SourcePath (com.facebook.buck.rules.SourcePath)11 ImmutableMap (com.google.common.collect.ImmutableMap)10 BuildTarget (com.facebook.buck.model.BuildTarget)8 BuildRule (com.facebook.buck.rules.BuildRule)8 HumanReadableException (com.facebook.buck.util.HumanReadableException)8 Optional (java.util.Optional)8 ImmutableSet (com.google.common.collect.ImmutableSet)7 IOException (java.io.IOException)7 BuildRuleParams (com.facebook.buck.rules.BuildRuleParams)6 PathSourcePath (com.facebook.buck.rules.PathSourcePath)6 SourcePathRuleFinder (com.facebook.buck.rules.SourcePathRuleFinder)6 ImmutableList (com.google.common.collect.ImmutableList)6 Test (org.junit.Test)6 Flavor (com.facebook.buck.model.Flavor)5 SourcePathResolver (com.facebook.buck.rules.SourcePathResolver)5 ProjectFilesystem (com.facebook.buck.io.ProjectFilesystem)4 NoSuchBuildTargetException (com.facebook.buck.parser.NoSuchBuildTargetException)4 Elf (com.facebook.buck.cxx.elf.Elf)3