-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Conversation
This change enables building libunwind and removes dependency on the libunwind package for all Unixes except OSX. In OSX the libunwind is part of the OS and also has support for compact unwind info that is OSX specific, so we keep using that one.
FYI: @eerhardt, @Petermarcu, @sergiy-k |
How often do we expect to have to take updates from the libunwind repo? I guess it would not be difficult since it is a verbatim copy of the tree. |
@danmosemsft I expect it to be infrequent. The library is very mature. It would be good to monitor the original repo for bug fixes and issues we care about (x86, x64, arm, arm64), but if things work, we can stay on the same version. |
Assuming all the testing has gone well, can we get this in today? |
Unless there are some issues with the code review, I don't see a problem with doing that. |
@janvorli I was trying to build Linux/arm coreclr with your changes using
|
@echesakovMSFT hmm I have not tried to build the cross components. I need to look into it. |
@echesakovMSFT I've fixed it, now the crosscomponents are building correctly. |
@eerhardt has found the release build on arm has a build error - using printf without declaration in one of the libunwind sources. I was testing only debug builds locally before. |
Great! I have added one more to the wish list https://github.com/dotnet/corefx/issues/28353 😄 |
fyi @omajid |
FWIW, I can't seem to build coreclr without |
I opened #17164 to make it possible to link against a system libunwind |
:mips-interest |
This change removes dependency on the libunwind for all Unixes except OSX by
including its sources in coreclr PAL.
In OSX the libunwind is part of the OS and also has support for compact unwind
info that is OSX specific, so we keep using that one.
The sources were taken from https://github.com/libunwind/libunwind/tree/v1.3-stable
We already have the license for it described in https://github.com/dotnet/coreclr/blob/master/THIRD-PARTY-NOTICES.TXT#L175-L198
There are two commits - one is just a pure copy of the original sources with added
changes in .gitignore that contained entries that were filtering out some files in the
libunwind (*_i.h pattern and x86/ folders).
The second commit enables building libunwind for all the architectures we support.
I have tested the build for x64 on Ubuntu, Alpine and FreeBSD. I've also tested
build for arm, arm64 and x86 on Ubuntu using cross build.
I've found a bug in the x86 code of the libunwind, but I'll leave the fix for later and
create an issue for it. While the fix looks trivial, it still needs to be tested.