]> git.lizzy.rs Git - rust.git/commitdiff
Verify bin crates are not deterministic on Windows
authordanakj <danakj@chromium.org>
Wed, 15 Sep 2021 15:49:12 +0000 (11:49 -0400)
committerdanakj <danakj@chromium.org>
Wed, 15 Sep 2021 15:49:12 +0000 (11:49 -0400)
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.

.github/workflows/ci.yml
src/ci/github-actions/ci.yml
src/test/run-make-fulldeps/reproducible-build/Makefile

index ff4fa1527e93ad09beb3f137c458c5c79bc18600..76318ab7cb922fcbceb28833617b9a7c20645617 100644 (file)
@@ -534,6 +534,11 @@ jobs:
     strategy:
       matrix:
         include:
+          - name: x86_64-msvc-1
+            env:
+              RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-profiler"
+              SCRIPT: make ci-subset-1
+            os: windows-latest-xl
           - name: dist-x86_64-linux
             os: ubuntu-latest-xl
             env: {}
index 6417f5a984ad55070e00731831ef815bd472998c..e4c402b417e6b3a3f1eb8af3d46c3cd6a5ff3015 100644 (file)
@@ -668,6 +668,11 @@ jobs:
     strategy:
       matrix:
         include:
+          - name: x86_64-msvc-1
+            env:
+              RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-profiler
+              SCRIPT: make ci-subset-1
+            <<: *job-windows-xl
           - *dist-x86_64-linux
 
   master:
index 762cf5ed2ea71f17af181c5ef903b237df937829..46885fdb7df848e09dfdb14be2d13253a45505db 100644 (file)
@@ -9,12 +9,18 @@ all:  \
        opt \
        link_paths \
        remap_paths \
-       different_source_dirs \
-       remap_cwd_bin \
+       different_source_dirs_bin \
+       different_source_dirs_rlib \
        remap_cwd_rlib \
        remap_cwd_to_empty \
        extern_flags
 
+# TODO: Deterministic builds of `bin` crate types are not deterministic with
+# debuginfo=2 on Windows.
+# See https://github.com/rust-lang/rust/pull/87320#issuecomment-920105533
+#      different_source_dirs_bin \
+#      remap_cwd_bin \
+
 smoke:
        rm -rf $(TMPDIR) && mkdir $(TMPDIR)
        $(RUSTC) linker.rs -O
@@ -55,7 +61,19 @@ remap_paths:
        $(RUSTC) reproducible-build.rs --crate-type rlib --remap-path-prefix=/b=/c
        cmp "$(TMPDIR)/libreproducible_build.rlib" "$(TMPDIR)/libfoo.rlib" || exit 1
 
-different_source_dirs:
+different_source_dirs_bin:
+       rm -rf $(TMPDIR) && mkdir $(TMPDIR)
+       $(RUSTC) reproducible-build-aux.rs
+       mkdir $(TMPDIR)/test
+       cp reproducible-build.rs $(TMPDIR)/test
+       $(RUSTC) reproducible-build.rs --crate-type bin --remap-path-prefix=$$PWD=/b
+       cp $(TMPDIR)/reproducible-build $(TMPDIR)/foo
+       (cd $(TMPDIR)/test && $(RUSTC) reproducible-build.rs \
+               --remap-path-prefix=$(TMPDIR)/test=/b \
+               --crate-type bin)
+       cmp "$(TMPDIR)/reproducible-build" "$(TMPDIR)/foo" || exit 1
+
+different_source_dirs_rlib:
        rm -rf $(TMPDIR) && mkdir $(TMPDIR)
        $(RUSTC) reproducible-build-aux.rs
        mkdir $(TMPDIR)/test