Page MenuHomePhabricator

Allow .dSYM's to be directly placed in an alternate directory
ClosedPublic

Authored by dsanders on Jul 24 2020, 5:26 PM.

Details

Summary

Once available in the relevant toolchains this will allow us to implement
LLVM_EXTERNALIZE_DEBUGINFO_OUTPUT_DIR after D84127 by directly placing the dSYM
in the desired location instead of emitting next to the output file and moving
it.

Diff Detail

Event Timeline

dsanders created this revision.Jul 24 2020, 5:26 PM
Herald added a project: Restricted Project. · View Herald Transcript
dsanders updated this revision to Diff 280653.Jul 24 2020, 7:50 PM

Attempt to fix the windows-specific failure by using posix-style path::append()

That feels wrong but it's consistent with a test in the same file that already
passes because the path manipulation is an extension append
(bar/foo->bar/foo.dSYM) rather than a path component append (external->external/foo.dSYM)

JDevlieghere added inline comments.Jul 27 2020, 9:39 AM
clang/include/clang/Driver/Options.td
705

Could we drop the external prefix or did you pick this for consistency with other flags? It seems rather specific for the externalize debug info scenario while the functionality seems generic enough by itself.

dsanders marked an inline comment as done.Jul 27 2020, 2:07 PM
dsanders added inline comments.
clang/include/clang/Driver/Options.td
705

Sure, I wasn't terribly keen on the name and I didn't find any precedent to work from

dsanders updated this revision to Diff 281376.Jul 28 2020, 3:09 PM

Remove external- prefix

This revision is now accepted and ready to land.Jul 29 2020, 9:16 AM
hctim added a subscriber: hctim.Aug 3 2020, 4:13 PM

Hi folks, looks like this patch broke check-clang under ASan/MSan, would you mind taking a look? Thanks.

FAIL: Clang :: Driver/darwin-dsymutil.c (6208 of 24675)
******************** TEST 'Clang :: Driver/darwin-dsymutil.c' FAILED ********************
Script:
--
: 'RUN: at line 3';   /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/clang -target x86_64-apple-darwin10 -ccc-print-phases    -arch i386 -arch x86_64 /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Driver/darwin-dsymutil.c -g 2> /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/tools/clang/test/Driver/Output/darwin-dsymutil.c.tmp
: 'RUN: at line 5';   /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/FileCheck -check-prefix=CHECK-MULTIARCH-ACTIONS < /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/tools/clang/test/Driver/Output/darwin-dsymutil.c.tmp /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Driver/darwin-dsymutil.c
: 'RUN: at line 18';   /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/clang -target x86_64-apple-darwin10 -ccc-print-bindings    -arch i386 -arch x86_64 /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Driver/darwin-dsymutil.c -g 2> /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/tools/clang/test/Driver/Output/darwin-dsymutil.c.tmp
: 'RUN: at line 20';   /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/FileCheck -check-prefix=CHECK-MULTIARCH-BINDINGS < /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/tools/clang/test/Driver/Output/darwin-dsymutil.c.tmp /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Driver/darwin-dsymutil.c
: 'RUN: at line 27';   /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/clang -target x86_64-apple-darwin10 -ccc-print-bindings    -o foo /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Driver/darwin-dsymutil.c -g 2> /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/tools/clang/test/Driver/Output/darwin-dsymutil.c.tmp
: 'RUN: at line 29';   /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/FileCheck -Doutfile=foo -Ddsymfile=foo.dSYM           -check-prefix=CHECK-OUTPUT-NAME < /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/tools/clang/test/Driver/Output/darwin-dsymutil.c.tmp /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Driver/darwin-dsymutil.c
: 'RUN: at line 32';   /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/clang -target x86_64-apple-darwin10 -ccc-print-bindings    -o bar/foo /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Driver/darwin-dsymutil.c -g 2> /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/tools/clang/test/Driver/Output/darwin-dsymutil.c.tmp
: 'RUN: at line 34';   /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/FileCheck -Doutfile=bar/foo -Ddsymfile=bar/foo.dSYM            -check-prefix=CHECK-OUTPUT-NAME < /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/tools/clang/test/Driver/Output/darwin-dsymutil.c.tmp /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Driver/darwin-dsymutil.c
: 'RUN: at line 37';   /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/clang -target x86_64-apple-darwin10 -ccc-print-bindings    -o bar/foo -dsym-dir external /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Driver/darwin-dsymutil.c -g 2> /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/tools/clang/test/Driver/Output/darwin-dsymutil.c.tmp
: 'RUN: at line 39';   /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/FileCheck -Doutfile=bar/foo -Ddsymfile=external/foo.dSYM            -check-prefix=CHECK-OUTPUT-NAME < /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/tools/clang/test/Driver/Output/darwin-dsymutil.c.tmp /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Driver/darwin-dsymutil.c
: 'RUN: at line 47';   touch /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/tools/clang/test/Driver/Output/darwin-dsymutil.c.tmp.o
: 'RUN: at line 48';   /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/clang -target x86_64-apple-darwin10 -ccc-print-bindings    -o foo /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/tools/clang/test/Driver/Output/darwin-dsymutil.c.tmp.o -g 2> /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/tools/clang/test/Driver/Output/darwin-dsymutil.c.tmp
: 'RUN: at line 50';   not grep "Dsymutil" /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/tools/clang/test/Driver/Output/darwin-dsymutil.c.tmp
: 'RUN: at line 53';   /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/clang -m32 -arch x86_64 -g /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Driver/darwin-dsymutil.c -###
--
Exit Code: 1

http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/44506