| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 # | 5 # |
| 6 # Bash functions used by buildbot annotator scripts for the android | 6 # Bash functions used by buildbot annotator scripts for the android |
| 7 # build of chromium. Executing this script should not perform actions | 7 # build of chromium. Executing this script should not perform actions |
| 8 # other than setting variables and defining of functions. | 8 # other than setting variables and defining of functions. |
| 9 | 9 |
| 10 # Number of jobs on the compile line; e.g. make -j"${JOBS}" | 10 # Number of jobs on the compile line; e.g. make -j"${JOBS}" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 | 144 |
| 145 # Build using ninja. | 145 # Build using ninja. |
| 146 function bb_goma_ninja { | 146 function bb_goma_ninja { |
| 147 echo "Using ninja to build." | 147 echo "Using ninja to build." |
| 148 local TARGET=$1 | 148 local TARGET=$1 |
| 149 ninja -C out/$BUILDTYPE -j120 -l20 $TARGET | 149 ninja -C out/$BUILDTYPE -j120 -l20 $TARGET |
| 150 } | 150 } |
| 151 | 151 |
| 152 # Compile step | 152 # Compile step |
| 153 function bb_compile { | 153 function bb_compile { |
| 154 bb_compile_setup | |
| 155 # This must be named 'compile', not 'Compile', for CQ interaction. | 154 # This must be named 'compile', not 'Compile', for CQ interaction. |
| 156 # Talk to maruel for details. | 155 # Talk to maruel for details. |
| 157 echo "@@@BUILD_STEP compile@@@" | 156 echo "@@@BUILD_STEP compile@@@" |
| 157 bb_compile_setup |
| 158 | 158 |
| 159 BUILDTOOL=$(bb_get_json_prop "$FACTORY_PROPERTIES" buildtool) | 159 BUILDTOOL=$(bb_get_json_prop "$FACTORY_PROPERTIES" buildtool) |
| 160 if [[ $BUILDTOOL = ninja ]]; then | 160 if [[ $BUILDTOOL = ninja ]]; then |
| 161 bb_goma_ninja All | 161 bb_goma_ninja All |
| 162 else | 162 else |
| 163 bb_goma_make | 163 bb_goma_make |
| 164 fi | 164 fi |
| 165 | 165 |
| 166 bb_stop_goma_internal | 166 bb_stop_goma_internal |
| 167 } | 167 } |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 ) | 315 ) |
| 316 } | 316 } |
| 317 | 317 |
| 318 # Retrieve a packed json property using python | 318 # Retrieve a packed json property using python |
| 319 function bb_get_json_prop { | 319 function bb_get_json_prop { |
| 320 local JSON="$1" | 320 local JSON="$1" |
| 321 local PROP="$2" | 321 local PROP="$2" |
| 322 | 322 |
| 323 python -c "import json; print json.loads('$JSON').get('$PROP', '')" | 323 python -c "import json; print json.loads('$JSON').get('$PROP', '')" |
| 324 } | 324 } |
| OLD | NEW |