diff options
author | 2017-05-16 16:34:58 +0200 | |
---|---|---|
committer | 2017-05-17 15:17:56 +0200 | |
commit | de92f9d8ea093416fae999073bbfcf3cf501ab55 (patch) | |
tree | ed24c618c90628cdf3f1fe9e369b3a915e9ec570 /src/main/java/com/google/devtools/build/lib/packages | |
parent | 7184b6f55a8cb72094a481d056fe89bc7be80c76 (diff) |
Automated g4 rollback of commit b71e99b1f3746103e5d6802eebc24096b3494959.
*** Reason for rollback ***
Causes crash bug in certain circumstances.
*** Original change description ***
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.
This doesn't actually turn dynamic LIPO on. So the direct effect of
this change should be a no-op. The flip will come in a followup
change. For now, dynamic...
PiperOrigin-RevId: 156180015
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/packages')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/packages/RuleClass.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java b/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java index 698cf58cca..9293b093ac 100644 --- a/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java +++ b/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java @@ -758,7 +758,7 @@ public class RuleClass { public Builder cfg(Transition transition) { Preconditions.checkState(type != RuleClassType.ABSTRACT, "Setting not inherited property (cfg) of abstract rule class '%s'", name); - Preconditions.checkState(this.transitionFactory == null, + Preconditions.checkState(this.transitionFactory == null && this.configurator == NO_CHANGE, "Property cfg has already been set"); Preconditions.checkNotNull(transition); this.transitionFactory = new FixedTransitionFactory(transition); @@ -768,7 +768,7 @@ public class RuleClass { public Builder cfg(RuleTransitionFactory transitionFactory) { Preconditions.checkState(type != RuleClassType.ABSTRACT, "Setting not inherited property (cfg) of abstract rule class '%s'", name); - Preconditions.checkState(this.transitionFactory == null, + Preconditions.checkState(this.transitionFactory == null && this.configurator == NO_CHANGE, "Property cfg has already been set"); Preconditions.checkNotNull(transitionFactory); this.transitionFactory = transitionFactory; |