summaryrefslogtreecommitdiffstats
path: root/src/test/run-make-fulldeps/split-debuginfo
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/run-make-fulldeps/split-debuginfo')
-rw-r--r--src/test/run-make-fulldeps/split-debuginfo/Makefile41
1 files changed, 23 insertions, 18 deletions
diff --git a/src/test/run-make-fulldeps/split-debuginfo/Makefile b/src/test/run-make-fulldeps/split-debuginfo/Makefile
index e2dc64d8c..1032f3408 100644
--- a/src/test/run-make-fulldeps/split-debuginfo/Makefile
+++ b/src/test/run-make-fulldeps/split-debuginfo/Makefile
@@ -1,4 +1,4 @@
--include ../tools.mk
+include ../tools.mk
all: off packed unpacked
@@ -29,14 +29,19 @@ unpacked:
[ ! -d $(TMPDIR)/foo.dSYM ]
else
ifdef IS_WINDOWS
-# Windows only supports =off
+# Windows only supports =packed
off:
packed:
unpacked:
else
-# If disabled, don't run dsymutil
+ifeq ($(UNAME),Linux)
+ UNSTABLEOPTS :=
+else
+ UNSTABLEOPTS := -Zunstable-options
+endif
+
off:
- $(RUSTC) foo.rs -g -C split-debuginfo=off -Z unstable-options
+ $(RUSTC) foo.rs -g -C $(UNSTABLEOPTS) split-debuginfo=off
[ ! -f $(TMPDIR)/*.dwp ]
[ ! -f $(TMPDIR)/*.dwo ]
@@ -47,12 +52,12 @@ off:
packed: packed-split packed-single
packed-split:
- $(RUSTC) foo.rs -g -C split-debuginfo=packed -Z unstable-options -Zsplit-dwarf-kind=split
+ $(RUSTC) foo.rs -g $(UNSTABLEOPTS) -C split-debuginfo=packed -Zsplit-dwarf-kind=split
ls $(TMPDIR)/*.dwp
rm -rf $(TMPDIR)/*.dwp $(TMPDIR)/*.dwo
packed-single:
- $(RUSTC) foo.rs -g -C split-debuginfo=packed -Z unstable-options -Zsplit-dwarf-kind=single
+ $(RUSTC) foo.rs -g $(UNSTABLEOPTS) -C split-debuginfo=packed -Zsplit-dwarf-kind=single
ls $(TMPDIR)/*.dwp
ls $(TMPDIR)/*.dwo && exit 1 || exit 0
rm -rf $(TMPDIR)/*.dwp
@@ -60,37 +65,37 @@ packed-single:
packed-remapped: packed-remapped-split packed-remapped-single
packed-remapped-split:
- $(RUSTC) -Z unstable-options -C split-debuginfo=packed -C debuginfo=2 \
+ $(RUSTC) $(UNSTABLEOPTS) -C split-debuginfo=packed -C debuginfo=2 \
-Z split-dwarf-kind=split --remap-path-prefix $(TMPDIR)=/a foo.rs -g
objdump -Wi $(TMPDIR)/foo | grep DW_AT_GNU_dwo_name | (! grep $(TMPDIR)) || exit 1
packed-remapped-single:
- $(RUSTC) -Z unstable-options -C split-debuginfo=packed -C debuginfo=2 \
+ $(RUSTC) $(UNSTABLEOPTS) -C split-debuginfo=packed -C debuginfo=2 \
-Z split-dwarf-kind=single --remap-path-prefix $(TMPDIR)=/a foo.rs -g
objdump -Wi $(TMPDIR)/foo | grep DW_AT_GNU_dwo_name | (! grep $(TMPDIR)) || exit 1
packed-crosscrate: packed-crosscrate-split packed-crosscrate-single
packed-crosscrate-split:
- $(RUSTC) --crate-type lib -Z unstable-options -C split-debuginfo=packed \
+ $(RUSTC) --crate-type lib $(UNSTABLEOPTS) -C split-debuginfo=packed \
-Zsplit-dwarf-kind=split -C debuginfo=2 -g bar.rs
ls $(TMPDIR)/*.rlib
ls $(TMPDIR)/*.dwo && exit 1 || exit 0
ls $(TMPDIR)/*.dwp && exit 1 || exit 0
- $(RUSTC) --extern bar=$(TMPDIR)/libbar.rlib -Z unstable-options -C split-debuginfo=packed \
- -Zsplit-dwarf-kind=split -C debuginfo=2 -g main.rs
+ $(RUSTC) --extern bar=$(TMPDIR)/libbar.rlib -Z unstable-options $(UNSTABLEOPTS) \
+ -C split-debuginfo=packed -Zsplit-dwarf-kind=split -C debuginfo=2 -g main.rs
rm $(TMPDIR)/*.dwo
rm $(TMPDIR)/main.dwp
rm $(TMPDIR)/$(call BIN,main)
packed-crosscrate-single:
- $(RUSTC) --crate-type lib -Z unstable-options -C split-debuginfo=packed \
+ $(RUSTC) --crate-type lib $(UNSTABLEOPTS) -C split-debuginfo=packed \
-Zsplit-dwarf-kind=single -C debuginfo=2 -g bar.rs
ls $(TMPDIR)/*.rlib
ls $(TMPDIR)/*.dwo && exit 1 || exit 0
ls $(TMPDIR)/*.dwp && exit 1 || exit 0
- $(RUSTC) --extern bar=$(TMPDIR)/libbar.rlib -Z unstable-options -C split-debuginfo=packed \
- -Zsplit-dwarf-kind=single -C debuginfo=2 -g main.rs
+ $(RUSTC) --extern bar=$(TMPDIR)/libbar.rlib -Z unstable-options $(UNSTABLEOPTS) \
+ -C split-debuginfo=packed -Zsplit-dwarf-kind=single -C debuginfo=2 -g main.rs
ls $(TMPDIR)/*.dwo && exit 1 || exit 0
rm $(TMPDIR)/main.dwp
rm $(TMPDIR)/$(call BIN,main)
@@ -98,23 +103,23 @@ packed-crosscrate-single:
unpacked: unpacked-split unpacked-single unpacked-remapped-split unpacked-remapped-single
unpacked-split:
- $(RUSTC) foo.rs -g -C split-debuginfo=unpacked -Z unstable-options -Zsplit-dwarf-kind=split
+ $(RUSTC) foo.rs -g $(UNSTABLEOPTS) -C split-debuginfo=unpacked -Zsplit-dwarf-kind=split
ls $(TMPDIR)/*.dwp && exit 1 || exit 0
ls $(TMPDIR)/*.dwo
rm -rf $(TMPDIR)/*.dwp $(TMPDIR)/*.dwo
unpacked-single:
- $(RUSTC) foo.rs -g -C split-debuginfo=unpacked -Z unstable-options -Zsplit-dwarf-kind=single
+ $(RUSTC) foo.rs -g $(UNSTABLEOPTS) -C split-debuginfo=unpacked -Zsplit-dwarf-kind=single
ls $(TMPDIR)/*.dwp && exit 1 || exit 0
ls $(TMPDIR)/*.dwo && exit 1 || exit 0
unpacked-remapped-split:
- $(RUSTC) -Z unstable-options -C split-debuginfo=unpacked -C debuginfo=2 \
+ $(RUSTC) $(UNSTABLEOPTS) -C split-debuginfo=unpacked -C debuginfo=2 \
-Z split-dwarf-kind=split --remap-path-prefix $(TMPDIR)=/a foo.rs -g
objdump -Wi $(TMPDIR)/foo | grep DW_AT_GNU_dwo_name | (! grep $(TMPDIR)) || exit 1
unpacked-remapped-single:
- $(RUSTC) -Z unstable-options -C split-debuginfo=unpacked -C debuginfo=2 \
+ $(RUSTC) $(UNSTABLEOPTS) -C split-debuginfo=unpacked -C debuginfo=2 \
-Z split-dwarf-kind=single --remap-path-prefix $(TMPDIR)=/a foo.rs -g
objdump -Wi $(TMPDIR)/foo | grep DW_AT_GNU_dwo_name | (! grep $(TMPDIR)) || exit 1
endif