1. 06 May, 2019 1 commit
  2. 24 Apr, 2019 1 commit
  3. 29 Jan, 2019 1 commit
  4. 10 Jan, 2019 1 commit
  5. 06 Dec, 2018 1 commit
  6. 03 Dec, 2018 1 commit
  7. 17 Oct, 2018 1 commit
  8. 13 Feb, 2018 1 commit
    • Bruce Dawson's avatar
      Fix autoninja && chrome on failed builds · 46541b49
      Bruce Dawson authored
      A handy usage pattern for autoninja.bat that I was not aware of is to go
      
          autoninja -C out\Default chrome && chrome
      
      This will build chrome and then run it, but only run it if the build
      succeeds. The addition of post_build_ninja_summary.py broke this by
      losing the error code. This change fixes it by using black magic to
      set an error code in the failure case.
      
      Bug: chromium:787983
      Change-Id: Ib87fd1799816e19d56de76e08e0f9688be903d80
      Reviewed-on: https://chromium-review.googlesource.com/916705Reviewed-by: 's avatarDirk Pranke <dpranke@chromium.org>
      Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
      46541b49
  9. 09 Feb, 2018 1 commit
    • Bruce Dawson's avatar
      Script to summarize performance of ninja builds · ffc0c7c6
      Bruce Dawson authored
      post_build_ninja_summary.py analyzes the .ninja_log file in an output
      directory to summarize build performance. It lists the most expensive
      build steps, and build-step types, printing both their elapsed time and,
      more importantly, their "weighted" time which is a measure of their
      contribution to the total build time.
      
      For each time segment within the build the running build steps
      accumulate weighted time that is proportional to the elapsed time
      divided by the number of tasks running. If a thousand compilation steps
      are running in parallel then they will each be "charged" for 1/1,000th
      of the elapsed time. If a single link step is running alone then it is
      charged with all of the elapsed time.
      
      Bug: chromium:787983
      Change-Id: Id5aea715f798a16415dd0365a27f0051202668e5
      Reviewed-on: https://chromium-review.googlesource.com/871988Reviewed-by: 's avatarDirk Pranke <dpranke@chromium.org>
      Reviewed-by: 's avatarErik Staab <estaab@chromium.org>
      Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
      ffc0c7c6
  10. 29 Sep, 2017 1 commit
    • Bruce Dawson's avatar
      Fix autoninja to allow compiling one source file · f3b4f060
      Bruce Dawson authored
      This is the second attempt at fixing autoninja to allow passing '^^' to
      it to specify that ninja should build the outputs of the specified file
      instead of building that file itself. The problem is that '^' is a
      special character and when extra layers of indirection are added the
      number of '^' characters needed grows exponentially in some poorly
      understood way. The first fix attempt just quoted the arguments that
      autoninja.bat passed to autoninja.py, but that meant they came in as
      one argument. This fix expands on that by modifying autoninja.py to
      understand how to deal with the monolithic argument. With this change
      this once again works:
      
          autoninja -C out\debug_component ..\..\base\win\enum_variant.cc^^
      
      It can be convenient to have a ninja.bat file which starts goma and lets
      users keep typing the same build commands. However even with this fix
      the previously recommended ninja.bat file must be invoked with four
      '^' characters. If that is too much then the new recommended ninja.bat
      is to copy autoninja.bat and modify as needed, perhaps like this:
      
          @echo off
          call python c:\goma\goma-win64\goma_ctl.py ensure_start >nul
          FOR /f "usebackq tokens=*" %%a in (`python c:\src\depot_tools\autoninja.py "%*"`) do echo %%a & %%a
      
      BUG: 758725
      Change-Id: Ieee9cf343ee5f22e9988a1969cb7a7a90687666b
      Reviewed-on: https://chromium-review.googlesource.com/656478Reviewed-by: 's avatarSébastien Marchand <sebmarchand@chromium.org>
      Reviewed-by: 's avatarDirk Pranke <dpranke@chromium.org>
      Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
      f3b4f060
  11. 06 Sep, 2017 2 commits
    • Bruce Dawson's avatar
      Revert "Fix autoninja.bat to not swallow ^^ sequences" · 464a4779
      Bruce Dawson authored
      This reverts commit ee3946be.
      
      Reason for revert: This broke autoninja. The arguments all come in as one and aren't recognized. I think I can fix but I'm reverting for now.
      
      Original change's description:
      > Fix autoninja.bat to not swallow ^^ sequences
      > 
      > Ninja uses the '^' character to indicate that ninja should build the
      > targets that are generated from the specified file, rather than
      > building the specified file. On Windows '^^' is needed because '^' is
      > the line continuation character. However autoninja.bat complicates
      > things because the multiple levels of batch files successfully swallow
      > pairs of '^' characters.
      > 
      > By adding quotes around %* in autoninja.bat it becomes possible to
      > invoke autoninja.bat normally. That is, this works:
      > 
      >     autoninja -C out\debug_component ..\..\base\win\enum_variant.cc^^
      > 
      > It can be convenient to have a ninja.bat file which starts goma and lets
      > users keep typing the same build commands. However even with this fix
      > the previously recommended ninja.bat file requires four '^' characters.
      > If that is too much then the new recommended ninja.bat is to copy
      > autoninja.bat and modify as needed, perhaps like this:
      > 
      >     @echo off
      >     call python c:\goma\goma-win64\goma_ctl.py ensure_start >nul
      >     FOR /f "usebackq tokens=*" %%a in (`python c:\src\depot_tools\autoninja.py "%*"`) do echo %%a & %%a
      > 
      > BUG=758725
      > 
      > Change-Id: I648cf42675af2f946be7aa4033956b015d953829
      > Reviewed-on: https://chromium-review.googlesource.com/651826
      > Reviewed-by: Sébastien Marchand <sebmarchand@chromium.org>
      > Reviewed-by: Dirk Pranke <dpranke@chromium.org>
      > Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
      
      TBR=dpranke@chromium.org,brucedawson@chromium.org,sebmarchand@chromium.org
      
      Change-Id: I131b9ba00882acb5a2d009a2a444f186740d7394
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: 758725
      Reviewed-on: https://chromium-review.googlesource.com/654117
      Commit-Queue: Dirk Pranke <dpranke@chromium.org>
      Reviewed-by: 's avatarDirk Pranke <dpranke@chromium.org>
      464a4779
    • Bruce Dawson's avatar
      Fix autoninja.bat to not swallow ^^ sequences · ee3946be
      Bruce Dawson authored
      Ninja uses the '^' character to indicate that ninja should build the
      targets that are generated from the specified file, rather than
      building the specified file. On Windows '^^' is needed because '^' is
      the line continuation character. However autoninja.bat complicates
      things because the multiple levels of batch files successfully swallow
      pairs of '^' characters.
      
      By adding quotes around %* in autoninja.bat it becomes possible to
      invoke autoninja.bat normally. That is, this works:
      
          autoninja -C out\debug_component ..\..\base\win\enum_variant.cc^^
      
      It can be convenient to have a ninja.bat file which starts goma and lets
      users keep typing the same build commands. However even with this fix
      the previously recommended ninja.bat file requires four '^' characters.
      If that is too much then the new recommended ninja.bat is to copy
      autoninja.bat and modify as needed, perhaps like this:
      
          @echo off
          call python c:\goma\goma-win64\goma_ctl.py ensure_start >nul
          FOR /f "usebackq tokens=*" %%a in (`python c:\src\depot_tools\autoninja.py "%*"`) do echo %%a & %%a
      
      BUG=758725
      
      Change-Id: I648cf42675af2f946be7aa4033956b015d953829
      Reviewed-on: https://chromium-review.googlesource.com/651826Reviewed-by: 's avatarSébastien Marchand <sebmarchand@chromium.org>
      Reviewed-by: 's avatarDirk Pranke <dpranke@chromium.org>
      Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
      ee3946be
  12. 12 Jun, 2017 1 commit
    • 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