diff options
| author | Augie Fackler <augie@google.com> | 2023-09-08 11:30:24 -0400 |
|---|---|---|
| committer | Augie Fackler <augie@google.com> | 2023-09-08 11:30:24 -0400 |
| commit | 78d805cd87f8d7500db841daa6fe24f77faff3ce (patch) | |
| tree | ebe58bcb1776e97702008c1337fa704969efec0c | |
| parent | a52990b8d5094588905c1b1d7a586174377fe330 (diff) | |
| download | rust-78d805cd87f8d7500db841daa6fe24f77faff3ce.tar.gz rust-78d805cd87f8d7500db841daa6fe24f77faff3ce.zip | |
tests: use warning output from rustc to catch missing compression
Using `ld.lld` may have been clever, but that was getting the /system/ ld.lld, not one we may have built as part of building llvm. By using the warning message coming directly from rustc we now correctly skip the zlib and zstd tests when the support is missing.
| -rw-r--r-- | tests/run-make/compressed-debuginfo/Makefile | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/run-make/compressed-debuginfo/Makefile b/tests/run-make/compressed-debuginfo/Makefile index 3c50d4df17a..f9e4927d008 100644 --- a/tests/run-make/compressed-debuginfo/Makefile +++ b/tests/run-make/compressed-debuginfo/Makefile @@ -9,9 +9,7 @@ include ../tools.mk all: zlib zstandard zlib: - $(RUSTC) --crate-name=foo --crate-type=lib --emit=obj -C debuginfo=full -Z debuginfo-compression=zlib foo.rs - test "`ld.lld --compress-debug-sections=zlib 2>&1 | sed 's/.*unknown.*zlib/missing/'`" = missing || readelf -t $(TMPDIR)/foo.o | grep -q ZLIB + test "`$(RUSTC) --crate-name=foo --crate-type=lib --emit=obj -C debuginfo=full -Z debuginfo-compression=zlib foo.rs 2>&1 | sed 's/.*unknown.*zlib.*/missing/' | head -n 1`" = missing || readelf -t $(TMPDIR)/foo.o | grep -q ZLIB zstandard: - $(RUSTC) --crate-name=foo --crate-type=lib --emit=obj -C debuginfo=full -Z debuginfo-compression=zstd foo.rs - test "`ld.lld --compress-debug-sections=zstd 2>&1 | sed 's/.*unknown.*zstd/missing/'`" = missing || readelf -t $(TMPDIR)/foo.o | grep -q ZST + test "`$(RUSTC) --crate-name=foo --crate-type=lib --emit=obj -C debuginfo=full -Z debuginfo-compression=zstd foo.rs 2>&1 | sed 's/.*unknown.*zstd.*/missing/' | head -n 1`" = missing || readelf -t $(TMPDIR)/foo.o | grep -q ZST |
