From 08b30a968f26251666be05de55dd6369ca151b03 Mon Sep 17 00:00:00 2001 From: Xavier Bonaventura Date: Mon, 1 Jan 2024 13:41:46 +0100 Subject: [PATCH] Remove auto option from dynamic_mode Even though auto appears in the documentation, it does not work in Bazel 4, 5, 6, or 7. --- cpp/Readme.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cpp/Readme.md b/cpp/Readme.md index c6cb95f..85bd84a 100644 --- a/cpp/Readme.md +++ b/cpp/Readme.md @@ -100,7 +100,7 @@ bazel build //:my_lib In this example we have one executable and one library. This brings us to two possibilities, to load the library during runtime (dynamic linking) or embed it into the executable (static linking). -The way to control it in Bazel is using [`--dynamic_mode`](https://docs.bazel.build/versions/master/user-manual.html#flag--dynamic_mode). It has four options: `auto`, `default`, `fully` and `off`. The most relevant for us are `fully` and `off`. +The way to control it in Bazel is using [`--dynamic_mode`](https://bazel.build/docs/user-manual#dynamic-mode). It has three options: `default`, `fully` and `off`. The most relevant for us are `fully` and `off`. If we build the binary using `off` it will do static linking in all the cases that it is possible. Using `fully` it will do dynamic linking with all the targets. @@ -111,3 +111,7 @@ bazel build //:hello_world --dynamic_mode=off ``` You can also pass it when calling directly `bazel run`. + +## Related Bazel github issues + +* [#20707: [bazel.build] Problem with /docs/user-manual (open)](https://github.com/bazelbuild/bazel/issues/20707)