skia2/bazel
Kevin Lubick a74ebc9bac [bazel] Use exec_tools instead of tools for better RBE compatibility
The tools in genrules [1] correspond to the HOST's version, which
is a problem if we are doing cross-platform builds. In this case,
when I was using my M1 Mac to run on a Linux RBE platform, the
Mac's python binaries (e.g. python3_9_aarch64-apple-darwin/bin/python3)
were being uploaded to RBE and attempted to be used, which resulted
in OSError: [Errno 8] Exec format error because the won't run
on the Linux RBE machine.

Thanks to tjgq@, I learned about exec_tools [2], which will use
the version of the tools for the EXECUTION platform, which
is exactly what we want.

While debugging this, I added a minimal reproduction case in
//experimental/bazel_test and updated the py_tools version
in an effort to diagnose the issue further.

We will need to contribute similar fixes to @spirv_tools

[1] https://bazel.build/reference/be/general#genrule.tools
[2] https://bazel.build/reference/be/general#genrule.exec_tools
Bug: skia:12541
Change-Id: Ib14deb4e326d3103fd08c21e93afe342d751c17a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/554518
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2022-06-30 18:02:35 +00:00
..
common_config_settings [bazel] Add option for SkSVGCanvas (and expat third_party DEP) 2022-06-27 15:56:55 +00:00
external [bazel] Use exec_tools instead of tools for better RBE compatibility 2022-06-30 18:02:35 +00:00
gcs_mirror [gcs_mirror] Add support for URLs ending with ".tgz". 2022-06-03 11:51:43 +00:00
platform [bazel] Add support for Macs to make Linux RBE builds 2022-06-23 12:00:43 +00:00
rbe [bazel] Add support for Macs to make Linux RBE builds 2022-06-23 12:00:43 +00:00
user [infra] Add BazelBuild task to build CanvasKit on the CI with Bazel 2022-05-06 17:54:08 +00:00
BUILD.bazel [Bazel] Fix sksl defines 2022-06-21 20:54:11 +00:00
buildrc [bazel] Add support for Macs to make Linux RBE builds 2022-06-23 12:00:43 +00:00
cc_binary_with_flags.bzl [bazel] Add cc_library_with_options 2022-06-28 13:20:54 +00:00
cc_library_with_flags.bzl [bazel] Add cc_library_with_options 2022-06-28 13:20:54 +00:00
karma_test.bzl [bazel] Make use of test_on_env to spin up server for gms 2022-02-28 14:05:54 +00:00
macros.bzl [bazel] Add option for SkSVGCanvas (and expat third_party DEP) 2022-06-27 15:56:55 +00:00
Makefile [bazel] Add support for Macs to make Linux RBE builds 2022-06-23 12:00:43 +00:00