![]() However, genrule is often used for simple tasks like Starlark rule that uses _shell() or ctx.resolve_command().sh_binary or sh_test rule, because these inherently need Bash.genrule, because genrules execute Bash commands.Starting with Bazel 1.0, you can build any rule without Bash unless it is a: Using Bazel without Bash (MSYS2) Using bazel build without Bashīazel versions before 1.0 used to require Bash to build some rules. That look like Unix paths (such as //foo:bar) into Windows paths. Interrupting the build with Ctrl+C from MSYS2).Īlso, if you choose to run under MSYS2, you need to disable MSYS2'sĪutomatic path conversion, otherwise MSYS will convert command line arguments May work for most use cases, some things are broken, like Recommendation: Run Bazel from the command prompt ( cmd.exe) or fromĪs of, do not run Bazel from bash - eitherįrom MSYS2 shell, or Git Bash, or Cygwin, or any other Bash variant. Only enable this feature when you need it. The -enable_runfiles flag can potentially create a large amount of file symlinks. Note: Creating symlinks on Windows is an expensive operation. To make it easier, add the following lines to your bazelrc file: startup -windows_enable_symlinks build -enable_runfiles (on Windows 10 version 1703 or newer), or by running Bazel as an administrator. Some features require Bazel to be able to create file symlinks on Windows, You can enable 8.3 name creation in all volumes by running the following command: fsutil 8dot3name set 0 Enable symlink support ![]() But to do so the 8.3 filename support needs to be enabled for the volume in which the file with the long path resides. To avoid hitting this issue, you can specify a short output directory for Bazel by the -output_user_root flag.įor example, add the following line to your bazelrc file: startup -output_user_root=C:/tmp Enable 8.3 filename supportīazel attempts to create a short name version for long file paths. Some tools have the Maximum Path Length Limitation on Windows, including the MSVC compiler. Windows-related Bazel issues are marked with the "team-Windows" Instructions, see Install Bazel on Windows. This page covers Best Practices for using Bazel on Windows. ![]()
0 Comments
Leave a Reply. |