diff options
author | 2017-09-20 18:36:44 +0200 | |
---|---|---|
committer | 2017-09-21 10:59:32 +0200 | |
commit | b20708f4d7a12236159096a5354034be70eeb87d (patch) | |
tree | 1e691f541ff02126c6743a335485fd77de8ed145 /src/main/java/com/google/devtools/build/lib/analysis/whitelisting | |
parent | d13badff830587c381e8ae8845d208753f91120d (diff) |
Only load the whitelist for Android targets if they use feature flags.
Currently, every Android-related top-level target will use the feature
flag whitelist, regardless of whether it has any feature flags.
This change makes it so that these targets only load the whitelist if
they need it.
In the process, it moves the value of the whitelist from the attribute
definition method to outside of it. Because it's a builder, this is only
a minor change to each callsite.
RELNOTES: None.
PiperOrigin-RevId: 169405621
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/analysis/whitelisting')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/analysis/whitelisting/Whitelist.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/whitelisting/Whitelist.java b/src/main/java/com/google/devtools/build/lib/analysis/whitelisting/Whitelist.java index 8850f1a9ec..10e776a3be 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/whitelisting/Whitelist.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/whitelisting/Whitelist.java @@ -44,13 +44,10 @@ public final class Whitelist { * * @param whitelistName The name of the whitelist. This has to comply with attribute naming * standards and will be used as a suffix for the attribute name. - * @param packageGroupWhitelist Label for the package group with the whitelist. */ - public static Attribute.Builder<Label> getAttributeFromWhitelistName( - String whitelistName, Label packageGroupWhitelist) { + public static Attribute.Builder<Label> getAttributeFromWhitelistName(String whitelistName) { String attributeName = getAttributeNameFromWhitelistName(whitelistName); return attr(attributeName, LABEL) - .value(packageGroupWhitelist) .cfg(HOST) .mandatoryNativeProviders(ImmutableList.of(PackageSpecificationProvider.class)); } |