| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 | 2 |
| 3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2011 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 # Sets up environment for building Chromium on Android. Only Android NDK, | 7 # Sets up environment for building Chromium on Android. Only Android NDK, |
| 8 # Revision 6b on Linux or Mac is offically supported. | 8 # Revision 6b on Linux or Mac is offically supported. |
| 9 # | 9 # |
| 10 # To run this script, the system environment ANDROID_NDK_ROOT must be set | 10 # To run this script, the system environment ANDROID_NDK_ROOT must be set |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 # If the TARGET_PRODUCT wasn't set, use 'full' by default. | 126 # If the TARGET_PRODUCT wasn't set, use 'full' by default. |
| 127 if [ -z "${TARGET_PRODUCT}" ]; then | 127 if [ -z "${TARGET_PRODUCT}" ]; then |
| 128 TARGET_PRODUCT="full" | 128 TARGET_PRODUCT="full" |
| 129 fi | 129 fi |
| 130 | 130 |
| 131 # The following defines will affect ARM code generation of both C/C++ compiler | 131 # The following defines will affect ARM code generation of both C/C++ compiler |
| 132 # and V8 mksnapshot. | 132 # and V8 mksnapshot. |
| 133 case "${TARGET_PRODUCT}" in | 133 case "${TARGET_PRODUCT}" in |
| 134 "full") | 134 "full") |
| 135 DEFINES+=" target_arch=arm" | 135 DEFINES+=" target_arch=arm" |
| 136 DEFINES+=" arm_neon=0 armv7=0 arm_thumb=1 arm_fpu=vfp" | 136 DEFINES+=" arm_neon=0 armv7=1 arm_thumb=1 arm_fpu=vfpv3-d16" |
| 137 ;; | 137 ;; |
| 138 *x86*) | 138 *x86*) |
| 139 DEFINES+=" target_arch=ia32 use_libffmpeg=0" | 139 DEFINES+=" target_arch=ia32 use_libffmpeg=0" |
| 140 ;; | 140 ;; |
| 141 *) | 141 *) |
| 142 echo "TARGET_PRODUCT: ${TARGET_PRODUCT} is not supported." >& 2 | 142 echo "TARGET_PRODUCT: ${TARGET_PRODUCT} is not supported." >& 2 |
| 143 return 1 | 143 return 1 |
| 144 esac | 144 esac |
| 145 | 145 |
| 146 export GYP_DEFINES="${DEFINES}" | 146 export GYP_DEFINES="${DEFINES}" |
| 147 | 147 |
| 148 # Use the "android" flavor of the Makefile generator for both Linux and OS X. | 148 # Use the "android" flavor of the Makefile generator for both Linux and OS X. |
| 149 export GYP_GENERATORS="make-android" | 149 export GYP_GENERATORS="make-android" |
| 150 | 150 |
| 151 # Use our All target as the default | 151 # Use our All target as the default |
| 152 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" | 152 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" |
| 153 | 153 |
| 154 # We want to use our version of "all" targets. | 154 # We want to use our version of "all" targets. |
| 155 export CHROMIUM_GYP_FILE="${CHROME_SRC}/build/all_android.gyp" | 155 export CHROMIUM_GYP_FILE="${CHROME_SRC}/build/all_android.gyp" |
| OLD | NEW |