-
Notifications
You must be signed in to change notification settings - Fork 13.4k
More work on zstd
compression
#128935
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
Merged
Merged
More work on zstd
compression
#128935
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
5b37463
compiletest: implement `needs-lvm-zstd` directive
lqd 79f3c51
mark `rust-lld-compress-debug-sections` test as needing zstd
lqd 802222f
prepare test for expanding scope
lqd 1935e21
expand zstd debuginfo compression test
lqd 62c8c69
move and rename zstd script
lqd 7963bed
strip whitespace for ignored tests reason comments
lqd 650ba7f
enable `llvm.libzstd` on test x64 linux builder
lqd 5d83cb2
allow `llvm.libzstd` with `download-ci-llvm = true`
lqd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Checks debuginfo compression both for the always-enabled zlib, and when the optional zstd is | ||
// enabled: | ||
// - via rustc's `debuginfo-compression`, | ||
// - and via rust-lld's `compress-debug-sections` | ||
|
||
//@ needs-llvm-zstd: we want LLVM/LLD to be built with zstd support | ||
lqd marked this conversation as resolved.
Show resolved
Hide resolved
|
||
//@ needs-rust-lld: the system linker will most likely not support zstd | ||
//@ only-linux | ||
//@ ignore-cross-compile | ||
|
||
use run_make_support::{llvm_readobj, run_in_tmpdir, Rustc}; | ||
|
||
fn check_compression(compression: &str, to_find: &str) { | ||
// check compressed debug sections via rustc flag | ||
prepare_and_check(to_find, |rustc| { | ||
rustc.arg(&format!("-Zdebuginfo-compression={compression}")) | ||
}); | ||
|
||
// check compressed debug sections via rust-lld flag | ||
prepare_and_check(to_find, |rustc| { | ||
rustc.link_arg(&format!("-Wl,--compress-debug-sections={compression}")) | ||
}); | ||
} | ||
|
||
fn prepare_and_check<F: FnOnce(&mut Rustc) -> &mut Rustc>(to_find: &str, prepare_rustc: F) { | ||
run_in_tmpdir(|| { | ||
let mut rustc = Rustc::new(); | ||
rustc | ||
.arg("-Zlinker-features=+lld") | ||
.arg("-Clink-self-contained=+linker") | ||
.arg("-Zunstable-options") | ||
.arg("-Cdebuginfo=full") | ||
.input("main.rs"); | ||
prepare_rustc(&mut rustc).run(); | ||
llvm_readobj().arg("-t").arg("main").run().assert_stdout_contains(to_find); | ||
}); | ||
} | ||
|
||
fn main() { | ||
check_compression("zlib", "ZLIB"); | ||
check_compression("zstd", "ZSTD"); | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.