diff --git a/src/test/run-make/reproducible-build/Makefile b/src/test/run-make/reproducible-build/Makefile index 8db9e0ec078..8e799ca1a43 100644 --- a/src/test/run-make/reproducible-build/Makefile +++ b/src/test/run-make/reproducible-build/Makefile @@ -1,26 +1,20 @@ -include ../tools.mk all: $(RUSTC) reproducible-build-aux.rs - mv "$(TMPDIR)/libreproducible_build_aux.rlib" "$(TMPDIR)/first.rlib" - $(RUSTC) reproducible-build-aux.rs - cp "$(TMPDIR)/libreproducible_build_aux.rlib" "$(TMPDIR)/second.rlib" - cmp "$(TMPDIR)/first.rlib" "$(TMPDIR)/second.rlib" || exit 1 $(RUSTC) reproducible-build.rs -o"$(TMPDIR)/reproducible-build1" $(RUSTC) reproducible-build.rs -o"$(TMPDIR)/reproducible-build2" - cmp "$(TMPDIR)/reproducible-build1" "$(TMPDIR)/reproducible-build2" || exit 1 + nm "$(TMPDIR)/reproducible-build1" | sort > "$(TMPDIR)/reproducible-build1.nm" + nm "$(TMPDIR)/reproducible-build2" | sort > "$(TMPDIR)/reproducible-build2.nm" + cmp "$(TMPDIR)/reproducible-build1.nm" "$(TMPDIR)/reproducible-build2.nm" || exit 1 $(RUSTC) reproducible-build-aux.rs -g - mv "$(TMPDIR)/libreproducible_build_aux.rlib" "$(TMPDIR)/first.rlib" - $(RUSTC) reproducible-build-aux.rs -g - cp "$(TMPDIR)/libreproducible_build_aux.rlib" "$(TMPDIR)/second.rlib" - cmp "$(TMPDIR)/first.rlib" "$(TMPDIR)/second.rlib" || exit 1 $(RUSTC) reproducible-build.rs -g -o"$(TMPDIR)/reproducible-build1-debug" $(RUSTC) reproducible-build.rs -g -o"$(TMPDIR)/reproducible-build2-debug" - cmp "$(TMPDIR)/reproducible-build1-debug" "$(TMPDIR)/reproducible-build2-debug" || exit 1 + nm "$(TMPDIR)/reproducible-build1-debug" | sort > "$(TMPDIR)/reproducible-build1-debug.nm" + nm "$(TMPDIR)/reproducible-build2-debug" | sort > "$(TMPDIR)/reproducible-build2-debug.nm" + cmp "$(TMPDIR)/reproducible-build1-debug.nm" "$(TMPDIR)/reproducible-build2-debug.nm" || exit 1 $(RUSTC) reproducible-build-aux.rs -O - mv "$(TMPDIR)/libreproducible_build_aux.rlib" "$(TMPDIR)/first.rlib" - $(RUSTC) reproducible-build-aux.rs -O - cp "$(TMPDIR)/libreproducible_build_aux.rlib" "$(TMPDIR)/second.rlib" - cmp "$(TMPDIR)/first.rlib" "$(TMPDIR)/second.rlib" || exit 1 $(RUSTC) reproducible-build.rs -O -o"$(TMPDIR)/reproducible-build1-opt" $(RUSTC) reproducible-build.rs -O -o"$(TMPDIR)/reproducible-build2-opt" - cmp "$(TMPDIR)/reproducible-build1-opt" "$(TMPDIR)/reproducible-build2-opt" || exit 1 + nm "$(TMPDIR)/reproducible-build1-opt" | sort > "$(TMPDIR)/reproducible-build1-opt.nm" + nm "$(TMPDIR)/reproducible-build2-opt" | sort > "$(TMPDIR)/reproducible-build2-opt.nm" + cmp "$(TMPDIR)/reproducible-build1-opt.nm" "$(TMPDIR)/reproducible-build2-opt.nm" || exit 1 diff --git a/src/test/run-make/reproducible-build/reproducible-build-aux.rs b/src/test/run-make/reproducible-build/reproducible-build-aux.rs index 73a62eee265..9ef853e7996 100644 --- a/src/test/run-make/reproducible-build/reproducible-build-aux.rs +++ b/src/test/run-make/reproducible-build/reproducible-build-aux.rs @@ -33,12 +33,6 @@ pub enum Enum { pub struct TupleStruct(pub i8, pub i16, pub i32, pub i64); -pub trait Marker {} -impl Marker for char {} -impl Marker for (T, U) {} - -pub trait Trait where T1: 'static { - type Assoc: Marker; - +pub trait Trait { fn foo(&self); } diff --git a/src/test/run-make/reproducible-build/reproducible-build.rs b/src/test/run-make/reproducible-build/reproducible-build.rs index 17c2e87b5c1..dc7c702e5cc 100644 --- a/src/test/run-make/reproducible-build/reproducible-build.rs +++ b/src/test/run-make/reproducible-build/reproducible-build.rs @@ -67,10 +67,7 @@ impl Trait for u64 { fn foo(&self) {} } -impl -reproducible_build_aux::Trait for TupleStruct { - type Assoc = (u8, i16); - +impl reproducible_build_aux::Trait for TupleStruct { fn foo(&self) {} } @@ -120,11 +117,12 @@ fn main() { let _ = reproducible_build_aux::Enum::Variant3 { x: 0 }; let _ = reproducible_build_aux::TupleStruct(1, 2, 3, 4); - let object_shim: &reproducible_build_aux::Trait = - &TupleStruct(0, 1, 2, 3); + let object_shim: &reproducible_build_aux::Trait = &TupleStruct(0, 1, 2, 3); object_shim.foo(); let pointer_shim: &Fn(i32) = ®ular_fn; TupleStruct(1, 2, 3, 4).bar(); } + +