Document Java toolchains.
Closes #12672.
PiperOrigin-RevId: 348045516
diff --git a/site/docs/user-manual.html b/site/docs/user-manual.html
index 26601a5..a2b4624 100644
--- a/site/docs/user-manual.html
+++ b/site/docs/user-manual.html
@@ -372,9 +372,58 @@
<code>[targetname].sc</code>.
</p>
<p>
- This option is disabled by default.
+ This option is disabled by default.
</p>
+<h4 id='flag--java_language_version'><code class='flag'>--java_language_version=<var>version</var></code></h4>
+<p>
+ This option specifies the version of Java sources. For example:
+</p>
+<pre>
+ % bazel build --java_language_version=8 java/com/example/common/foo:all
+</pre>
+<p>
+ compiles and allows only constructs compatible with Java 8 specification.
+ Default value is 11. -->
+ Possible values are: 8, 9, 10, --> 11 <!--begin-block:external , 14, and 15 and may be extended by registering custom Java
+ toolchains using <code>default_java_toolchain</code> macro-->.
+</p>
+
+<h4 id='flag--tool_java_language_version'><code class='flag'>--tool_java_language_version=<var>version</var></code>
+</h4>
+<p>
+ The Java language version used to build tools that are executed during a build.
+ Default value is 11.
+</p>
+
+<h4 id='flag--java_runtime_version'><code class='flag'>--java_runtime_version=<var>version</var></code></h4>
+<p>
+ This option specifies the version of JVM to use to execute the code and run the tests. For
+ example:
+</p>
+<pre>
+ % bazel run --java_runtime_version=remotejdk_11 java/com/example/common/foo:java_application
+</pre>
+<p>
+ downloads JDK 11 from a remote repository and run the Java application using it.
+</p>
+<p>
+ Default value is <code>localjdk</code>.
+ Possible values are: <code>localjdk</code>, <code>localjdk_<var>version</var></code>,
+ <code>remotejdk_11</code>,
+ <code>remotejdk_14</code>, and <code>remote_jdk15</code>.
+ You can extend the values by registering custom JVM using either
+ <code>local_java_repository</code> or
+ <code>remote_java_repostory</code> repository rules.
+</p>
+
+<h4 id='flag--tool_java_runtime_version'><code class='flag'>--tool_java_runtime_version=<var>version</var></code></h4>
+<p>
+ The version of JVM used to execute tools that are needed during a build.
+ Default value is <code>remotejdk_11</code>.
+</p>
+-->
+
<h4 id='flag--jvmopt'><code class='flag'>--jvmopt <var>jvm-option</var></code></h4>
<p>
This option allows option arguments to be passed to the Java VM. It can be used
@@ -573,9 +622,16 @@
once for each CPU specified with <code class='flag'>--fat_apk_cpu</code> for the
<code>android_binary</code> rule, and once for the CPU specified with
<code class='flag'>--cpu</code> for the <code>cc_binary</code> rule.
+</p>
<p>
-The default is <code>armeabi-v7a</code>.
+ The default is <code>armeabi-v7a</code>.
+</p>
+<p>
+ One <code>.so</code> file is created and packaged in the APK for
+ each CPU specified with <code class='flag'>--fat_apk_cpu</code>. The <code>.so</code> file's name
+ prefixes the name of the <code>android_binary</code> rule with "lib". For example, if the name of
+ the <code>android_binary</code> is "foo", then the file is <code>libfoo.so</code>.
</p>
<p>
One <code>.so</code> file will be created and packaged in the APK for
@@ -592,6 +648,10 @@
<a href='#flag--android_crosstool_top'><code class='flag'>--android_crosstool_top</code></a>
or <a href='#flag--crosstool_top'><code class='flag'>--crosstool_top</code></a> flags.
</p>
+
+
+<h4 id='flag--per_file_copt'><code class='flag'>--per_file_copt
+ <var>[+-]regex[,[+-]regex]...@option[,option]...</var></code></h4>
</p>
<h4 id='flag--per_file_copt'><code class='flag'>--per_file_copt
@@ -926,7 +986,7 @@
<p>
These options specify the amount of local resources (RAM in MB and number of CPU logical cores)
that Bazel can take into consideration when scheduling build and test activities. They take
- an integer, or a keyword (HOST_RAM or HOST_CPUS) optionally followed by [-|*<float>float</float>]
+ an integer, or a keyword (HOST_RAM or HOST_CPUS) optionally followed by [-|*<code>float</code>]
(for example, <code class='flag'>--local_cpu_resources=2</code>,
<code class='flag'>--local_ram_resources=HOST_RAM*.5</code>,
<code class='flag'>--local_cpu_resources=HOST_CPUS-1</code>).
@@ -2530,15 +2590,19 @@
<h4 id='flag--start'><code class='flag'>--start=<i>start_type</i></code></h4>
<p>
How the app should be started after installing it. Supported <i>start_type</i>s are:
- <ul>
- <li><code>NO</code> Does not start the app. This is the default.</li>
- <li><code>COLD</code> Starts the app from a clean state after install.</li>
- <li><code>WARM</code> Preserves and restores the application state on incremental installs.</li>
- <li><code>DEBUG</code> Waits for the debugger before starting the app in a clean state after install.</li>
- </ul>
+</p>
+<ul>
+ <li><code>NO</code> Does not start the app. This is the default.</li>
+ <li><code>COLD</code> Starts the app from a clean state after install.</li>
+ <li><code>WARM</code> Preserves and restores the application state on incremental installs.</li>
+ <li><code>DEBUG</code> Waits for the debugger before starting the app in a clean state after
+ install.
+ </li>
+</ul>
+<p>
Note that if more than one of <code class='flag'>--start=<i>start_type</i></code>,
<code class='flag'>--start_app</code> or
- <code class='flag'>--debug_app</code> is set, the last value will be used.
+ <code class='flag'>--debug_app</code> is set, the last value is used.
</p>
<h4 id='flag--adb'><code class='flag'>--adb <var>path</var></code></h4>
<p>
@@ -2548,18 +2612,20 @@
<a href='#flag--android_sdk'><code class='flag'>--android_sdk</code></a>.
</p>
-<h4 id='flag--adb_arg'><code class='flag'>--adb_arg <var>arg</var></code></h4>
+<h4 id='flag--adb_arg'><code class='flag'>--adb_arg <var>serial</var></code></h4>
<p>
Extra arguments to <code>adb</code>. These come before the subcommand in the
command line and are typically used to specify which device to install to.
For example, to select the Android device or emulator to use:
+</p>
<pre>% bazel mobile-install --adb_arg=-s --adb_arg=deadbeef
</pre>
-will invoke <code>adb</code> as
+<p>
+ invokes <code>adb</code> as
+</p>
<pre>
adb -s deadbeef install ...
</pre>
-</p>
<h4 id='flag--incremental_install_verbosity'><code class='flag'>--incremental_install_verbosity <var>number</var></code></h4>
<p>
The verbosity for incremental install. Set to 1 for debug logging to be
@@ -2592,8 +2658,9 @@
including counts and action counts. This includes both native and Starlark rules.
If memory tracking is enabled, then the rules' memory consumption is also printed.</li>
<li><code class='flag'>--skylark_memory</code> dumps a
- <href a=https://github.com/google/pprof>pprof</href> compatible .gz file to the specified path.
- You must enable memory tracking for this to work.</li>
+ <a href=https://github.com/google/pprof>pprof</a> compatible .gz file to the specified path.
+ You must enable memory tracking for this to work.
+ </li>
<li><code class='flag'>--action_graph=/path/to/file</code> dumps the state of
the internal Bazel action graph in proto format to
<code>/path/to/file</code>. You have to run (at least) the analysis phase