Create a symlink with the right workspace name under the execroot

The execution root currently uses the basename of the workspace directory for
the workspace name, not the name in the WORKSPACE file. (For example, if our
sources were in /path/to/foo and our WORKSPACE file had workspace(name = "bar"),
our execution root would look like execroot/foo.)

This creates a symlink bar -> foo, so that accessing ../repo_name actually works
for the main repository.

RELNOTES[INC]: The main repository's execution root is under the main
repository's workspace name, not the source directory's basename. This shouldn't
have any effect on most builds, but it's possible it could break someone doing
weird things with paths in actions.

--
MOS_MIGRATED_REVID=128175455
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java b/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java
index 2f5f70f..e7c4ac4 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java
@@ -283,7 +283,8 @@
             ImmutableList.<ConfiguredTarget>of(),
             ImmutableList.<ConfiguredTarget>of(),
             null,
-            ImmutableMap.<PackageIdentifier, Path>of());
+            ImmutableMap.<PackageIdentifier, Path>of(),
+            "");
 
     private final ImmutableList<ConfiguredTarget> targetsToBuild;
     @Nullable private final ImmutableList<ConfiguredTarget> targetsToTest;
@@ -295,6 +296,7 @@
     @Nullable private final TopLevelArtifactContext topLevelContext;
     private final ImmutableList<AspectValue> aspects;
     private final ImmutableMap<PackageIdentifier, Path> packageRoots;
+    private final String workspaceName;
 
     private AnalysisResult(
         Collection<ConfiguredTarget> targetsToBuild,
@@ -306,7 +308,8 @@
         Collection<ConfiguredTarget> parallelTests,
         Collection<ConfiguredTarget> exclusiveTests,
         TopLevelArtifactContext topLevelContext,
-        ImmutableMap<PackageIdentifier, Path> packageRoots) {
+        ImmutableMap<PackageIdentifier, Path> packageRoots,
+        String workspaceName) {
       this.targetsToBuild = ImmutableList.copyOf(targetsToBuild);
       this.aspects = ImmutableList.copyOf(aspects);
       this.targetsToTest = targetsToTest == null ? null : ImmutableList.copyOf(targetsToTest);
@@ -317,6 +320,7 @@
       this.exclusiveTests = ImmutableSet.copyOf(exclusiveTests);
       this.topLevelContext = topLevelContext;
       this.packageRoots = packageRoots;
+      this.workspaceName = workspaceName;
     }
 
     /**
@@ -386,6 +390,10 @@
     public TopLevelArtifactContext getTopLevelContext() {
       return topLevelContext;
     }
+
+    public String getWorkspaceName() {
+      return workspaceName;
+    }
   }
 
 
@@ -602,7 +610,8 @@
         parallelTests,
         exclusiveTests,
         topLevelOptions,
-        skyframeAnalysisResult.getPackageRoots());
+        skyframeAnalysisResult.getPackageRoots(),
+        loadingResult.getWorkspaceName());
   }
 
   private static NestedSet<Artifact> getBaselineCoverageArtifacts(