• Peter Wen's avatar
    Android: Use d8's desugar dependencies · 5ef0e3bb
    Peter Wen authored
    Based on Søren's sample code in http://b/176818423.
    
    D8's java API allows us to determine the exact set of dependencies that
    a class in the current target depends on to desugar correctly (generally
    its superclass(es) and interface(s) it implements). The class would only
    need to be re-desugared with D8 if one of these dependencies changes.
    
    This CL makes use of this information in a less granular way. If any jar
    containing one of these dependencies is changed, then we re-dex all the
    classes. Even so, this limited reduction in dependencies from using D8
    for desugaring reduced the previous regression from +50% to +10% for the
    base_java_sig benchmark.
    
    Follow-up CLs will attempt to make use of the more granular desugar
    dependency information to further improve the timing of D8 desugar. For
    the time being, we are continuing to use bazel desugar.
    
    Bug: 1015559
    Change-Id: If507a4013af7bed0820758629a4b9db69942727b
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2621928
    Commit-Queue: Peter Wen <wnwen@chromium.org>
    Auto-Submit: Peter Wen <wnwen@chromium.org>
    Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#844201}
    5ef0e3bb
BUILD.gn 46.5 KB