bazel icon indicating copy to clipboard operation
bazel copied to clipboard

Fix Linux to Windows cross compilation of py_binary, java_binary and sh_binary using MinGW

Open jesseschalken opened this issue 3 years ago • 0 comments
trafficstars

This branch

  • Fixes various compilation and runtime errors when building the C++ Windows launcher using a MinGW toolchain on Linux
  • Fixes Windows target platform detection to use the target platform instead of the host platform
  • Removes the execution platform configuration from the $launcher attributes so that the launcher is compiled for the target platform
  • Adds target platform constraints to the autogenerated Windows toolchains so that they can be selected with target platform constraints as a replacement for --compiler=... when using --incompatible_enable_cc_toolchain_resolution

jesseschalken avatar Aug 02 '22 09:08 jesseschalken

Hello @jesseschalken, Could you please resolve the code conflicts. I have shared it to team, for further review.

sgowroji avatar Sep 01 '22 05:09 sgowroji

@sgowroji Thanks. I've merged master but I am yet to fix the Windows test failures (I'm still trying to get them to pass locally on master). Hoping someone beats me to it.

jesseschalken avatar Sep 01 '22 17:09 jesseschalken

Tests might be failing because --platforms=windows isn't passed (or some autodetection is failing).

comius avatar Sep 01 '22 19:09 comius