Skip to content

tests: mir-opt test suite with --bless doesn't work on windows-gnu #119644

Closed

Description

@petrochenkov

Even if x86_64-pc-windows-gnu is the only build target, rustbuild still attempts to cross-compile thing for i686-pc-windows-gnu to bless all revisions of mir-opt tests, but the cross-compilation isn't setup correctly and the attempt fails.

By default I see output like this

Building stage1 library artifacts (x86_64-pc-windows-gnu -> i686-pc-windows-gnu)

...

  = note: ld.lld: error: C:\\msys64\\home\\we\\rust\\build\\x86_64-pc-windows-gnu\\stage1\\lib\\rustlib\\i686-pc-windows-gnu\\lib\\rsbegin.o: machine type x86 conflicts with x64
          ld.lld: error: C:\\msys64\\tmp\\rustcCUublf\\symbols.o: machine type x86 conflicts with x64
          ld.lld: error: C:\\msys64\\home\\we\\rust\\build\\x86_64-pc-windows-gnu\\stage1-std\\i686-pc-windows-gnu\\release\\deps\\std-e43f59e301d8d8f6.std.6f9fe1c679e003ca-cgu.00.rcgu.o: machine type x86 conflicts with x64
          ld.lld: error: C:\\msys64\\home\\we\\rust\\build\\x86_64-pc-windows-gnu\\stage1-std\\i686-pc-windows-gnu\\release\\deps\\std-e43f59e301d8d8f6.std.6f9fe1c679e003ca-cgu.01.rcgu.o: machine type x86 conflicts with x64
          ld.lld: error: C:\\msys64\\home\\we\\rust\\build\\x86_64-pc-windows-gnu\\stage1-std\\i686-pc-windows-gnu\\release\\deps\\std-e43f59e301d8d8f6.std.6f9fe1c679e003ca-cgu.02.rcgu.o: machine type x86 conflicts with x64
          ld.lld: error: C:\\msys64\\home\\we\\rust\\build\\x86_64-pc-windows-gnu\\stage1-std\\i686-pc-windows-gnu\\release\\deps\\std-e43f59e301d8d8f6.std.6f9fe1c679e003ca-cgu.03.rcgu.o: machine type x86 conflicts with x64

If I try to remove windows-gnu targets from MIR_OPT_BLESS_TARGET_MAPPING, then I start seeing output like this

Building stage1 library artifacts (x86_64-pc-windows-gnu -> x86_64-pc-windows-gnu-synthetic-miropt-abort(C:\msys64\home\we\rust\build\synthetic-target-specs\x86_64-pc-windows-gnu-synthetic-miropt-abort.json))

...

  = note: ld.lld: error: could not open 'rsbegin.o': No such file or directory
          ld.lld: error: could not open 'rsend.o': No such file or directory

This was apparently caused by #112418.
cc @pietroalbini

Activity

  1. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jan 5, 2024
  2. added
    A-testsuiteArea: The testsuite used to check the correctness of rustc
    T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
    on Jan 5, 2024
  3. changed the title [-]tests: mir-opt test suite doesn't work on windows-gnu[/-] [+]tests: mir-opt test suite with `--bless` doesn't work on windows-gnu[/+] on Jan 6, 2024
  4. saethlin commented on Jan 6, 2024

    @saethlin
    Member

    I'm trying to fix the cross-compilation for mir-opt tests in #119035

    I don't know if that fixes this problem, but it might. If it doesn't, I might work on this issue next.

  5. added
    O-windows-gnuToolchain: GNU, Operating system: Windows
    and removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jan 6, 2024
  6. petrochenkov commented on Jan 6, 2024

    @petrochenkov
    ContributorAuthor

    @saethlin
    Hmm, yes, if the linking step is eliminated, then the issues with rs(begin,end).o objects should go away too.
    I'll check when than PR is merged.

  7. petrochenkov commented on Jan 8, 2024

    @petrochenkov
    ContributorAuthor

    #119035 has landed and fixed this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-testsuiteArea: The testsuite used to check the correctness of rustcO-windows-gnuToolchain: GNU, Operating system: WindowsT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions