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

Support 32-bit c++ windows toolchain #10963

Closed
matthauck opened this issue Mar 13, 2020 · 4 comments
Closed

Support 32-bit c++ windows toolchain #10963

matthauck opened this issue Mar 13, 2020 · 4 comments
Labels
area-Windows Windows-specific issues and feature requests P2 We'll consider working on this in future. (Assignee optional) team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: feature request

Comments

@matthauck
Copy link

matthauck commented Mar 13, 2020

Description of the problem / feature request:

Bazel should support compiling 32-bit c++ build targets on windows.

Feature requests: what underlying problem are you trying to solve with this feature?

I need to compile c++ binaries that run on 32-bit windows.

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Tried specifying bazel build ... --cpu x86_32 and bazel build ... --cpu i386 (from bazelbuild/platforms), and both errored out with something like:

ERROR: C:/users/username/_bazel_username/pkyimvir/external/local_config_cc/BUILD:47:1: in cc_toolchain_suite rule @local_config_cc//:toolchain: cc_toolchain_suite '@local_config_cc//:toolchain' does not contain a toolchain for cpu 'x86_32'

What operating system are you running Bazel on?

Windows 10 / Windows 2019

What's the output of bazel info release?

release 2.1.0

Have you found anything relevant by searching the web?

Found claims on stackoverflow that bazel does not support this, and could not find another github issue specifically requesting it.

e.g. https://stackoverflow.com/questions/53291191/compile-a-c-project-wit-bazel-for-x86-32-bit#comment93518681_53318502

@matthauck
Copy link
Author

I should add, I think at the very least, this limitation of what is supported built-in should be documented. If it is, I did not come across it. I would much rather have known this at the start of my port to bazel than at the end of it. I did not think to validate that bazel supported building 32-bit binaries. I figured this would just work because there was a --cpu argument. This is pretty painful to realize at the end. 😕

@matthauck
Copy link
Author

Ah. looks like #2307 may be the issue of reference.

That was some time ago. Is there still no bandwidth for this?

This should at the very least be documented on the windows support page. (https://docs.bazel.build/versions/master/windows.html)

@matthauck
Copy link
Author

Actually. I think that issue is different -- that is about using bazel on 32-bit windows. I want to use bazel on 64-bit windows but produce 32-bit outputs.

@dslomov dslomov added area-Windows Windows-specific issues and feature requests untriaged labels Mar 16, 2020
@philwo philwo added the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Jun 15, 2020
@meteorcloudy
Copy link
Member

meteorcloudy commented Aug 7, 2020

I have a preconfigured version that works for building for x86 32 bit on x64 here: https://github.com/meteorcloudy/my_tests/commits/master/preconfigure_msvc_toolchain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Windows Windows-specific issues and feature requests P2 We'll consider working on this in future. (Assignee optional) team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants