public CppCompileActionBuilder setDotdFile(PathFragment outputName, String extension) {
   if (CppFileTypes.mustProduceDotdFile(outputName.toString())) {
     if (configuration.getFragment(CppConfiguration.class).getInmemoryDotdFiles()) {
       // Just set the path, no artifact is constructed
       PathFragment file = FileSystemUtils.replaceExtension(outputName, extension);
       Root root = configuration.getBinDirectory();
       dotdFile = new DotdFile(root.getExecPath().getRelative(file));
     } else {
       dotdFile = new DotdFile(ruleContext.getRelatedArtifact(outputName, extension));
     }
   } else {
     dotdFile = null;
   }
   return this;
 }
  /**
   * Returns the .dwo output file that matches the specified .o output file. If Fission mode isn't
   * enabled for this build, this is null (we don't produce .dwo files in that case).
   */
  private static Artifact getDwoFile(
      RuleContext ruleContext, Artifact outputFile, CppConfiguration cppConfiguration) {

    // Only create .dwo's for .o compilations (i.e. not .ii or .S).
    boolean isObjectOutput =
        CppFileTypes.OBJECT_FILE.matches(outputFile.getExecPath())
            || CppFileTypes.PIC_OBJECT_FILE.matches(outputFile.getExecPath());

    // Note configurations can be null for tests.
    if (cppConfiguration != null && cppConfiguration.useFission() && isObjectOutput) {
      return ruleContext.getRelatedArtifact(outputFile.getRootRelativePath(), ".dwo");
    } else {
      return null;
    }
  }
Exemple #3
0
 private Artifact getDwoFile(Artifact outputFile) {
   return ruleContext.getRelatedArtifact(outputFile.getRootRelativePath(), ".dwo");
 }
Exemple #4
0
 /** @return the pic header module artifact for the current target. */
 public Artifact getPicHeaderModule(Artifact moduleMapArtifact) {
   PathFragment objectDir = CppHelper.getObjDirectory(ruleContext.getLabel());
   PathFragment outputName =
       objectDir.getRelative(semantics.getEffectiveSourcePath(moduleMapArtifact));
   return ruleContext.getRelatedArtifact(outputName, ".pic.pcm");
 }
 /**
  * Returns the location of this target's extension plist which contains entries required by all
  * watch extensions (for final merging into the bundle plist).
  */
 public Artifact watchExtensionAutomaticPlist() {
   return ruleContext.getRelatedArtifact(
       ruleContext.getUniqueDirectory("plists"), "-automatic-watchExtensionInfo.plist");
 }
 private Artifact getGeneratedEnvironmentPlist() {
   return ruleContext.getRelatedArtifact(
       ruleContext.getUniqueDirectory("plists"), "-environment.plist");
 }
 private Artifact getGeneratedVersionPlist() {
   return ruleContext.getRelatedArtifact(
       ruleContext.getUniqueDirectory("plists"), "-version.plist");
 }
 private Artifact getGeneratedAutomaticPlist() {
   return ruleContext.getRelatedArtifact(
       ruleContext.getUniqueDirectory("plists"), "-automatic.plist");
 }
 private Artifact getLaunchStoryboardPlist() {
   return ruleContext.getRelatedArtifact(
       ruleContext.getUniqueDirectory("plists"), "-launchstoryboard.plist");
 }