Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
petrochenkov opened this issue Jan 5, 2024 · 3 comments
Closed
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc O-windows-gnu Toolchain: GNU, Operating system: Windows T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@petrochenkov
Copy link
Contributor

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

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 5, 2024
@petrochenkov petrochenkov added A-testsuite Area: The testsuite used to check the correctness of rustc T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jan 5, 2024
@petrochenkov petrochenkov 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 Jan 6, 2024
@saethlin
Copy link
Member

saethlin commented Jan 6, 2024

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.

@saethlin saethlin added O-windows-gnu Toolchain: GNU, Operating system: Windows and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jan 6, 2024
@petrochenkov
Copy link
Contributor Author

@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.

@petrochenkov
Copy link
Contributor Author

#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
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc O-windows-gnu Toolchain: GNU, Operating system: Windows T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

3 participants