aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java37
1 files changed, 8 insertions, 29 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java b/src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java
index 8036821b7f..002d980837 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java
@@ -89,7 +89,6 @@ import com.google.devtools.build.lib.rules.test.InstrumentedFilesCollector;
import com.google.devtools.build.lib.rules.test.InstrumentedFilesCollector.InstrumentationSpec;
import com.google.devtools.build.lib.rules.test.InstrumentedFilesCollector.LocalMetadataCollector;
import com.google.devtools.build.lib.rules.test.InstrumentedFilesProvider;
-import com.google.devtools.build.lib.shell.ShellUtils;
import com.google.devtools.build.lib.util.FileTypeSet;
import com.google.devtools.build.lib.util.Preconditions;
import com.google.devtools.build.lib.vfs.FileSystemUtils;
@@ -649,7 +648,7 @@ public final class CompilationSupport {
.add("-enable-objc-interop")
.add(objcConfiguration.getSwiftCoptsForCompilationMode());
- if (objcConfiguration.generateDebugSymbols() || objcConfiguration.generateDsym()) {
+ if (objcConfiguration.generateDsym()) {
commandLine.add("-g");
}
@@ -731,7 +730,7 @@ public final class CompilationSupport {
.add("-target").add(swiftTarget(appleConfiguration))
.add(objcConfiguration.getSwiftCoptsForCompilationMode());
- if (objcConfiguration.generateDebugSymbols() || objcConfiguration.generateDsym()) {
+ if (objcConfiguration.generateDsym()) {
commandLine.add("-g");
}
@@ -881,8 +880,8 @@ public final class CompilationSupport {
/**
* Registers any actions necessary to link this rule and its dependencies.
*
- * <p>Dsym bundle and breakpad files are generated if
- * {@link ObjcConfiguration#generateDebugSymbols()} is set.
+ * <p>Dsym bundle is generated if
+ * {@link ObjcConfiguration#generateDsym()} is set.
*
* <p>When Bazel flags {@code --compilation_mode=opt} and {@code --objc_enable_binary_stripping}
* are specified, additional optimizations will be performed on the linked binary: all-symbol
@@ -907,13 +906,9 @@ public final class CompilationSupport {
DsymOutputType dsymOutputType) {
Optional<Artifact> dsymBundleZip;
Optional<Artifact> linkmap;
- if (objcConfiguration.generateDebugSymbols() || objcConfiguration.generateDsym()) {
+ if (objcConfiguration.generateDsym()) {
registerDsymActions(dsymOutputType);
dsymBundleZip = Optional.of(intermediateArtifacts.tempDsymBundleZip(dsymOutputType));
-
- if (objcConfiguration.generateDebugSymbols()) {
- registerBreakpadAction(intermediateArtifacts.dsymSymbol(dsymOutputType));
- }
} else {
dsymBundleZip = Optional.absent();
}
@@ -1013,7 +1008,7 @@ public final class CompilationSupport {
// When compilation_mode=opt and objc_enable_binary_stripping are specified, the unstripped
// binary containing debug symbols is generated by the linker, which also needs the debug
// symbols for dead-code removal. The binary is also used to generate dSYM bundle if
- // --objc_generate_debug_symbol is specified. A symbol strip action is later registered to strip
+ // --apple_generate_dsym is specified. A symbol strip action is later registered to strip
// the symbol table from the unstripped binary.
Artifact binaryToLink =
objcConfiguration.shouldStripBinary()
@@ -1491,23 +1486,6 @@ public final class CompilationSupport {
return this;
}
- private void registerBreakpadAction(Artifact debugSymbolFile) {
- Artifact dumpsyms = ruleContext.getPrerequisiteArtifact("$dumpsyms", Mode.HOST);
- Artifact breakpadFile = intermediateArtifacts.breakpadSym();
- ruleContext.registerAction(ObjcRuleClasses.spawnOnDarwinActionBuilder()
- .setMnemonic("GenBreakpad")
- .setProgressMessage("Generating breakpad file: " + ruleContext.getLabel())
- .setShellCommand(ImmutableList.of("/bin/bash", "-c"))
- .addInput(dumpsyms)
- .addInput(debugSymbolFile)
- .addArgument(String.format("%s %s > %s",
- ShellUtils.shellEscape(dumpsyms.getExecPathString()),
- ShellUtils.shellEscape(debugSymbolFile.getExecPathString()),
- ShellUtils.shellEscape(breakpadFile.getExecPathString())))
- .addOutput(breakpadFile)
- .build(ruleContext));
- }
-
private PathFragment removeSuffix(PathFragment path, String suffix) {
String name = path.getBaseName();
Preconditions.checkArgument(
@@ -1592,7 +1570,8 @@ public final class CompilationSupport {
default:
throw new IllegalArgumentException("Unhandled platform " + platform);
}
- if (objcConfiguration.generateDebugSymbols() || objcConfiguration.generateDsym()) {
+
+ if (objcConfiguration.generateDsym()) {
builder.add("-g");
}