Introduce a specific action_config for linking nodeps dynamic libraries
With this cl toolchain author can specify different flags for linking shared
library produced by cc_library and a shared library produced by cc_binary.
This is what is needed to remove linking_mode_flags - MOSTLY_STATIC_LIBRARIES
from the crosstool. What this linking mode was used for was to separate when we
link transitive shared library from cc_binary and when we link this
little-and-not-really-useful-outside-of-bazel nodeps shared library in cc_library.
RELNOTES: CcToolchain: Introduced action_config for "c++-link-transitive-dynamic-library"
PiperOrigin-RevId: 187523334
diff --git a/tools/cpp/CROSSTOOL b/tools/cpp/CROSSTOOL
index 2588c3a..d6a3a53 100644
--- a/tools/cpp/CROSSTOOL
+++ b/tools/cpp/CROSSTOOL
@@ -843,6 +843,7 @@
action: 'c++-module-codegen'
action: 'c++-link-executable'
action: 'c++-link-dynamic-library'
+ action: 'c++-link-nodeps-dynamic-library'
flag_group {
iterate_over: 'sysroot'
flag: '--sysroot=%{sysroot}'