Build 32bit windows target?

375 views
Skip to first unread message

m...@iceboy.org

unread,
Aug 6, 2018, 4:35:44 PM8/6/18
to bazel-discuss
Hi,

Is there a way to build 32bit windows target using bazel? For example, can we cross compile 32bit target using VC from 64bit windows, or using mingw from linux?

Looks like the builtin configure script was hardcoded to use the 64-64 compiler under windows:
https://github.com/bazelbuild/bazel/blob/5947f474e152f7b1f447ef9c9392cd632c1fdd81/tools/cpp/windows_cc_configure.bzl#L226

I also tried to follow https://github.com/bazelbuild/bazel/wiki/Yet-Another-CROSSTOOL-Writing-Tutorial to define crosstool but with no success yet.

Any help will be appreciated.

Thanks!
Lu

Yun Peng

unread,
Aug 7, 2018, 9:12:22 AM8/7/18
to m...@iceboy.org, bazel-discuss
Hi Lu,

Bazel itself only supports running on x64 platforms. But it's possible to use a x64-x86 compiler.
You can start from https://github.com/meteorcloudy/windows-crosstool and try to change the hardcoded path to the compiler you want.

Best,
Yun


--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/32914ef5-be7a-4a07-9bc9-e2451aeebab7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lu Gong

unread,
Aug 7, 2018, 3:10:42 PM8/7/18
to Yun Peng, bazel-discuss
Awesome!
Reply all
Reply to author
Forward
0 new messages