Make two LibraryToLinkWrapper$CcLinkingContext$LinkOptions value-equal if they have the same contents and were created by the same action owner at the same point in its analysis.
To do so, we expose an opaque SymbolGenerator in RuleContext/BazelStarlarkContext, as suggested by lberki@. The SymbolGenerator generates symbols (surprise) that will compare equal to other symbols that have the same "owner" (package, label, action lookup key, etc.) and index (order in which they were generated).
This is partially a logical rollback of https://github.com/bazelbuild/bazel/commit/830a286748f64e61dcb03c64318bc7e54cf87d88, with the symbol making things more acceptable.
PiperOrigin-RevId: 231848582
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/AspectFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/AspectFunction.java
index 4f7d257..007fa9c 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/AspectFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/AspectFunction.java
@@ -630,7 +630,8 @@
configConditions,
toolchainContext,
aspectConfiguration,
- view.getHostConfiguration(aspectConfiguration));
+ view.getHostConfiguration(aspectConfiguration),
+ key);
} finally {
CurrentRuleTracker.endConfiguredAspect();
}