diff options
author | 2015-09-02 20:33:46 +0000 | |
---|---|---|
committer | 2015-09-02 21:08:27 +0000 | |
commit | 4603a78b748d0cb74239a3bac6a52600bb4339f4 (patch) | |
tree | 5db3ed215191869a535fa3aa103b9978cf2ad813 /src/main/java/com/google/devtools/build/lib | |
parent | 3492d78d57b781af40579186905eb1b59f40de68 (diff) |
Fix ios debug symbol generation on Bazel.
--
MOS_MIGRATED_REVID=102175026
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java | 6 | ||||
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/objc/IntermediateArtifacts.java | 8 |
2 files changed, 9 insertions, 5 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 763b1de238..9fa16756ab 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 @@ -575,11 +575,15 @@ public final class CompilationSupport { // the debug symbol bundle, dsymutil will look inside the linked binary for the encoded // absolute paths to archive files, which are only valid in the link action. if (dsymBundle.isPresent()) { + PathFragment dsymPath = FileSystemUtils.removeExtension(dsymBundle.get().getExecPath()); commandLine .add("&&") .addPath(DSYMUTIL) .add(linkedBinary.getExecPathString()) - .addExecPath("-o", dsymBundle.get()); + .add("-o " + dsymPath) + .add("&& zipped_bundle=${PWD}/" + dsymBundle.get().getShellEscapedExecPathString()) + .add("&& cd " + dsymPath) + .add("&& /usr/bin/zip -q -r \"${zipped_bundle}\" ."); } return new SingleArgCommandLine(commandLine.build()); 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 5c46270b1f..0a1d3b9efd 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 @@ -31,10 +31,10 @@ import com.google.devtools.build.lib.vfs.PathFragment; final class IntermediateArtifacts { /** - * Extension used on the temporary dsym bundle location. Must end in {@code .dSYM} for dsymutil - * to generate a plist file. + * Extension used on the temporary zipped dsym bundle location. Must contain {@code .dSYM} for + * dsymutil to generate a plist file. */ - static final String TMP_DSYM_BUNDLE_SUFFIX = ".temp.app.dSYM"; + static final String TMP_DSYM_BUNDLE_SUFFIX = ".temp.app.dSYM.zip"; private final RuleContext ruleContext; private final String archiveFileNameSuffix; @@ -177,7 +177,7 @@ final class IntermediateArtifacts { } /** - * The debug symbol bundle file which contains debug symbols generated by dsymutil. + * The zipped debug symbol bundle file which contains debug symbols generated by dsymutil. */ public Artifact dsymBundle() { return appendExtension(TMP_DSYM_BUNDLE_SUFFIX); |