diff options
author | 2017-09-14 20:45:02 +0200 | |
---|---|---|
committer | 2017-09-15 11:28:13 +0200 | |
commit | dc4dddf7bd2b9963c4d181de75c0809657fb5d4b (patch) | |
tree | c3a9bb9c27db46bbec4eac440b1f65448c690f32 /src/main/java/com/google/devtools/build | |
parent | c60f973eeb1a0ed4faa35e50734de7e9d5248770 (diff) |
Remove warning about multiple options in copts.
Fixes #3526
Closes #3725.
Change-Id: Ice068542e574661f9dff199f88a1e56fea191de3
PiperOrigin-RevId: 168720424
Diffstat (limited to 'src/main/java/com/google/devtools/build')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/cpp/CcCommon.java | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCommon.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCommon.java index ff3af5dc16..da4ec05b07 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCommon.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCommon.java @@ -149,20 +149,6 @@ public final class CcCommon { public ImmutableList<String> getCopts() { Preconditions.checkState(hasAttribute("copts", Type.STRING_LIST)); - // TODO(bazel-team): getAttributeCopts should not tokenize the strings. Make a warning for now. - List<String> tokens = new ArrayList<>(); - for (String str : ruleContext.attributes().get("copts", Type.STRING_LIST)) { - tokens.clear(); - try { - ShellUtils.tokenize(tokens, str); - if (tokens.size() > 1) { - ruleContext.attributeWarning("copts", - "each item in the list should contain only one option"); - } - } catch (ShellUtils.TokenizationException e) { - // ignore, the error is reported in the getAttributeCopts call - } - } if (!getCoptsFilter(ruleContext).apply("-Wno-future-warnings")) { ruleContext.attributeWarning( |