Allow setting needsPic crosstool capability using feature

`needsPic` can now be expressed using 'pic' feature (should be enabled for it to take effect).

This cl is a step towards https://github.com/bazelbuild/bazel/issues/5883. Also
see the rollout doc here:
https://docs.google.com/document/d/1uv4c1zag6KvdI31qdx8C6jiTognXPQrxgsUpVefm9fM/edit#.

Flag removing legacy behavior is https://github.com/bazelbuild/bazel/issues/6861

RELNOTES: None.
PiperOrigin-RevId: 227134726
diff --git a/site/docs/crosstool-reference.md b/site/docs/crosstool-reference.md
index 22cc3ec..59e60ed 100644
--- a/site/docs/crosstool-reference.md
+++ b/site/docs/crosstool-reference.md
@@ -901,7 +901,7 @@
    <td><strong><code>legacy_link_flags</code></strong>
    </td>
    <td>link</td>
-   <td>Linker flags coming from the legacy <code>CROSSTOOL</code>.
+   <td>Linker flags coming from the legacy <code>CROSSTOOL</code> fields.
    </td>
   </tr>
   <tr>
@@ -930,7 +930,8 @@
    <td><strong><code>force_pic</code></strong>
    </td>
    <td>link</td>
-   <td>Presence of this variable indicates that PIC code should be generated.
+   <td>Presence of this variable indicates that PIC/PIE code should
+     be generated (Bazel option `--force_pic` was passed).
    </td>
   </tr>
   <tr>
@@ -997,14 +998,6 @@
    </td>
   </tr>
   <tr>
-   <td><strong><code>pic</code></strong>
-   </td>
-   <td>Required if the target needs PIC objects for dynamic libraries. Enabled
-       by default - the `pic` variable is present whenever PIC compilation is
-       requested.
-   </td>
-  </tr>
-  <tr>
    <td><strong><code>supports_start_end_lib</code></strong>
    </td>
    <td>If enabled (and the option <code>--start_end_lib</code> is set), Bazel
@@ -1040,4 +1033,14 @@
      linking mode) will be added to the linking actions.
    </td>
   </tr>
+  <tr>
+   <td><strong><code>supports_pic</code></strong>
+   </td>
+   <td>If enabled, toolchain will know to use PIC objects for dynamic libraries.
+     The `pic` variable is present whenever PIC compilation is needed. If not enabled
+     by default, and `--force_pic` is passed, Bazel will request `supports_pic` and
+     validate that the feature is enabled. If the feature is missing, or couldn't
+      be enabled, `--force_pic` cannot be used.
+   </td>
+  </tr>
 </table>