• Tomas Popela's avatar
    Add a way to specify logging function for stub files · c593df03
    Tomas Popela authored
    Currently when the stubs code is used outside of the Chromium (i.e. in
    WebRTC) the build will fail because of the missing implementation of
    VLOG() - it's defined in the //base/logging.h, but WebRTC can't use that as it
    uses its own //base_rtc/logging.h with RTC_LOG() functions.
    
    To make it buildable there add a two new options to the
    generate_stubs.py. The first one '--logging-function' or '-l' is used
    for passing the function call for logging. Its default value is set to
    'VLOG(1)' so the current code doesn't need to be updated. The second one
    is '--logging-include' or '-n' that is used for passing the header file
    where the function from the '--logging-function' is defined.
    
    Change-Id: Iafc898deb818c0a140d177d0190f4db52294df0d
    Reviewed-on: https://chromium-review.googlesource.com/c/1317918Reviewed-by: default avatarPatrik Höglund <phoglund@chromium.org>
    Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
    Commit-Queue: Tomáš Popela <tomas.popela@gmail.com>
    Cr-Commit-Position: refs/heads/master@{#606405}
    c593df03
generate_stubs_unittest.py 12.5 KB