aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcConfiguration.java
diff options
context:
space:
mode:
authorGravatar Daniel Wagner-Hall <danielwh@google.com>2015-03-20 04:22:01 +0000
committerGravatar Han-Wen Nienhuys <hanwen@google.com>2015-03-20 14:37:44 +0000
commitf1aa9876604e3385094c2a795912cb43ddac9dd5 (patch)
tree440261c2224e8d026f11d1dd4bb58f56c393d8e5 /src/main/java/com/google/devtools/build/lib/rules/objc/ObjcConfiguration.java
parent48670f8e64d32be460f8567a0b9f5754844e7d90 (diff)
objc: Only load dump_syms if we're actually going to use it
-- MOS_MIGRATED_REVID=89095609
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/objc/ObjcConfiguration.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/objc/ObjcConfiguration.java17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcConfiguration.java b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcConfiguration.java
index 9b8167745b..f032ee3e83 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcConfiguration.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcConfiguration.java
@@ -59,18 +59,20 @@ public class ObjcConfiguration extends BuildConfiguration.Fragment {
private final List<String> iosMultiCpus;
private final String iosSplitCpu;
- // We only load this label if coverage mode is enabled. That is know as part of the
+ // We only load these labels if the mode which uses them is enabled. That is know as part of the
// BuildConfiguration. This label needs to be part of a configuration because only configurations
// can conditionally cause loading.
- // This is referenced from a late bound attribute, and if loading wasn't forced in a
+ // They are referenced from late bound attributes, and if loading wasn't forced in a
// configuration, the late bound attribute will fail to be initialized because it hasn't been
// loaded.
@Nullable private final Label gcovLabel;
+ @Nullable private final Label dumpSymsLabel;
ObjcConfiguration(
ObjcCommandLineOptions objcOptions,
BuildConfiguration.Options options,
- @Nullable Label gcovLabel) {
+ @Nullable Label gcovLabel,
+ @Nullable Label dumpSymsLabel) {
this.iosSdkVersion = Preconditions.checkNotNull(objcOptions.iosSdkVersion, "iosSdkVersion");
this.iosMinimumOs = Preconditions.checkNotNull(objcOptions.iosMinimumOs, "iosMinimumOs");
this.iosSimulatorDevice =
@@ -84,6 +86,7 @@ public class ObjcConfiguration extends BuildConfiguration.Fragment {
this.copts = ImmutableList.copyOf(objcOptions.copts);
this.compilationMode = Preconditions.checkNotNull(options.compilationMode, "compilationMode");
this.gcovLabel = gcovLabel;
+ this.dumpSymsLabel = dumpSymsLabel;
this.iosMultiCpus = Preconditions.checkNotNull(objcOptions.iosMultiCpus, "iosMultiCpus");
this.iosSplitCpu = Preconditions.checkNotNull(objcOptions.iosSplitCpu, "iosSplitCpu");
}
@@ -172,6 +175,14 @@ public class ObjcConfiguration extends BuildConfiguration.Fragment {
}
/**
+ * Returns the label of the dump_syms binary, used to get debug symbols from a binary. Null iff
+ * !{@link #generateDebugSymbols}.
+ */
+ @Nullable public Label getDumpSymsLabel() {
+ return dumpSymsLabel;
+ }
+
+ /**
* List of all CPUs that this invocation is being built for. Different from {@link #getIosCpu()}
* which is the specific CPU <b>this target</b> is being built for.
*/