/** * Adds any files to the given nested set builder that should be built if this application is the * top level target in a blaze invocation. * * @return this application support * @throws InterruptedException */ ReleaseBundlingSupport addFilesToBuild(NestedSetBuilder<Artifact> filesToBuild) throws InterruptedException { NestedSetBuilder<Artifact> debugSymbolBuilder = NestedSetBuilder.<Artifact>stableOrder() .addTransitive(objcProvider.get(ObjcProvider.DEBUG_SYMBOLS)); for (Artifact breakpadFile : getBreakpadFiles().values()) { filesToBuild.add(breakpadFile); } if (linkedBinary == LinkedBinary.LOCAL_AND_DEPENDENCIES && ObjcRuleClasses.objcConfiguration(ruleContext).generateDebugSymbols()) { IntermediateArtifacts intermediateArtifacts = ObjcRuleClasses.intermediateArtifacts(ruleContext); debugSymbolBuilder .add(intermediateArtifacts.dsymPlist()) .add(intermediateArtifacts.dsymSymbol()) .add(intermediateArtifacts.breakpadSym()); } filesToBuild .add(ruleContext.getImplicitOutputArtifact(ReleaseBundlingSupport.IPA)) // TODO(bazel-team): Fat binaries may require some merging of these file rather than just // making them available. .addTransitive(debugSymbolBuilder.build()); return this; }
/** * Returns a map of input breakpad artifacts from the CPU-specific binaries built for this * ios_application to the new output breakpad artifacts. */ private ImmutableMap<Artifact, Artifact> getBreakpadFiles() { ImmutableMap.Builder<Artifact, Artifact> results = ImmutableMap.builder(); for (Entry<String, Artifact> breakpadFile : attributes.cpuSpecificBreakpadFiles().entrySet()) { Artifact destBreakpad = intermediateArtifacts.breakpadSym(breakpadFile.getKey()); results.put(breakpadFile.getValue(), destBreakpad); } return results.build(); }