aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/flags
diff options
context:
space:
mode:
authorGravatar Alex Humesky <ahumesky@google.com>2016-05-09 18:38:55 +0000
committerGravatar Klaus Aehlig <aehlig@google.com>2016-05-10 07:56:28 +0000
commit0595007b17931aff8c2412db21bb93f73c94c5b7 (patch)
treec35f536ff5d2cedaa71adc8d6d116e8b4d622196 /src/main/java/com/google/devtools/build/lib/flags
parent219150f8d2c0d595007fbfa9506702f86bb13a9c (diff)
Adds the option to invocation policy SetValue operation to append to repeated
flags, instead of always replacing all the values. -- MOS_MIGRATED_REVID=121858949
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/flags')
-rw-r--r--src/main/java/com/google/devtools/build/lib/flags/InvocationPolicyEnforcer.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/flags/InvocationPolicyEnforcer.java b/src/main/java/com/google/devtools/build/lib/flags/InvocationPolicyEnforcer.java
index a61c432f0c..083cfb4930 100644
--- a/src/main/java/com/google/devtools/build/lib/flags/InvocationPolicyEnforcer.java
+++ b/src/main/java/com/google/devtools/build/lib/flags/InvocationPolicyEnforcer.java
@@ -255,10 +255,10 @@ public final class InvocationPolicyEnforcer {
setValue.getFlagValueList()));
} else {
- // Clear the value in case the flag is a repeated flag (so that values don't accumulate), and
- // in case the flag is an expansion flag or has implicit flags (so that the additional flags
- // also get cleared).
- parser.clearValue(flagName);
+ if (!setValue.getAppend()) {
+ // Clear the value in case the flag is a repeated flag so that values don't accumulate.
+ parser.clearValue(flagName);
+ }
// Set all the flag values from the policy.
for (String flagValue : setValue.getFlagValueList()) {