Skip to content

Commit cb6500a

Browse files
Wyveraldcomius
andauthored
Update Bazel bootstrap documentation and remove obsolete flags. (#15065)
Closes #15055. PiperOrigin-RevId: 435014309 Co-authored-by: Ivo List <[email protected]>
1 parent f19d610 commit cb6500a

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

scripts/bootstrap/bootstrap.sh

-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ _BAZEL_ARGS="--spawn_strategy=standalone \
3636
--strategy=Javac=worker --worker_quit_after_build --ignore_unsupported_sandboxing \
3737
--compilation_mode=opt \
3838
--distdir=derived/distdir \
39-
--java_toolchain=//scripts/bootstrap:bootstrap_toolchain \
40-
--host_java_toolchain=//scripts/bootstrap:bootstrap_toolchain \
41-
--incompatible_use_toolchain_resolution_for_java_rules \
4239
--extra_toolchains=//scripts/bootstrap:bootstrap_toolchain_definition \
4340
${DIST_BOOTSTRAP_ARGS:-} \
4441
${EXTRA_BAZEL_ARGS:-}"

site/docs/install-compile-source.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ sudo apt-get install build-essential openjdk-11-jdk python zip unzip
212212

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

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

217217
The compiled output is placed into `output/bazel`. This is a self-contained
218218
Bazel binary, without an embedded JDK. You can copy it anywhere or use it
@@ -283,7 +283,7 @@ Unix-like systems.)
283283
284284
3. `cd` to the directory where you unpacked the distribution archive.
285285
286-
4. Run the compilation script: `env EXTRA_BAZEL_ARGS="--host_javabase=@local_jdk//:jdk" ./compile.sh`
286+
4. Run the compilation script: `env EXTRA_BAZEL_ARGS="--tool_java_runtime_version=local_jdk" ./compile.sh`
287287
288288
The compiled output is placed into `output/bazel.exe`. This is a self-contained
289289
Bazel binary, without an embedded JDK. You can copy it anywhere or use it

src/test/shell/bazel/bazel_bootstrap_distfile_test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function test_bootstrap() {
102102

103103
JAVABASE=$(echo reduced*)
104104

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

0 commit comments

Comments
 (0)