Skip to content

Commit 4933be9

Browse files
committed
Verify bin crates are not deterministic on Windows
This disables the remap_cwd_bin test which is failing on windows, and adds a test for --remap-path-prefix making a bin crate instead, to see if it will fail the same way.
1 parent 2a687de commit 4933be9

File tree

3 files changed

+31
-3
lines changed

3 files changed

+31
-3
lines changed

.github/workflows/ci.yml

+5
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,11 @@ jobs:
534534
strategy:
535535
matrix:
536536
include:
537+
- name: x86_64-msvc-1
538+
env:
539+
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-profiler"
540+
SCRIPT: make ci-subset-1
541+
os: windows-latest-xl
537542
- name: dist-x86_64-linux
538543
os: ubuntu-latest-xl
539544
env: {}

src/ci/github-actions/ci.yml

+5
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,11 @@ jobs:
668668
strategy:
669669
matrix:
670670
include:
671+
- name: x86_64-msvc-1
672+
env:
673+
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-profiler
674+
SCRIPT: make ci-subset-1
675+
<<: *job-windows-xl
671676
- *dist-x86_64-linux
672677

673678
master:

src/test/run-make-fulldeps/reproducible-build/Makefile

+21-3
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,18 @@ all: \
99
opt \
1010
link_paths \
1111
remap_paths \
12-
different_source_dirs \
13-
remap_cwd_bin \
12+
different_source_dirs_bin \
13+
different_source_dirs_rlib \
1414
remap_cwd_rlib \
1515
remap_cwd_to_empty \
1616
extern_flags
1717

18+
# TODO: Deterministic builds of `bin` crate types are not deterministic with
19+
# debuginfo=2 on Windows.
20+
# See https://github.com/rust-lang/rust/pull/87320#issuecomment-920105533
21+
# different_source_dirs_bin \
22+
# remap_cwd_bin \
23+
1824
smoke:
1925
rm -rf $(TMPDIR) && mkdir $(TMPDIR)
2026
$(RUSTC) linker.rs -O
@@ -55,7 +61,19 @@ remap_paths:
5561
$(RUSTC) reproducible-build.rs --crate-type rlib --remap-path-prefix=/b=/c
5662
cmp "$(TMPDIR)/libreproducible_build.rlib" "$(TMPDIR)/libfoo.rlib" || exit 1
5763

58-
different_source_dirs:
64+
different_source_dirs_bin:
65+
rm -rf $(TMPDIR) && mkdir $(TMPDIR)
66+
$(RUSTC) reproducible-build-aux.rs
67+
mkdir $(TMPDIR)/test
68+
cp reproducible-build.rs $(TMPDIR)/test
69+
$(RUSTC) reproducible-build.rs --crate-type bin --remap-path-prefix=$$PWD=/b
70+
cp $(TMPDIR)/reproducible-build $(TMPDIR)/foo
71+
(cd $(TMPDIR)/test && $(RUSTC) reproducible-build.rs \
72+
--remap-path-prefix=$(TMPDIR)/test=/b \
73+
--crate-type bin)
74+
cmp "$(TMPDIR)/reproducible-build" "$(TMPDIR)/foo" || exit 1
75+
76+
different_source_dirs_rlib:
5977
rm -rf $(TMPDIR) && mkdir $(TMPDIR)
6078
$(RUSTC) reproducible-build-aux.rs
6179
mkdir $(TMPDIR)/test

0 commit comments

Comments
 (0)