Add platform mapping function.
Introduces a new SkyFunction which reads a platform mapping file, parses its contents and produces a platform mapping sky value which can then be used to apply the mapping to configurations (in the form of BuildConfigurationValue.Key).
The file's location is obtained from the newly introduced flag --platform_mappings and defaults to //:platform_mappings.
Note that this logic is not in use anywhere yet because the key mapping has not been applied. This will follow in a future CL.
Step 4/N towards the platforms mapping functionality for https://github.com/bazelbuild/bazel/issues/6426
RELNOTES: None.
PiperOrigin-RevId: 239043475
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkyFunctions.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkyFunctions.java
index 8bfa5df..21f5ad1 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/SkyFunctions.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkyFunctions.java
@@ -118,7 +118,7 @@
public static final SkyFunctionName BUILD_INFO = SkyFunctionName.createHermetic("BUILD_INFO");
public static final SkyFunctionName WORKSPACE_NAME =
SkyFunctionName.createHermetic("WORKSPACE_NAME");
- static final SkyFunctionName PLATFORM_MAPPING =
+ public static final SkyFunctionName PLATFORM_MAPPING =
SkyFunctionName.createHermetic("PLATFORM_MAPPING");
static final SkyFunctionName COVERAGE_REPORT = SkyFunctionName.createHermetic("COVERAGE_REPORT");
public static final SkyFunctionName REPOSITORY = SkyFunctionName.createHermetic("REPOSITORY");