Skip to content

Commit

Permalink
Remove exec platform and properties from SymlinkAction
Browse files Browse the repository at this point in the history
Similar to #14827
When C++ toolchain is built for toolchains, exec platform is set and when it's built for `_cc_toolchain` implicit dependency it's not set.

With this and in specific configuration `cc_toolchain` rule causes an action conflict.

PiperOrigin-RevId: 508270931
Change-Id: I316f401f454fabc4e5e3d8d295e1bf633141e1af
  • Loading branch information
comius authored and hvadehra committed Feb 14, 2023
1 parent f33d22c commit bbcdfae
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/com/google/devtools/build/lib/analysis/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -1493,6 +1493,7 @@ java_library(
deps = [
"//src/main/java/com/google/devtools/build/lib/actions",
"//src/main/java/com/google/devtools/build/lib/actions:artifacts",
"//src/main/java/com/google/devtools/build/lib/analysis/platform",
"//src/main/java/com/google/devtools/build/lib/collect/nestedset",
"//src/main/java/com/google/devtools/build/lib/util",
"//src/main/java/com/google/devtools/build/lib/util:detailed_exit_code",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package com.google.devtools.build.lib.analysis.actions;

import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.devtools.build.lib.actions.AbstractAction;
import com.google.devtools.build.lib.actions.ActionExecutionContext;
Expand All @@ -24,6 +25,7 @@
import com.google.devtools.build.lib.actions.ActionResult;
import com.google.devtools.build.lib.actions.Artifact;
import com.google.devtools.build.lib.actions.Artifact.ArtifactExpander;
import com.google.devtools.build.lib.analysis.platform.PlatformInfo;
import com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder;
import com.google.devtools.build.lib.collect.nestedset.Order;
import com.google.devtools.build.lib.server.FailureDetails;
Expand Down Expand Up @@ -347,4 +349,17 @@ private static DetailedExitCode createDetailedExitCode(String message, Code deta
.setSymlinkAction(FailureDetails.SymlinkAction.newBuilder().setCode(detailedCode))
.build());
}

@Override
@Nullable
public PlatformInfo getExecutionPlatform() {
// SymlinkAction is platform agnostic.
return null;
}

@Override
public ImmutableMap<String, String> getExecProperties() {
// SymlinkAction is platform agnostic.
return ImmutableMap.of();
}
}

0 comments on commit bbcdfae

Please sign in to comment.