コード例 #1
0
 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;
 }
コード例 #2
0
  /**
   * 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;
    }
  }
コード例 #3
0
ファイル: CppModel.java プロジェクト: XClouded/bazel
 private Artifact getDwoFile(Artifact outputFile) {
   return ruleContext.getRelatedArtifact(outputFile.getRootRelativePath(), ".dwo");
 }
コード例 #4
0
ファイル: CppModel.java プロジェクト: XClouded/bazel
 /** @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");
 }
コード例 #5
0
 /**
  * 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");
 }
コード例 #6
0
 private Artifact getGeneratedEnvironmentPlist() {
   return ruleContext.getRelatedArtifact(
       ruleContext.getUniqueDirectory("plists"), "-environment.plist");
 }
コード例 #7
0
 private Artifact getGeneratedVersionPlist() {
   return ruleContext.getRelatedArtifact(
       ruleContext.getUniqueDirectory("plists"), "-version.plist");
 }
コード例 #8
0
 private Artifact getGeneratedAutomaticPlist() {
   return ruleContext.getRelatedArtifact(
       ruleContext.getUniqueDirectory("plists"), "-automatic.plist");
 }
コード例 #9
0
 private Artifact getLaunchStoryboardPlist() {
   return ruleContext.getRelatedArtifact(
       ruleContext.getUniqueDirectory("plists"), "-launchstoryboard.plist");
 }