diff options
author | Googler <noreply@google.com> | 2018-07-11 09:12:07 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-07-11 09:13:21 -0700 |
commit | 29c43683db7dbcf437115bf46ae6fec723a9a29e (patch) | |
tree | b6a058346da23e798f68b5b9e35064a090283d28 /src/main/java/com/google/devtools/build/lib/rules/objc/IntermediateArtifacts.java | |
parent | 9b745a79653947c1830f906a12572d673420fecc (diff) |
Simplify dSYM handling
- Previously we would zip the output of dsymutil and then proceed to unzip it.
Due to the size of dSYM files, this could add a few seconds to all builds
with dSYMs.
- There's no need to have a DsymOutputType or even Info.plist as all we need
is the DWARF symbol file; the dSYM is repackaged later on by the bundler.
This change is synchronized with the CROSSTOOL and wrapped_clang via the
`no_dsym_create_zip` feature, which Bazel sets on the CROSSTOOL to inform
wrapped_clang that no zip file should be created for the dSYM.
PiperOrigin-RevId: 204134986
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.java | 42 |
1 files changed, 15 insertions, 27 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 4502556589..90b4695037 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 @@ -34,13 +34,6 @@ import com.google.devtools.build.lib.vfs.PathFragment; public final class IntermediateArtifacts { static final String LINKMAP_SUFFIX = ".linkmap"; - /** - * Extension used for the zip archive containing dsym files and their associated plist. Note that - * the archive's path less this extension corresponds to the expected directory for dsym files - * relative to their binary. - */ - static final String DSYM_ZIP_EXTENSION = ".temp.zip"; - private final RuleContext ruleContext; private final BuildConfiguration buildConfiguration; private final String archiveFileNameSuffix; @@ -322,36 +315,31 @@ public final class IntermediateArtifacts { } /** - * The temp zipped debug symbol bundle file which contains debug symbols generated by dsymutil. - */ - public Artifact tempDsymBundleZip(DsymOutputType dsymOutputType) { - return appendExtension(dsymOutputType.getSuffix() + DSYM_ZIP_EXTENSION); - } - - /** - * Debug symbol plist generated for a linked binary. + * Debug symbol file generated for a stripped linked binary. + * + * <p>The name of the debug symbol file matches that of stripped binary plus that of the debug + * symbol file extension (.dwarf), so we must know if the binary has been stripped + * or not as that will modify its name. */ - public Artifact dsymPlist(DsymOutputType dsymOutputType) { - return appendExtension(String.format("%s/Contents/Info.plist", dsymOutputType.getSuffix())); + public Artifact dsymSymbolForStrippedBinary() { + return dsymSymbol("bin"); } /** - * Debug symbol file generated for a linked binary. + * Debug symbol file generated for an unstripped linked binary. + * + * <p>The name of the debug symbol file matches that of unstripped binary plus that of the debug + * symbol file extension (.dwarf). */ - public Artifact dsymSymbol(DsymOutputType dsymOutputType) { - return dsymSymbol(dsymOutputType, "bin"); + public Artifact dsymSymbolForUnstrippedBinary() { + return dsymSymbol("bin_unstripped"); } /** * Debug symbol file generated for a linked binary, for a specific architecture. */ - public Artifact dsymSymbol(DsymOutputType dsymOutputType, String suffix) { - return appendExtension( - String.format( - "%s/Contents/Resources/DWARF/%s_%s", - dsymOutputType.getSuffix(), - ruleContext.getLabel().getName(), - suffix)); + private Artifact dsymSymbol(String suffix) { + return appendExtension(String.format("_%s.dwarf", suffix)); } /** Bitcode symbol map generated for a linked binary, for a specific architecture. */ |