• Daniel Bratell's avatar
    Compiling headless_shell_switches.cc once should be enough · df591fb5
    Daniel Bratell authored
    In Windows (multi dll) builds, headless_shell_switches.cc was
    compiled twice and with some timings and linkers, that cause
    a duplicate symbol link error. In other cases one set of symbols
    was discarded as unused before the link errors.
    
    This setup was probably triggered by several build target
    (headless_renderer, headless_shell_browser_lib,
    headless_shell_child_lib and more) being compiled as if they
    were inside headless.dll in component builds. That prevented
    them from actually accessing the switches inside headless.dll.
    
    The fix is to only compile headless.dll ("component headless")
    with HEADLESS_IMPLEMENTATION, which controls HEADLESS_EXPORT,
    and to not have a duplicate copy of the switches in
    headless_shell_browser_lib.
    
    Bug: 919231
    Change-Id: Id0d5cade84b47b9053474a26a1b14723c576d346
    Reviewed-on: https://chromium-review.googlesource.com/c/1440141
    Commit-Queue: Daniel Bratell <bratell@opera.com>
    Reviewed-by: default avatarSami Kyöstilä <skyostil@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#628335}
    df591fb5
BUILD.gn 27.5 KB