-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add support for clang-cl and llvm-undname #4371
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
lib/compilers/clangcl.ts
Outdated
@@ -0,0 +1,72 @@ | |||
// Copyright (c) 2018, Compiler Explorer Authors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copyright header date is outdate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh funny - I just copied from clang.ts I think, didn't even reflect on the year :)
lib/demangler/win32-llvm.js
Outdated
@@ -0,0 +1,94 @@ | |||
// Copyright (c) 2018, Compiler Explorer Authors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
re cdecl: I was wondering if maybe fastcall would be the default, but that's not the case https://learn.microsoft.com/en-us/cpp/cpp/cdecl?view=msvc-170 - so removing cdecl should be ok |
the undname seems potentially quite intensive with a call for each mangled name it might be better to use the stdin option as suggested here? https://github.com/microsoft/checkedc-llvm/blob/master/tools/llvm-undname/llvm-undname.cpp#L59 |
You can set stdin by setting |
Thanks for the suggestion - it worked fine when I figured out that the |
Any additional feedback on this one? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one minor nitpick request, but other than that, it looks great! Thanks!
return 'win32-llvm'; | ||
} | ||
|
||
async execDemangler() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd love to have a test that ensures this works as expected so future changes to this can be made with some level of confidence :)
WOuld love to have the tests for the demanging at some point, but it's not a blocker. Merging now, thanks for your patience in this :) |
This is now live |
* Added llvm demangler code * Added clang-cl compiler class
* Added llvm demangler code * Added clang-cl compiler class
This PR adds support for clang-cl and llvm-undname.
This makes it possible to cross-compile from linux to windows with clang-cl and make it behave like msvc.
There is also a bugfix that fixes the parsing of
.cv_file
.Here is an example configuration for cross-compiling with clang-cl: