diff options
author | 2017-06-02 16:04:07 -0400 | |
---|---|---|
committer | 2017-06-05 10:18:57 -0400 | |
commit | f19fcfebb81759a5ab4fe6bede35195287f89872 (patch) | |
tree | 26a0a1ee0edc18705178a6003cb63c63852139cd /src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java | |
parent | 4169ae7eeea951b9df9b4a77e78411180935a3c6 (diff) |
Automated g4 rollforward of commit b71e99b1f3746103e5d6802eebc24096b3494959.
(Automated g4 rollback of commit de92f9d8ea093416fae999073bbfcf3cf501ab55).
*** Reason for rollback ***
The problems that forced commit de92f9d8ea093416fae999073bbfcf3cf501ab55 were fixed in commit e6392cd380fce14d719890c78d5eb2657e8a6cfc .
*** Original change description being rolled forward ***
Implement dynamically configured LIPO builds.
Quick overview:
- provide a dynamic interface for getting the artifact owner
configuration
- provide a (dynamic) RuleTransitionFactory LIPO_ON_DEMAND to replace
the (static) RuleClass.Configurator LIPO_ON_DEMAND. Eventually
we'll remove the rule class configurator interface entirely....
***
ROLLBACK_OF=156180015
PiperOrigin-RevId: 157865224
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java index b28b237eab..77d8394679 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java @@ -1466,10 +1466,17 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { BuildConfiguration configuration, Attribute.Transition transition) { - Preconditions.checkArgument(configuration == null - || configuration.useDynamicConfigurations() - || transition == ConfigurationTransition.NONE, - "Dynamic configurations required for test configuration using a transition"); + if (configuration != null && !configuration.useDynamicConfigurations() + && transition != ConfigurationTransition.NONE) { + // It's illegal to apply this transition over a statically configured build. But C++ LIPO + // support works by applying a rule configurator for static configurations and a rule + // transition applier for dynamic configurations. Dynamically configured builds skip + // the configurator and this code makes statically configured builds skip the rule transition + // applier. + // + // This will all get a lot simpler once static configurations are removed entirely. + transition = ConfigurationTransition.NONE; + } if (memoizingEvaluator.getExistingValueForTesting( PrecomputedValue.WORKSPACE_STATUS_KEY.getKeyForTesting()) == null) { |