From 0ec550eb2a960aeb953c7290518e0f16a5882421 Mon Sep 17 00:00:00 2001 From: Ivo List Date: Wed, 16 Mar 2022 10:18:02 +0000 Subject: [PATCH] Update Bazel bootstrap documentation and remove obsolete flags. --- scripts/bootstrap/bootstrap.sh | 3 --- site/en/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 24222367babf30..a2c7b0a4a6d662 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/en/install/compile-source.md b/site/en/install/compile-source.md index 566fc7a61ccb40..efeab5829aa225 100644 --- a/site/en/install/compile-source.md +++ b/site/en/install/compile-source.md @@ -208,7 +208,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 @@ -279,7 +279,7 @@ For instructions for Unix-like systems, see 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 \