Silently ignore the D8 desugar SynthesizedClass attribute in ijar
The attribute currently contains a short value, and has no references to the constant pool.
See
https://r8-review.googlesource.com/c/r8/+/59895
https://r8-review.googlesource.com/c/r8/+/59980
https://r8-review.googlesource.com/c/r8/+/60133
for reference.
PiperOrigin-RevId: 375029196
diff --git a/third_party/ijar/classfile.cc b/third_party/ijar/classfile.cc
index aa72477..7c75876 100644
--- a/third_party/ijar/classfile.cc
+++ b/third_party/ijar/classfile.cc
@@ -1460,8 +1460,12 @@
} else {
// Skip over unknown attributes with a warning. The JVM spec
// says this is ok, so long as we handle the mandatory attributes.
- fprintf(stderr, "ijar: skipping unknown attribute: \"%s\".\n",
- attr_name.c_str());
+ // Don't even warn for the D8 desugar SynthesizedClass attribute. It is
+ // not relevant for ijar.
+ if (attr_name != "com.android.tools.r8.SynthesizedClass") {
+ fprintf(stderr, "ijar: skipping unknown attribute: \"%s\".\n",
+ attr_name.c_str());
+ }
p += attribute_length;
}
}