Also get build-runfiles as an ActionInput for the symlink tree spawn

This isn't strictly necessary since we disable caching and require local
execution.

PiperOrigin-RevId: 187985476
diff --git a/src/main/java/com/google/devtools/build/lib/exec/SymlinkTreeHelper.java b/src/main/java/com/google/devtools/build/lib/exec/SymlinkTreeHelper.java
index 2b47320..143fc97 100644
--- a/src/main/java/com/google/devtools/build/lib/exec/SymlinkTreeHelper.java
+++ b/src/main/java/com/google/devtools/build/lib/exec/SymlinkTreeHelper.java
@@ -89,7 +89,7 @@
   public void createSymlinksUsingCommand(
       Path execRoot, BuildConfiguration config, BinTools binTools)
           throws CommandException {
-    List<String> argv = getSpawnArgumentList(execRoot, binTools);
+    List<String> argv = getSpawnArgumentList(execRoot, binTools.getExecPath(BUILD_RUNFILES));
     CommandBuilder builder = new CommandBuilder();
     builder.addArgs(argv);
     builder.setWorkingDir(execRoot);
@@ -128,7 +128,7 @@
     } else {
       // Pretend we created the runfiles tree by copying the manifest
       try {
-        FileSystemUtils.createDirectoryAndParents(symlinkTreeRoot);
+        symlinkTreeRoot.createDirectoryAndParents();
         FileSystemUtils.copyFile(inputManifest, symlinkTreeRoot.getChild("MANIFEST"));
       } catch (IOException e) {
         throw new UserExecException(e.getMessage(), e);
@@ -144,15 +144,16 @@
       BinTools binTools,
       ImmutableMap<String, String> environment,
       ActionInput inputManifestArtifact) {
+    ActionInput buildRunfiles = binTools.getActionInput(BUILD_RUNFILES);
     return new SimpleSpawn(
         owner,
-        getSpawnArgumentList(execRoot, binTools),
+        getSpawnArgumentList(execRoot, buildRunfiles.getExecPath()),
         environment,
         ImmutableMap.of(
             ExecutionRequirements.LOCAL, "",
             ExecutionRequirements.NO_CACHE, "",
             ExecutionRequirements.NO_SANDBOX, ""),
-        ImmutableList.of(inputManifestArtifact),
+        ImmutableList.of(inputManifestArtifact, buildRunfiles),
         /*outputs=*/ ImmutableList.of(),
         RESOURCE_SET);
   }
@@ -160,12 +161,9 @@
   /**
    * Returns the complete argument list build-runfiles has to be called with.
    */
-  private ImmutableList<String> getSpawnArgumentList(Path execRoot, BinTools binTools) {
-    PathFragment path = binTools.getExecPath(BUILD_RUNFILES);
-    Preconditions.checkNotNull(path, BUILD_RUNFILES + " not found in embedded tools");
-
+  private ImmutableList<String> getSpawnArgumentList(Path execRoot, PathFragment buildRunfiles) {
     List<String> args = Lists.newArrayList();
-    args.add(path.getPathString());
+    args.add(buildRunfiles.getPathString());
 
     if (filesetTree) {
       args.add("--allow_relative");