-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[InstallAPI] Add support for parsing dSYMs #86852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
set(LLVM_LINK_COMPONENTS | ||
Support | ||
TextAPI | ||
TextAPIBinaryReader | ||
Demangle | ||
Core | ||
) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
; REQUIRES: system-darwin | ||
|
||
; RUN: rm -rf %t | ||
; RUN: split-file %s %t | ||
|
||
// Build a simple dylib with debug info. | ||
; RUN: %clang --target=arm64-apple-macos13 -g -dynamiclib %t/foo.c \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @JDevlieghere Is there a better/known practice for generating full dylibs with debug info for tests? Hopefully, PR CI will let me know, but I'm a little worried about different linker semantics. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like the linker on the linux bot doesn't support building Darwin anyway
Perhaps I'll require Darwin env to run the test and then I won't need to introduce a |
||
; RUN: -current_version 1 -compatibility_version 1 -L%t/usr/lib \ | ||
; RUN: -save-temps \ | ||
; RUN: -o %t/foo.dylib -install_name %t/foo.dylib | ||
; RUN: dsymutil %t/foo.dylib -o %t/foo.dSYM | ||
|
||
; RUN: not clang-installapi -x c++ --target=arm64-apple-macos13 \ | ||
; RUN: -install_name %t/foo.dylib \ | ||
; RUN: -current_version 1 -compatibility_version 1 \ | ||
; RUN: -o %t/output.tbd \ | ||
; RUN: --verify-against=%t/foo.dylib --dsym=%t/foo.dSYM \ | ||
; RUN: --verify-mode=Pedantic 2>&1 | FileCheck %s | ||
|
||
; CHECK: violations found for arm64 | ||
; CHECK: foo.c:5:0: error: no declaration found for exported symbol 'bar' in dynamic library | ||
; CHECK: foo.c:1:0: error: no declaration found for exported symbol 'foo' in dynamic library | ||
|
||
;--- foo.c | ||
int foo(void) { | ||
return 1; | ||
} | ||
extern char bar; | ||
char bar = 'a'; | ||
|
||
;--- usr/lib/libSystem.tbd | ||
{ | ||
"main_library": { | ||
"install_names": [ | ||
{"name": "/usr/lib/libSystem.B.dylib"} | ||
], | ||
"target_info": [ | ||
{"target": "arm64-macos"} | ||
] | ||
}, | ||
"tapi_tbd_version": 5 | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.