| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 | 2 |
| 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 # Defines functions for envsetup.sh which sets up environment for building | 7 # Defines functions for envsetup.sh which sets up environment for building |
| 8 # Chromium on Android. The build can be either use the Android NDK/SDK or | 8 # Chromium on Android. The build can be either use the Android NDK/SDK or |
| 9 # android source tree. Each has a unique init function which calls functions | 9 # android source tree. Each has a unique init function which calls functions |
| 10 # prefixed with "common_" that is common for both environment setups. | 10 # prefixed with "common_" that is common for both environment setups. |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 ;; | 125 ;; |
| 126 "mips") | 126 "mips") |
| 127 DEFINES+=" target_arch=mipsel" | 127 DEFINES+=" target_arch=mipsel" |
| 128 DEFINES+=" mips_arch_variant=mips32r1" | 128 DEFINES+=" mips_arch_variant=mips32r1" |
| 129 ;; | 129 ;; |
| 130 *) | 130 *) |
| 131 echo "TARGET_ARCH: ${TARGET_ARCH} is not supported." >& 2 | 131 echo "TARGET_ARCH: ${TARGET_ARCH} is not supported." >& 2 |
| 132 print_usage | 132 print_usage |
| 133 return 1 | 133 return 1 |
| 134 esac | 134 esac |
| 135 | |
| 136 # nacl isn't enabled for android, avoid downloading the toolchain. | |
| 137 DEFINES+=" -Ddisable_nacl=1" | |
| 138 } | 135 } |
| 139 | 136 |
| 140 | 137 |
| 141 ################################################################################ | 138 ################################################################################ |
| 142 # Exports common GYP variables based on variable DEFINES and CHROME_SRC. | 139 # Exports common GYP variables based on variable DEFINES and CHROME_SRC. |
| 143 ################################################################################ | 140 ################################################################################ |
| 144 common_gyp_vars() { | 141 common_gyp_vars() { |
| 145 export GYP_DEFINES="${DEFINES}" | 142 export GYP_DEFINES="${DEFINES}" |
| 146 | 143 |
| 147 # Set GYP_GENERATORS to ninja if it's currently unset or null. | 144 # Set GYP_GENERATORS to ninja if it's currently unset or null. |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 export GYP_DEFINES="${DEFINES}" | 324 export GYP_DEFINES="${DEFINES}" |
| 328 | 325 |
| 329 export GYP_GENERATORS="android" | 326 export GYP_GENERATORS="android" |
| 330 | 327 |
| 331 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" | 328 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" |
| 332 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" | 329 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" |
| 333 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} auto_regeneration=0" | 330 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} auto_regeneration=0" |
| 334 | 331 |
| 335 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/all_webview.gyp" | 332 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/all_webview.gyp" |
| 336 } | 333 } |
| OLD | NEW |