aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/objc/IntermediateArtifacts.java
diff options
context:
space:
mode:
authorGravatar Chris Parsons <cparsons@google.com>2015-08-25 14:16:48 +0000
committerGravatar Lukacs Berki <lberki@google.com>2015-08-26 07:38:00 +0000
commit498ef53f9b36230adce79a64f1237ab3971ae54c (patch)
tree14c9ac05a16b6dc6d8ff023699cbd34293d7defb /src/main/java/com/google/devtools/build/lib/rules/objc/IntermediateArtifacts.java
parent709bc61850f031a08c602c653598e9c409c96856 (diff)
Link to tools/objc/dummy.c from output directory to allow xcodeproj to resolve the file even while outside a workspace which contains it
-- MOS_MIGRATED_REVID=101462428
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/objc/IntermediateArtifacts.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/objc/IntermediateArtifacts.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/IntermediateArtifacts.java b/src/main/java/com/google/devtools/build/lib/rules/objc/IntermediateArtifacts.java
index 754adc96fd..5c46270b1f 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/objc/IntermediateArtifacts.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/objc/IntermediateArtifacts.java
@@ -17,6 +17,7 @@ package com.google.devtools.build.lib.rules.objc;
import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
import com.google.devtools.build.lib.actions.Artifact;
+import com.google.devtools.build.lib.analysis.RuleConfiguredTarget.Mode;
import com.google.devtools.build.lib.analysis.RuleContext;
import com.google.devtools.build.lib.syntax.Label;
import com.google.devtools.build.lib.vfs.FileSystemUtils;
@@ -74,6 +75,15 @@ final class IntermediateArtifacts {
}
/**
+ * A dummy .c file to be included in xcode projects. This is needed if the target does not have
+ * any source files but Xcode requires one.
+ */
+ public Artifact dummySource() {
+ return scopedArtifact(
+ ruleContext.getPrerequisiteArtifact("$dummy_source", Mode.TARGET).getRootRelativePath());
+ }
+
+ /**
* The output of using {@code actoolzip} to run {@code actool} for a given bundle which is
* merged under the {@code .app} or {@code .bundle} directory root.
*/