From 375f72b29ab28db3df093531b978c4370b059d54 Mon Sep 17 00:00:00 2001 From: mstaib Date: Thu, 18 Apr 2019 14:29:04 -0700 Subject: [PATCH] Add safety checks for toolchain resolution in preparation for trimming. Trimming has to make assumptions about what configuration is used in the process of calculating toolchains. These checks enforce those assumptions. Progress on #6524. PiperOrigin-RevId: 244258819 --- .../build/lib/analysis/ToolchainResolver.java | 22 ++++++++-- .../skyframe/ConfiguredTargetFunction.java | 2 + .../lib/skyframe/PlatformLookupUtil.java | 43 +++++++++++++++---- .../RegisteredExecutionPlatformsFunction.java | 22 +++++++++- .../RegisteredToolchainsFunction.java | 19 ++++++++ .../SingleToolchainResolutionFunction.java | 5 ++- .../lib/skyframe/PlatformLookupUtilTest.java | 2 +- 7 files changed, 100 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/google/devtools/build/lib/analysis/ToolchainResolver.java b/src/main/java/com/google/devtools/build/lib/analysis/ToolchainResolver.java index ead2d5268edce5..04e548a82b5f67 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/ToolchainResolver.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/ToolchainResolver.java @@ -66,6 +66,7 @@ public class ToolchainResolver { // Optional data. private ImmutableSet