Skip to content
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

CI: Cross compile Rust tests #11990

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

xclaesse
Copy link
Member

No description provided.

Copy link
Member

@eli-schwartz eli-schwartz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very neat!

if self.is_cross:
output_name += '_cross'
# Required for Windows, allowed everywhere else.
output_name += '.exe'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😂 How did this ever work? I was absolutely sure we ran rust tests on Windows, the toolchain is installed in run.ps1...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we do: https://dev.azure.com/jussi0947/c10d67cb-aecc-4964-a931-a8b100dcbd57/_apis/build/builds/18167/logs/24. The .exe requirement could be only with wine maybe?

@xclaesse xclaesse force-pushed the rust-ci-cross branch 3 times, most recently from 33e4b52 to 8c92728 Compare July 17, 2023 18:56
xclaesse added 3 commits July 20, 2023 13:52
On Windows executables must have .exe suffix. On all other platforms
.exe is allowed. Always use it, like clike compiler sanity check already
does.
xclaesse and others added 3 commits July 21, 2023 10:34
This fix running Windows executables that links to Rust STD both
natively and under Wine, as well as in devenv.
rust: Require `native: true` for `proc-macro` targets and allow linking into targets for other platforms

proc-macros are basically compiler extensions and must be compiled for
the build machine so that the compiler can load and execute it at
runtime.

Without this, cross-compilation of targets that use proc-macro
dependencies is going to fail.

Fixes mesonbuild#11702
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants