Uh oh!
There was an error while loading. Please reload this page.
Fix cross-compiling with dlltool for raw-dylib - #108355
Conversation
rustbot
commented
Feb 22, 2023
r? @nagisa (rustbot has picked a reviewer for you, use r? to override) |
dpaoliello
commented
Feb 23, 2023
mati865
commented
Feb 23, 2023
This will not work when cross-compiling because on Linux there is no |
dpaoliello
commented
Feb 23, 2023
Well, that's fun. Also means that the original code was broken if cross-compiling from non-Windows for Windows with the same architecture: |
michaelwoerister
commented
Feb 24, 2023
Thanks a lot for taking this on, @dpaoliello! |
I'd really like us to have proper tests for this before we merge the PR, at least for the cases:
It seems to be straightforward to cross compiling simple libraries as part of a test, as long as the library does not depend on libcore or libstd (which we don't need here). Here's an example for a UI test: This test will fail if it cannot find and invoke the expected dlltool. However, the downside is that we then would require any system running tests to have The Another thing I noticed is that there might be an additional set of flags needed, as described here: That PR seems to apply them unconditionally (at least on Windows?). Maybe we should add a (run-make) test that does a check as described in the corresponding bug report. |
Uh oh!
There was an error while loading. Please reload this page.
mati865
commented
Feb 24, 2023
This test would fail on both CI and on user systems because typically only one toolchain is available in PATH (either i686 or x86_64 or AArch64). |
michaelwoerister
commented
Feb 24, 2023
Even if the host only ever is |
mati865
commented
Feb 24, 2023
I mean you could only test |
dpaoliello
commented
Feb 25, 2023
Done.
Ony my local testing it seemed to work - let's see what the CI does...
Good catch - added. |
This comment has been minimized.
This comment has been minimized.
michaelwoerister
commented
Feb 27, 2023
I'm not sure what's going on here. |
michaelwoerister
left a comment
There was a problem hiding this comment.
Unrelated to the CI failure, but there seem to be a few small errors in the Makefile that lead to the test passing without actually testing anything.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
mati865
commented
Feb 27, 2023
Pretty sure the error message doesn't tell the actual executable and just uses hardcoded |
michaelwoerister
commented
Feb 27, 2023
Yes, indeed -- thanks, @mati865! That should be fixable by installing the But this highlights the problem already mentioned before: If we add the test in its current form, everyone who wants to run tests locally will have to install There's precedent for ignoring tests when the environment doesn't fulfill certain requirements (e.g. xLTO tests need Clang). We may have to go down that route if we can't find a more elegant way. |
dpaoliello
commented
Feb 27, 2023
Ok, here's my workaround: we try to detect if |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…nk-jobs, r=Mark-Simulacrum Limit the number of parallel link jobs during LLVM build for mingw. This PR is an attempt to unblock rust-lang#108355, which keeps failing while trying to link various LLVM artifacts on mingw runners. It looks like doing too many linking jobs might put too much load on the system? (Although I don't understand why the jobs are only failing for rust-lang#108355 while they seem to pass for others) r? infra-ci
michaelwoerister
commented
Mar 22, 2023
…r=Mark-Simulacrum Limit the number of parallel link jobs during LLVM build for mingw. This PR is an attempt to unblock rust-lang/rust#108355, which keeps failing while trying to link various LLVM artifacts on mingw runners. It looks like doing too many linking jobs might put too much load on the system? (Although I don't understand why the jobs are only failing for #108355 while they seem to pass for others) r? infra-ci
bors
commented
Mar 22, 2023
⌛ Testing commit 94aaac6c6715291c994643dc59f616ca77a913b6 with merge 2eb6699bd74c7f5b3d1b98907bf4b8dada17997d... |
bors
commented
Mar 22, 2023
💔 Test failed - checks-actions |
This comment has been minimized.
This comment has been minimized.
dpaoliello
commented
Mar 22, 2023
Looks like i686 dlltool.exe can't produce x64 binaries, so I'm ignoring that target triple in the test for now. |
michaelwoerister
commented
Mar 23, 2023
Thanks, @dpaoliello! |
bors
commented
Mar 23, 2023
bors
commented
Mar 23, 2023
bors
commented
Mar 23, 2023
☀️ Test successful - checks-actions |
rust-timer
commented
Mar 23, 2023
Finished benchmarking commit (9a6b0c3): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
|
…r=Mark-Simulacrum Limit the number of parallel link jobs during LLVM build for mingw. This PR is an attempt to unblock rust-lang/rust#108355, which keeps failing while trying to link various LLVM artifacts on mingw runners. It looks like doing too many linking jobs might put too much load on the system? (Although I don't understand why the jobs are only failing for #108355 while they seem to pass for others) r? infra-ci
…r=Mark-Simulacrum Limit the number of parallel link jobs during LLVM build for mingw. This PR is an attempt to unblock rust-lang/rust#108355, which keeps failing while trying to link various LLVM artifacts on mingw runners. It looks like doing too many linking jobs might put too much load on the system? (Although I don't understand why the jobs are only failing for #108355 while they seem to pass for others) r? infra-ci
Fix for #103939
Issue Details:
When attempting to cross-compile using the
raw-dylibfeature and the GNU toolchain, rustc would attempt to find a cross-compiling version of dlltool (e.g.,i686-w64-mingw32-dlltool). The has two issues 1) on Windows dlltool is alwaysdlltool(no cross-compiling named versions exist) and 2) it only supported compiling to i686 and x86_64 resulting in ARM 32 and 64 compiling as x86_64.Fix Details:
dlltoolbinary.-margument to dlltool to indicate the target machine type.(This is the first of two PRs to fix the remaining issues for the
raw-dylibfeature (#58713) that is blocking stabilization (#104218))