-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Fix CLR_CMAKE_USE_SYSTEM_LIBUNWIND on macOS #68116
Conversation
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
@Bo98, thank you for your contribution. Could you describe why are you passing |
Can definitely gate my passing to a Linux conditional if that's preferred. I was torn a bit between that and this. The reason I opted for this way because it makes more semantic sense, given the likes of: runtime/src/coreclr/pal/src/CMakeLists.txt Lines 1 to 4 in 9c9ebb9
and runtime/src/coreclr/pal/src/CMakeLists.txt Lines 19 to 20 in 9c9ebb9
The default probably should not be defined twice in two different places. Feels inconsistent to me but if that's intentional then that's fine. |
(It was also something that didn't used to be conditioned per OS: b9f273a - I missed that setting it manually isn't supported much anymore and auto-detection is preferred, apologies.) |
Your change looks alright; fixing this inconsistency is good. 🙂 I was mainly curious about the need of backporting to 6.0, since it is not a widespread issue and it is actually working as designed (the original need for this bailing option emerged from Linux distro package). Note that the copy of libunwind sources, that we have in this repo, has handful of carefully optimized tweaks to improve, enhance and even bugfix (in case of ARM architecutre) the runtime's interaction with stack unwinder on top of latest libunwind v1.6.2. We have upstreamed some of those tweaks back to https://github.com/libunwind/libunwind, but there are still a few patches not upstreamed yet. So compiling libunwind from the in-tree sources (i.e. build without In runtime repo, there are some (regular) dependencies like libkrb5, liblttng-ust and libicu which are needed from the system packages (or they are optional like libnuma). Then there are some dependencies which have sources in-tree (all these: https://github.com/dotnet/runtime/tree/e448104/src/native/external), which IMO are best to be compiled with the given runtime version / commit. (hint: there is a reason why the copy of those sources deemed necessary in first place). If there is a security issue which pops up, consider that as part of .NET release (not as a separate one), and wait for the patch issued from this repo. |
Yeah, to be clear: I'm in a package manager environment where libunwind is latest 1.6.2. I'll have a look further into the additional patches you are mentioning however (but as you say, upstreaming is definitely ideal where possible).
Fair enough. It's one of those things that worked in 5.0, but it definitely does not need backporting if it's not seen as important. |
We maintain the logs in the corresponding version files, e.g. https://github.com/dotnet/runtime/blob/e448104/src/native/external/libunwind-version.txt. |
Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov Issue DetailsOn macOS, If accepted, I'd like to request this change is backported to 6.0 since it affects that too.
|
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.
LGTM, thank you!
On macOS,
libunwind
does not exist, which causesfind_unwind_libs
to fail. macOS does not require any linker flags as libunwind exists in libSystem, which is implicitly linked.If accepted, I'd like to request this change is backported to 6.0 since it affects that too.