<commit_before>---
layout: documentation
title: Windows
---

Building Bazel on Windows
=========================

Windows support is highly experimental. Known issues are [marked with
label "Windows"](https://github.com/bazelbuild/bazel/issues?q=is%3Aissue+is%3Aopen+label%3AWindows)
on github issues.

We currently support only 64bit Windows 7 or higher.
To bootstrap Bazel on Windows, you will need:

*    Java JDK 8 or later
*    [msys2](https://msys2.github.io/) (need to be installed at ``C:\msys64\``).
*    Several MSYS packages (gcc, git, curl): use ``pacman`` command
     to install those.

To build Bazel:

*    Open MSYS2 shell.
*    Clone bazel git repository as normal.
*    Set the environment variables:

```
export JAVA_HOME="$(ls -d C:/Program\ Files/Java/jdk* | sort | tail -n 1)"
export TMPDIR=c:/temp
export BAZEL_SH=c:/msys64/usr/bin/bash.exe
```

*     Run ``compile.sh`` in Bazel directory.
*     If all works fine, bazel will be build at ``output\bazel.exe``.
<commit_msg>Add missing instructions to Windows build docs<commit_after>---
layout: documentation
title: Windows
---

Building Bazel on Windows
=========================

Windows support is highly experimental. Known issues are [marked with
label "Windows"](https://github.com/bazelbuild/bazel/issues?q=is%3Aissue+is%3Aopen+label%3AWindows)
on github issues.

We currently support only 64bit Windows 7 or higher.
To bootstrap Bazel on Windows, you will need:

*    Java JDK 8 or later
*    [msys2](https://msys2.github.io/) (need to be installed at ``C:\msys64\``).
*    Several MSYS packages (gcc, git, curl, zip, unzip): use ``pacman`` command
     to install those.

To build Bazel:

*    Open MSYS2 shell.
*    Clone bazel git repository as normal.
*    Set the environment variables:

```
export JAVA_HOME="$(ls -d C:/Program\ Files/Java/jdk* | sort | tail -n 1)"
export TMPDIR=c:/temp
export BAZEL_SH=c:/msys64/usr/bin/bash.exe
```

*     Run ``compile.sh`` in Bazel directory.
*     If all works fine, bazel will be build at ``output\bazel.exe``.

{'fraction_non_alphanumeric': 0.14713094654242276, 'fraction_numerical': 0.014713094654242276, 'mean_word_length': 3.8687350835322194, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7100308', 'n_tokens_mistral': 729, 'n_tokens_neox': 667, 'n_words': 226}