From cb6500a9ce648a02154dca8d05a978ce9b10c4b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?X=C3=B9d=C5=8Dng=20Y=C3=A1ng?= Date: Thu, 17 Mar 2022 13:50:36 +0100 Subject: [PATCH] Update Bazel bootstrap documentation and remove obsolete flags. (#15065) Closes #15055. PiperOrigin-RevId: 435014309 Co-authored-by: Ivo List --- scripts/bootstrap/bootstrap.sh | 3 --- site/docs/install-compile-source.md | 4 ++-- src/test/shell/bazel/bazel_bootstrap_distfile_test.sh | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/scripts/bootstrap/bootstrap.sh b/scripts/bootstrap/bootstrap.sh index 597379b57efcbc..686cd10e341d8c 100755 --- a/scripts/bootstrap/bootstrap.sh +++ b/scripts/bootstrap/bootstrap.sh @@ -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:-}" diff --git a/site/docs/install-compile-source.md b/site/docs/install-compile-source.md index 6b834da2ad75b6..e01185704d02e2 100644 --- a/site/docs/install-compile-source.md +++ b/site/docs/install-compile-source.md @@ -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 @@ -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 diff --git a/src/test/shell/bazel/bazel_bootstrap_distfile_test.sh b/src/test/shell/bazel/bazel_bootstrap_distfile_test.sh index 8b1fe3bff22151..5d6456e09dc507 100755 --- a/src/test/shell/bazel/bazel_bootstrap_distfile_test.sh +++ b/src/test/shell/bazel/bazel_bootstrap_distfile_test.sh @@ -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 \