| 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 15 matching lines...) Expand all Loading... |
| 26 ################################################################################ | 26 ################################################################################ |
| 27 common_vars_defines() { | 27 common_vars_defines() { |
| 28 # Set toolchain path according to product architecture. | 28 # Set toolchain path according to product architecture. |
| 29 case "${TARGET_ARCH}" in | 29 case "${TARGET_ARCH}" in |
| 30 "arm") | 30 "arm") |
| 31 toolchain_arch="arm-linux-androideabi" | 31 toolchain_arch="arm-linux-androideabi" |
| 32 ;; | 32 ;; |
| 33 "x86") | 33 "x86") |
| 34 toolchain_arch="x86" | 34 toolchain_arch="x86" |
| 35 ;; | 35 ;; |
| 36 "mips") |
| 37 toolchain_arch="mipsel-linux-android" |
| 38 toolchain_dir="linux-x86" |
| 39 ;; |
| 36 *) | 40 *) |
| 37 echo "TARGET_ARCH: ${TARGET_ARCH} is not supported." >& 2 | 41 echo "TARGET_ARCH: ${TARGET_ARCH} is not supported." >& 2 |
| 38 print_usage | 42 print_usage |
| 39 return 1 | 43 return 1 |
| 40 ;; | 44 ;; |
| 41 esac | 45 esac |
| 42 | 46 |
| 43 toolchain_version="4.6" | 47 toolchain_version="4.6" |
| 44 # We directly set the gcc_version since we know what we use, and it should | 48 # We directly set the gcc_version since we know what we use, and it should |
| 45 # be set to xx instead of x.x. Refer the output of compiler_version.py. | 49 # be set to xx instead of x.x. Refer the output of compiler_version.py. |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 ;; | 115 ;; |
| 112 "x86") | 116 "x86") |
| 113 # TODO(tedbo): The ia32 build fails on ffmpeg, so we disable it here. | 117 # TODO(tedbo): The ia32 build fails on ffmpeg, so we disable it here. |
| 114 DEFINES+=" use_libffmpeg=0" | 118 DEFINES+=" use_libffmpeg=0" |
| 115 | 119 |
| 116 host_arch=$(uname -m | sed -e \ | 120 host_arch=$(uname -m | sed -e \ |
| 117 's/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/') | 121 's/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/') |
| 118 DEFINES+=" host_arch=${host_arch}" | 122 DEFINES+=" host_arch=${host_arch}" |
| 119 DEFINES+=" target_arch=ia32" | 123 DEFINES+=" target_arch=ia32" |
| 120 ;; | 124 ;; |
| 125 "mips") |
| 126 DEFINES+=" target_arch=mipsel" |
| 127 ;; |
| 121 *) | 128 *) |
| 122 echo "TARGET_ARCH: ${TARGET_ARCH} is not supported." >& 2 | 129 echo "TARGET_ARCH: ${TARGET_ARCH} is not supported." >& 2 |
| 123 print_usage | 130 print_usage |
| 124 return 1 | 131 return 1 |
| 125 esac | 132 esac |
| 126 } | 133 } |
| 127 | 134 |
| 128 | 135 |
| 129 ################################################################################ | 136 ################################################################################ |
| 130 # Exports common GYP variables based on variable DEFINES and CHROME_SRC. | 137 # Exports common GYP variables based on variable DEFINES and CHROME_SRC. |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 export GYP_DEFINES="${DEFINES}" | 301 export GYP_DEFINES="${DEFINES}" |
| 295 | 302 |
| 296 export GYP_GENERATORS="android" | 303 export GYP_GENERATORS="android" |
| 297 | 304 |
| 298 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" | 305 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" |
| 299 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" | 306 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" |
| 300 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} auto_regeneration=0" | 307 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} auto_regeneration=0" |
| 301 | 308 |
| 302 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/all_webview.gyp" | 309 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/all_webview.gyp" |
| 303 } | 310 } |
| OLD | NEW |