3 files changed +36
-15
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ run-make/cdylib-fewer-symbols/Makefile
13
13
run-make/compiler-lookup-paths-2/Makefile
14
14
run-make/compiler-lookup-paths/Makefile
15
15
run-make/compiler-rt-works-on-mingw/Makefile
16
- run-make/compressed-debuginfo/Makefile
17
16
run-make/crate-hash-rustc-version/Makefile
18
17
run-make/crate-name-priority/Makefile
19
18
run-make/cross-lang-lto-clang/Makefile
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ // Checks the `debuginfo-compression` option.
2
+
3
+ //@ only-linux
4
+ //@ ignore-cross-compile
5
+
6
+ // FIXME: This test isn't comprehensive and isn't covering all possible combinations.
7
+
8
+ use run_make_support:: { assert_contains, cmd, run_in_tmpdir, rustc} ;
9
+
10
+ fn check_compression ( compression : & str , to_find : & str ) {
11
+ run_in_tmpdir ( || {
12
+ let out = rustc ( )
13
+ . crate_name ( "foo" )
14
+ . crate_type ( "lib" )
15
+ . emit ( "obj" )
16
+ . arg ( "-Cdebuginfo=full" )
17
+ . arg ( & format ! ( "-Zdebuginfo-compression={compression}" ) )
18
+ . input ( "foo.rs" )
19
+ . run ( ) ;
20
+ let stderr = out. stderr_utf8 ( ) ;
21
+ if stderr. is_empty ( ) {
22
+ // FIXME: `readelf` might need to be replaced with `llvm-readelf`.
23
+ cmd ( "readelf" ) . arg ( "-t" ) . arg ( "foo.o" ) . run ( ) . assert_stdout_contains ( to_find) ;
24
+ } else {
25
+ assert_contains (
26
+ & stderr,
27
+ & format ! ( "unknown debuginfo compression algorithm {compression}" ) ,
28
+ ) ;
29
+ }
30
+ } ) ;
31
+ }
32
+
33
+ fn main ( ) {
34
+ check_compression ( "zlib" , "ZLIB" ) ;
35
+ check_compression ( "zstd" , "ZSTD" ) ;
36
+ }
0 commit comments