diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionBuilder.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionBuilder.java index a85850bc26f573..266ff0c87c82ac 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionBuilder.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionBuilder.java @@ -831,7 +831,7 @@ public CppLinkAction build() throws InterruptedException, RuleErrorException { output.getExecPathString(), SolibSymlinkAction.getDynamicLibrarySoname( output.getRootRelativePath(), - /* preserveName= */ false, + /* preserveName= */ linkType != LinkTargetType.NODEPS_DYNAMIC_LIBRARY, actionConstructionContext.getConfiguration().getMnemonic()), linkType.equals(LinkTargetType.DYNAMIC_LIBRARY), paramFile != null ? paramFile.getExecPathString() : null, diff --git a/src/test/shell/bazel/BUILD b/src/test/shell/bazel/BUILD index 5611325c472973..2bdc998ead49c1 100644 --- a/src/test/shell/bazel/BUILD +++ b/src/test/shell/bazel/BUILD @@ -128,6 +128,7 @@ sh_test( ], tags = [ "no_windows", # darwin-specific test + "requires-network", # For Bzlmod ], ) diff --git a/src/test/shell/bazel/cpp_darwin_integration_test.sh b/src/test/shell/bazel/cpp_darwin_integration_test.sh index b1155e3778e1e3..9f648b24039ab6 100755 --- a/src/test/shell/bazel/cpp_darwin_integration_test.sh +++ b/src/test/shell/bazel/cpp_darwin_integration_test.sh @@ -139,6 +139,8 @@ EOF return 0 } +# TODO: This test passes vacuously as the default Unix toolchain doesn't use +# the set_install_name feature yet. function test_cc_test_with_explicit_install_name() { mkdir -p cpp cat > cpp/BUILD < cpp/foo.h < cpp/foo.cc < cpp/test.cc < MODULE.bazel < cpp/BUILD < cpp/foo.h <