Chromium Code Reviews| 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" | |
|
cjhopman
2013/04/19 18:02:10
For arm/x86 toolchain_dir is set based on host_arc
petarj
2013/04/21 01:17:14
When host_arch is "x86_64", it expects to find fol
Yaron
2013/04/22 22:06:07
Does this actually build when not using a 64-bit t
| |
| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 113 ;; | 117 ;; |
| 114 "x86") | 118 "x86") |
| 115 # TODO(tedbo): The ia32 build fails on ffmpeg, so we disable it here. | 119 # TODO(tedbo): The ia32 build fails on ffmpeg, so we disable it here. |
| 116 DEFINES+=" use_libffmpeg=0" | 120 DEFINES+=" use_libffmpeg=0" |
| 117 | 121 |
| 118 host_arch=$(uname -m | sed -e \ | 122 host_arch=$(uname -m | sed -e \ |
| 119 's/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/') | 123 's/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/') |
| 120 DEFINES+=" host_arch=${host_arch}" | 124 DEFINES+=" host_arch=${host_arch}" |
| 121 DEFINES+=" target_arch=ia32" | 125 DEFINES+=" target_arch=ia32" |
| 122 ;; | 126 ;; |
| 127 "mips") | |
| 128 DEFINES+=" target_arch=mipsel" | |
| 129 ;; | |
| 123 *) | 130 *) |
| 124 echo "TARGET_ARCH: ${TARGET_ARCH} is not supported." >& 2 | 131 echo "TARGET_ARCH: ${TARGET_ARCH} is not supported." >& 2 |
| 125 print_usage | 132 print_usage |
| 126 return 1 | 133 return 1 |
| 127 esac | 134 esac |
| 128 } | 135 } |
| 129 | 136 |
| 130 | 137 |
| 131 ################################################################################ | 138 ################################################################################ |
| 132 # Exports common GYP variables based on variable DEFINES and CHROME_SRC. | 139 # Exports common GYP variables based on variable DEFINES and CHROME_SRC. |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 296 export GYP_DEFINES="${DEFINES}" | 303 export GYP_DEFINES="${DEFINES}" |
| 297 | 304 |
| 298 export GYP_GENERATORS="android" | 305 export GYP_GENERATORS="android" |
| 299 | 306 |
| 300 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" | 307 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" |
| 301 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" | 308 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" |
| 302 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} auto_regeneration=0" | 309 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} auto_regeneration=0" |
| 303 | 310 |
| 304 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/all_webview.gyp" | 311 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/all_webview.gyp" |
| 305 } | 312 } |
| OLD | NEW |