-
Notifications
You must be signed in to change notification settings - Fork 253
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
Support zstd-compressed ELF sections. #625
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,9 @@ miniz_oxide = { version = "0.7.0", default-features = false } | |
addr2line = { version = "0.22.0", default-features = false } | ||
libc = { version = "0.2.146", default-features = false } | ||
|
||
[target.'cfg(not(any(all(windows, target_env = "msvc", not(target_vendor = "uwp")), target_os = "illumos")))'.dependencies] | ||
zstd = { version = "= 0.13.0", default-features = false } | ||
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. Using the C implementation of zstd makes cross-compilation harder, especially for miri which currently is able to test for any supported target without installing any toolchain for the target. 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. Yes, I discussed that in the commit message. I could disable this for miri too. |
||
|
||
[target.'cfg(not(all(windows, target_env = "msvc", not(target_vendor = "uwp"))))'.dependencies.object] | ||
version = "0.35.0" | ||
default-features = false | ||
|
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.
Why is this dependency added for uwp?
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.
It's not. Unless I screwed something up that part of the condition is copied from the section above. What's new here is that illumos is excluded as well.
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.
The conditional evaluates as follows on x86_64-uwp-windows-msvc:
not(any(all(windows, target_env = "msvc", not(target_vendor = "uwp")), target_os = "illumos"))
any(all(windows, target_env = "msvc", not(target_vendor = "uwp")), target_os = "illumos")
all(windows, target_env = "msvc", not(target_vendor = "uwp"))
windows
target_env = "msvc"
not(target_vendor = "uwp")
target_vendor = "uwp"
target_os = "illumos"
So it will include zstd on x86_64-uwp-windows-msvc.
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.
Why is Windows included at all? Surely even gnu does not use elf sections due to the binary format being different on Windows?
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.
Sorry, you're right. This is what I get for commenting at 6:30 AM.
The uwp part was copied from the above section with miniz_oxide, addr2line, and libc. That exclusion was added in #543 without explanation.
The correct handling here would be for addr2line/libc to be gated on not using msvc (because mingw produces DWARF, not PDBs) and for miniz_oxide/zstd to be gated on not windows (because no Windows target uses ELF and these are for ELF compression).
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.
Ok I pushed a commit that cleans this up. Even if backtrace doesn't end up taking this PR it'll probably want something like that commit.