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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 # shared library, libchromeview.so. The file is an order list of section | 91 # shared library, libchromeview.so. The file is an order list of section |
92 # names and the library is linked with option | 92 # names and the library is linked with option |
93 # --section-ordering-file=<orderfile>. The order file is updated by profiling | 93 # --section-ordering-file=<orderfile>. The order file is updated by profiling |
94 # startup after compiling with the order_profiling=1 GYP_DEFINES flag. | 94 # startup after compiling with the order_profiling=1 GYP_DEFINES flag. |
95 ORDER_DEFINES="order_text_section=${CHROME_SRC}/orderfiles/orderfile.out" | 95 ORDER_DEFINES="order_text_section=${CHROME_SRC}/orderfiles/orderfile.out" |
96 | 96 |
97 # The following defines will affect ARM code generation of both C/C++ compiler | 97 # The following defines will affect ARM code generation of both C/C++ compiler |
98 # and V8 mksnapshot. | 98 # and V8 mksnapshot. |
99 case "${TARGET_PRODUCT}" in | 99 case "${TARGET_PRODUCT}" in |
100 "passion"|"soju"|"sojua"|"sojus"|"yakju"|"mysid"|"nakasi") | 100 "passion"|"soju"|"sojua"|"sojus"|"yakju"|"mysid"|"nakasi") |
| 101 TARGET_ARCH="arm" |
| 102 TARGET_ARCH_VARIANT="armv7-a-neon" |
| 103 ;; |
| 104 "trygon"|"tervigon") |
| 105 TARGET_ARCH="arm" |
| 106 TARGET_ARCH_VARIANT="armv7-a" |
| 107 ;; |
| 108 "full") |
| 109 TARGET_ARCH="arm" |
| 110 TARGET_ARCH_VARIANT="armv5te" |
| 111 ;; |
| 112 *x86*) |
| 113 TARGET_ARCH_VARIANT="x86" |
| 114 TARGET_ARCH="x86" |
| 115 ;; |
| 116 *) |
| 117 if [ -z "${TARGET_ARCH_VARIANT}" ]; then |
| 118 # Deal with unknown TARGET_PRODUCT. Try to get TARGET_ARCH_VARIANT |
| 119 # if it is not defined yet. |
| 120 if [ "$(type -t get_build_var)" == "function" ]; then |
| 121 TARGET_ARCH_VARIANT=$(get_build_var TARGET_ARCH_VARIANT 2> /dev/null) |
| 122 fi |
| 123 fi |
| 124 esac |
| 125 |
| 126 case "${TARGET_ARCH_VARIANT}" in |
| 127 "armv7-a-neon") |
101 DEFINES+=" arm_neon=1 armv7=1 arm_thumb=1" | 128 DEFINES+=" arm_neon=1 armv7=1 arm_thumb=1" |
102 DEFINES+=" ${ORDER_DEFINES}" | 129 DEFINES+=" ${ORDER_DEFINES}" |
103 TARGET_ARCH="arm" | |
104 ;; | 130 ;; |
105 "trygon"|"tervigon") | 131 "armv7-a") |
106 DEFINES+=" arm_neon=0 armv7=1 arm_thumb=1 arm_fpu=vfpv3-d16" | 132 DEFINES+=" arm_neon=0 armv7=1 arm_thumb=1 arm_fpu=vfpv3-d16" |
107 DEFINES+=" ${ORDER_DEFINES}" | 133 DEFINES+=" ${ORDER_DEFINES}" |
108 TARGET_ARCH="arm" | |
109 ;; | 134 ;; |
110 "full") | 135 "armv5te") |
111 DEFINES+=" arm_neon=0 armv7=0 arm_thumb=1 arm_fpu=vfp" | 136 DEFINES+=" arm_neon=0 armv7=0 arm_thumb=1 arm_fpu=vfp" |
112 TARGET_ARCH="arm" | |
113 ;; | 137 ;; |
114 *x86*) | 138 "x86") |
115 # TODO(tedbo): The ia32 build fails on ffmpeg, so we disable it here. | 139 # TODO(tedbo): The ia32 build fails on ffmpeg, so we disable it here. |
116 DEFINES+=" use_libffmpeg=0" | 140 DEFINES+=" use_libffmpeg=0" |
117 | 141 |
118 host_arch=$(uname -m | sed -e \ | 142 host_arch=$(uname -m | sed -e \ |
119 's/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/') | 143 's/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/') |
120 DEFINES+=" host_arch=${host_arch}" | 144 DEFINES+=" host_arch=${host_arch}" |
121 TARGET_ARCH="x86" | |
122 ;; | 145 ;; |
123 *) | 146 *) |
124 echo "TARGET_PRODUCT: ${TARGET_PRODUCT} is not supported." >& 2 | 147 echo "TARGET_PRODUCT: ${TARGET_PRODUCT} is not supported." >& 2 |
125 return 1 | 148 return 1 |
126 esac | 149 esac |
127 | 150 |
128 case "${TARGET_ARCH}" in | 151 case "${TARGET_ARCH}" in |
129 "arm") | 152 "arm") |
130 DEFINES+=" target_arch=arm" | 153 DEFINES+=" target_arch=arm" |
131 ;; | 154 ;; |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 export GYP_DEFINES="${DEFINES}" | 348 export GYP_DEFINES="${DEFINES}" |
326 | 349 |
327 export GYP_GENERATORS="android" | 350 export GYP_GENERATORS="android" |
328 | 351 |
329 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" | 352 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" |
330 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" | 353 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" |
331 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} auto_regeneration=0" | 354 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} auto_regeneration=0" |
332 | 355 |
333 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/all_webview.gyp" | 356 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/all_webview.gyp" |
334 } | 357 } |
OLD | NEW |