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

Enable x86 on x64 #25

Closed
robotdad opened this Issue Aug 12, 2016 · 5 comments

Comments

Projects
None yet
6 participants
@robotdad
Member

robotdad commented Aug 12, 2016

No description provided.

@stanthomas

This comment has been minimized.

stanthomas commented Aug 15, 2016

I'd like to propose a simple relaxation of matching the build target with remote system architecture. It seems this would be quick to do and addresses the needs of most users.

Background

Linux and Windows are quite happy running 32-bit applications on 64-bit systems. Indeed, there are good arguments that applications that can comfortably run
in a 2GB address space should be always be built in 32-bit because they are smaller and faster. It's worth noting that Visual Studio itself is a 32-bit application.

By default, GCC will build as 64-bit on 64-bit systems and as 32-bit on 32-bit systems. But it is simple to build as 32-bit on 64-bit systems : just add the g++ command line option -m32.

Note that this is quite distinct from cross-compilation, where binaries can be generated for a different target architecture. GCC can do this too, but that's issue #19.

Obviously a 64-bit Linux system must also have the 32-bit development headers/libraries installed
otherwise compiler, linker and run-time errors will ensue. I suspect this is the reason VCLinux is so rigid about matching project settings to the Linux target native architecture.

Proposed Change

I suggest that, when a 64-bit target is detected, VCLinux allows building of both 64-bit and 32-bit projects. With the proviso that specifying the compiler option (-m32) and ensuring the presence of 32-bit development headers/libraries is the sole responsibility of the user. Although, in the longer term, this could be something for consideration under Issue #14.
This could be emphasised by modifying the build output message so that:

Validating architecture
   Current project architecture 'x64' is compatible with the remote machine architecture 'x64'.

would become:

Validating architecture
   Current project architecture 'x32', remote machine architecture 'x64' - ensure remote is configured for 32-bit builds.

@itodirel itodirel self-assigned this Aug 24, 2016

@KN4CK3R

This comment has been minimized.

KN4CK3R commented Dec 26, 2016

Quickfix if you don't want to wait until the official support.
Remove the check in C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Application Type\Linux\1.0\Linux.Common.targets:

  <Target Name="_ValidateValidArchitecture">
    <!--<ValidateValidArchitecture
      Platform="$(Platform)"
      RemoteTarget="$(RemoteTarget)" />-->
  </Target>

@robotdad robotdad added the backlog label Nov 17, 2017

@lukka

This comment has been minimized.

lukka commented Aug 8, 2018

Closing as no activity since more than 1 year. Feel free to reopen it if you believe it is useful to keep track of it, thanks.

@lukka lukka closed this Aug 8, 2018

@TheLastRar

This comment has been minimized.

TheLastRar commented Aug 8, 2018

The only project I use this on is x86 (outside constraint), I would rather be able to build and debug on an x64 machine without having to use the workaround posted above

@stanthomas

This comment has been minimized.

stanthomas commented Aug 14, 2018

@lukka
I do not agree with your perfunctory closing of this issue. @robotdad placed this on your todo list and you should report on that first. Either 'adressed in release xx.xx by change detail' or 'will not be actioned because reason'. The passage of time is irrelevant; it is quite possible that others have found this topic and concluded that a resolution is on its way.

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