diff options
author | Laszlo Csomor <laszlocsomor@google.com> | 2018-03-05 00:29:00 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-03-05 00:30:53 -0800 |
commit | c3916f9ac1384c5f3bc6e4b3f1342db3af0dbab8 (patch) | |
tree | d48029125928901347030d34ca2099549d2c4c12 /site/docs/install-compile-source.md | |
parent | 96145511b34a2d7be834e3eb05927674e875c813 (diff) |
docs,windows: update bootstrap & install docs
Update the documentation about:
- compiling Bazel from source (without an existing Bazel binary) on Windows
- OS and software requirements on Windows
Closes #4741.
PiperOrigin-RevId: 187829532
Diffstat (limited to 'site/docs/install-compile-source.md')
-rw-r--r-- | site/docs/install-compile-source.md | 52 |
1 files changed, 13 insertions, 39 deletions
diff --git a/site/docs/install-compile-source.md b/site/docs/install-compile-source.md index 1bee1e168f..3bf6e7f2bf 100644 --- a/site/docs/install-compile-source.md +++ b/site/docs/install-compile-source.md @@ -3,11 +3,12 @@ layout: documentation title: Compiling Bazel from Source --- -# <a name="compiling-from-source"></a>Compiling Bazel from Source +# <a name="compiling-from-source"></a>Compiling Bazel from Source (bootstrapping) -You can build Bazel from source following these steps: +You can build Bazel from source without using an existing Bazel binary by +doing the following: -1. Ensure that JDK 8, Python, bash, zip, and the usual C build toolchain +1. Ensure that JDK 8, Python, Bash, zip, and the usual C++ build toolchain are installed on your system. * On systems based on Debian packages (Debian, Ubuntu): you can install OpenJDK 8 and Python by running the following command in a terminal: @@ -15,16 +16,17 @@ You can build Bazel from source following these steps: ```sh sudo apt-get install build-essential openjdk-8-jdk python zip ``` - * On Windows: you need additional software. See the [requirements - page](windows.html#requirements). + * On Windows: you need additional software and the right OS version. + See the [Windows page](windows.html). 2. Download and unpack Bazel's distribution archive. Download `bazel-<version>-dist.zip` from the [release page](https://github.com/bazelbuild/bazel/releases). - **Note:** There is a **single architecture independent** distribution - archive. There are no architecture-specific distribution archives. + **Note:** There is a **single, architecture-independent** distribution + archive. There are no architecture-specific or OS-specific distribution + archives. We recommend to also verify the signature made by our [release @@ -39,42 +41,14 @@ You can build Bazel from source following these steps: shell session: 1. `cd` into the directory where you unpacked the distribution archive 2. run `bash ./compile.sh` - * On Windows, do following steps in the msys2 shell: + * On Windows, do following steps in the MSYS2 shell: 1. `cd` into the directory where you unpacked the distribution archive 2. run `./compile.sh` + Once you have a Bazel binary, you no longer need to use the MSYS2 shell. + You can run Bazel from the Command Prompt (`cmd.exe`) or PowerShell. + The output will be `output/bazel` on Unix-like systems (e.g. Ubuntu, macOS) and `output/bazel.exe` on Windows. This is a self-contained Bazel binary. You can copy it to a directory on the `PATH` (such as `/usr/local/bin` on Linux) or use it in-place. - -## Note to Windows users - -Make sure your machine meets the [requirements](windows.html) and that you use -the latest version of the sources (`bazel-0.X.Y-dist.zip`). - -There's a bug in the compilation scripts in `bazel-0.6.0-dist.zip` and in -`bazel-0.6.1-dist.zip`: - -To fix it: - -* either apply the changes in - [e79a110](https://github.com/bazelbuild/bazel/commit/e79a1107d90380501102990d82cbfaa8f51a1778) - to the source tree, - -* or just replace the following line in - `src/main/native/windows/build_windows_jni.sh`: - - ```sh - @CL /O2 /EHsc /LD /Fe:"$(cygpath -a -w ${DLL})" /I "${VSTEMP}" /I . ${WINDOWS_SOURCES[*]} - ``` - - with this line: - - ```sh - @CL /O2 /EHsc /LD /Fe:"$(cygpath -a -w ${DLL})" /I "%TMP%" /I . ${WINDOWS_SOURCES[*]} - ``` - -It suffices to do one of these to bootstrap Bazel. We however recommend -applying the full commit (e79a110) because it also adds extra environment -checks to `./compile.sh`. |