• Bruce Dawson's avatar
    autoninja - ninja wrapper to make goma easier · ebebd952
    Bruce Dawson authored
    Using goma requires the developer to remember which build directories
    use goma and which don't so that they can pass an appropriate -j number.
    Getting this wrong makes builds slower, either by under utilizing
    resources or by causing a self-inflicted DOS attack. Usage:
    
        autoninja -C out/debug
    
    autoninja looks at the settings for the specified build directory and
    then selects either -j num_cores*20 or no -j flag based on the
    use_goma setting.
    
    You can set the NINJA_CORE_MULTIPLIER variable to change from the
    default 20* multiplier. You can also use NINJA_CORE_ADDITION if you
    want non-goma builds to specify -j with an offset to the number of
    cores, such as this Linux command:
    
        NINJA_CORE_ADDITION=-2 autoninja -C out/release base
    
    This will tell autoninja to pass -j to ninja with num_cores-2 as the
    parameter.
    
    On Windows you can have a ninja.bat file (ahead of ninja on the path)
    such that autoninja will automatically be used. It should contain this:
        @call autoninja.bat %*
    
    Change-Id: I4003e3fc323d1cbab612999c945b5a8dc5bc6655
    Reviewed-on: https://chromium-review.googlesource.com/517662Reviewed-by: 's avatarDirk Pranke <dpranke@chromium.org>
    Reviewed-by: 's avatarFumitoshi Ukai <ukai@chromium.org>
    Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
    ebebd952
autoninja.bat 380 Bytes