Skip to content

Commit

Permalink
Update Bazel bootstrap documentation and remove obsolete flags. (baze…
Browse files Browse the repository at this point in the history
…lbuild#15065)

Closes bazelbuild#15055.

PiperOrigin-RevId: 435014309

Co-authored-by: Ivo List <ilist@google.com>
  • Loading branch information
Wyverald and comius committed Mar 17, 2022
1 parent f19d610 commit cb6500a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 0 additions & 3 deletions scripts/bootstrap/bootstrap.sh
Expand Up @@ -36,9 +36,6 @@ _BAZEL_ARGS="--spawn_strategy=standalone \
--strategy=Javac=worker --worker_quit_after_build --ignore_unsupported_sandboxing \
--compilation_mode=opt \
--distdir=derived/distdir \
--java_toolchain=//scripts/bootstrap:bootstrap_toolchain \
--host_java_toolchain=//scripts/bootstrap:bootstrap_toolchain \
--incompatible_use_toolchain_resolution_for_java_rules \
--extra_toolchains=//scripts/bootstrap:bootstrap_toolchain_definition \
${DIST_BOOTSTRAP_ARGS:-} \
${EXTRA_BAZEL_ARGS:-}"
Expand Down
4 changes: 2 additions & 2 deletions site/docs/install-compile-source.md
Expand Up @@ -212,7 +212,7 @@ sudo apt-get install build-essential openjdk-11-jdk python zip unzip

3. `cd` to the directory where you unpacked the distribution archive.

3. Run the compilation script: `env EXTRA_BAZEL_ARGS="--host_javabase=@local_jdk//:jdk" bash ./compile.sh`.
3. Run the compilation script: `env EXTRA_BAZEL_ARGS="--tool_java_runtime_version=local_jdk" bash ./compile.sh`.

The compiled output is placed into `output/bazel`. This is a self-contained
Bazel binary, without an embedded JDK. You can copy it anywhere or use it
Expand Down Expand Up @@ -283,7 +283,7 @@ Unix-like systems.)

3. `cd` to the directory where you unpacked the distribution archive.

4. Run the compilation script: `env EXTRA_BAZEL_ARGS="--host_javabase=@local_jdk//:jdk" ./compile.sh`
4. Run the compilation script: `env EXTRA_BAZEL_ARGS="--tool_java_runtime_version=local_jdk" ./compile.sh`

The compiled output is placed into `output/bazel.exe`. This is a self-contained
Bazel binary, without an embedded JDK. You can copy it anywhere or use it
Expand Down
2 changes: 1 addition & 1 deletion src/test/shell/bazel/bazel_bootstrap_distfile_test.sh
Expand Up @@ -102,7 +102,7 @@ function test_bootstrap() {

JAVABASE=$(echo reduced*)

env EXTRA_BAZEL_ARGS="--host_javabase=@local_jdk//:jdk --tool_java_runtime_version=local_jdk" ./compile.sh \
env EXTRA_BAZEL_ARGS="--tool_java_runtime_version=local_jdk" ./compile.sh \
|| fail "Expected to be able to bootstrap bazel"
./output/bazel \
--server_javabase=$JAVABASE --host_jvm_args=--add-opens=java.base/java.nio=ALL-UNNAMED \
Expand Down

0 comments on commit cb6500a

Please sign in to comment.