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

VS backend cross-compile support is broken (especially Microsoft GDK platforms) #14232

Open
Listwon opened this issue Feb 9, 2025 · 3 comments

Comments

@Listwon
Copy link

Listwon commented Feb 9, 2025

Describe the bug
#12654 replaced target_system = self.environment.machines.target.system with target_system = self.environment.machines.host.system which completely breaks the logic from #10616

I think target shouldn't be replaced with host in the whole mesonbuild/backend/vs2010backend.py, because you should be able to generate and build Visual Studio solutions on hosts that don't match the target machine (for example building arm64 projects on x64 host).

@dcbaker
Copy link
Member

dcbaker commented Feb 10, 2025

Just to make sure the terminology is straight:
Build is the machine running meson
Host is the machine that the compiled binaries will run on
Target is the machine that compiled binaries will produce binaries for

@Listwon
Copy link
Author

Listwon commented Feb 10, 2025

Ok, it's a bit confusing, so I was wrong about the other hosts (they should work). Then the compatibility with mentioned PR #10616 is broken. Previously Gaming.Desktop.x64 from [target_machine] was placed in solution as self.platform. It relies on MSVC GDK extension, which recognizes Gaming.Desktop.x64 and adds required dependencies to toolchain. Right now it assigns the default host which is the same as build - x64 - which means MSVC will try to build the usual Windows build. If I change [target_machine] to [host_machine] in cross file, I have to manually specify parameters in [binaries] which previously worked with defaults.

@bonzini
Copy link
Collaborator

bonzini commented Feb 10, 2025

(In fact target is basically unused in Meson, and I wouldn't mind deprecating it).

What binaries do you have to add?

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

No branches or pull requests

3 participants