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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 local BUILDTOOL=$(bb_get_json_prop "$FACTORY_PROPERTIES" buildtool) | 53 local BUILDTOOL=$(bb_get_json_prop "$FACTORY_PROPERTIES" buildtool) |
54 if [[ $BUILDTOOL = ninja ]]; then | 54 if [[ $BUILDTOOL = ninja ]]; then |
55 export GYP_GENERATORS=ninja | 55 export GYP_GENERATORS=ninja |
56 fi | 56 fi |
57 export GOMA_DIR=/b/build/goma | 57 export GOMA_DIR=/b/build/goma |
58 . build/android/envsetup.sh | 58 . build/android/envsetup.sh |
59 | 59 |
60 local extra_gyp_defines="$(bb_get_json_prop "$FACTORY_PROPERTIES" \ | 60 local extra_gyp_defines="$(bb_get_json_prop "$FACTORY_PROPERTIES" \ |
61 extra_gyp_defines)" | 61 extra_gyp_defines)" |
62 export GYP_DEFINES+=" fastbuild=1 $extra_gyp_defines" | 62 export GYP_DEFINES+=" fastbuild=1 $extra_gyp_defines" |
63 if echo $extra_gyp_defines | grep -q clang; then | 63 if echo $extra_gyp_defines | grep -qE 'clang|asan'; then |
64 unset CXX_target | 64 unset CXX_target |
65 fi | 65 fi |
66 | 66 |
67 adb kill-server | 67 adb kill-server |
68 adb start-server | 68 adb start-server |
69 | 69 |
70 local build_path="${SRC_ROOT}/out/${BUILDTYPE}" | 70 local build_path="${SRC_ROOT}/out/${BUILDTYPE}" |
71 local landmines_triggered_path="$build_path/.landmines_triggered" | 71 local landmines_triggered_path="$build_path/.landmines_triggered" |
72 python "$SRC_ROOT/build/landmines.py" | 72 python "$SRC_ROOT/build/landmines.py" |
73 | 73 |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 ) | 417 ) |
418 } | 418 } |
419 | 419 |
420 # Retrieve a packed json property using python | 420 # Retrieve a packed json property using python |
421 function bb_get_json_prop { | 421 function bb_get_json_prop { |
422 local JSON="$1" | 422 local JSON="$1" |
423 local PROP="$2" | 423 local PROP="$2" |
424 | 424 |
425 python -c "import json; print json.loads('$JSON').get('$PROP', '')" | 425 python -c "import json; print json.loads('$JSON').get('$PROP', '')" |
426 } | 426 } |
OLD | NEW |