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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
85 # shared library, libchromeview.so. The file is an order list of section | 85 # shared library, libchromeview.so. The file is an order list of section |
86 # names and the library is linked with option | 86 # names and the library is linked with option |
87 # --section-ordering-file=<orderfile>. The order file is updated by profiling | 87 # --section-ordering-file=<orderfile>. The order file is updated by profiling |
88 # startup after compiling with the order_profiling=1 GYP_DEFINES flag. | 88 # startup after compiling with the order_profiling=1 GYP_DEFINES flag. |
89 ORDER_DEFINES="order_text_section=${CHROME_SRC}/orderfiles/orderfile.out" | 89 ORDER_DEFINES="order_text_section=${CHROME_SRC}/orderfiles/orderfile.out" |
90 | 90 |
91 # The following defines will affect ARM code generation of both C/C++ compiler | 91 # The following defines will affect ARM code generation of both C/C++ compiler |
92 # and V8 mksnapshot. | 92 # and V8 mksnapshot. |
93 case "${TARGET_PRODUCT}" in | 93 case "${TARGET_PRODUCT}" in |
94 "passion"|"soju"|"sojua"|"sojus"|"yakju"|"mysid"|"nakasi") | 94 "passion"|"soju"|"sojua"|"sojus"|"yakju"|"mysid"|"nakasi") |
95 DEFINES+=" target_arch=arm" | 95 DEFINES+=" target_arch=arm" |
Yaron
2012/08/25 00:14:14
Nit: remove the duplicate "target_arch" assignment
michaelbai
2012/08/29 19:26:52
Done.
| |
96 DEFINES+=" arm_neon=1 armv7=1 arm_thumb=1" | 96 DEFINES+=" arm_neon=1 armv7=1 arm_thumb=1" |
97 DEFINES+=" ${ORDER_DEFINES}" | 97 DEFINES+=" ${ORDER_DEFINES}" |
98 TARGET_ARCH="arm" | |
98 ;; | 99 ;; |
99 "trygon"|"tervigon") | 100 "trygon"|"tervigon") |
100 DEFINES+=" target_arch=arm" | 101 DEFINES+=" target_arch=arm" |
101 DEFINES+=" arm_neon=0 armv7=1 arm_thumb=1 arm_fpu=vfpv3-d16" | 102 DEFINES+=" arm_neon=0 armv7=1 arm_thumb=1 arm_fpu=vfpv3-d16" |
102 DEFINES+=" ${ORDER_DEFINES}" | 103 DEFINES+=" ${ORDER_DEFINES}" |
104 TARGET_ARCH="arm" | |
103 ;; | 105 ;; |
104 "full") | 106 "full") |
105 DEFINES+=" target_arch=arm" | 107 DEFINES+=" target_arch=arm" |
106 DEFINES+=" arm_neon=0 armv7=0 arm_thumb=1 arm_fpu=vfp" | 108 DEFINES+=" arm_neon=0 armv7=0 arm_thumb=1 arm_fpu=vfp" |
109 TARGET_ARCH="arm" | |
107 ;; | 110 ;; |
108 *x86*) | 111 *x86*) |
109 # TODO(tedbo): The ia32 build fails on ffmpeg, so we disable it here. | 112 # TODO(tedbo): The ia32 build fails on ffmpeg, so we disable it here. |
110 DEFINES+=" target_arch=ia32 use_libffmpeg=0" | 113 DEFINES+=" target_arch=ia32 use_libffmpeg=0" |
111 | 114 |
112 host_arch=$(uname -m | sed -e \ | 115 host_arch=$(uname -m | sed -e \ |
113 's/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/') | 116 's/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/') |
114 DEFINES+=" host_arch=${host_arch}" | 117 DEFINES+=" host_arch=${host_arch}" |
118 TARGET_ARCH="x86" | |
115 ;; | 119 ;; |
116 *) | 120 *) |
117 echo "TARGET_PRODUCT: ${TARGET_PRODUCT} is not supported." >& 2 | 121 echo "TARGET_PRODUCT: ${TARGET_PRODUCT} is not supported." >& 2 |
118 return 1 | 122 return 1 |
119 esac | 123 esac |
124 DEFINES+=" android_gdbserver=${ANDROID_NDK_ROOT}/prebuilt/\ | |
125 android-${TARGET_ARCH}/gdbserver/gdbserver" | |
120 } | 126 } |
121 | 127 |
122 | 128 |
123 ################################################################################ | 129 ################################################################################ |
124 # Exports common GYP variables based on variable DEFINES and CHROME_SRC. | 130 # Exports common GYP variables based on variable DEFINES and CHROME_SRC. |
125 ################################################################################ | 131 ################################################################################ |
126 common_gyp_vars() { | 132 common_gyp_vars() { |
127 export GYP_DEFINES="${DEFINES}" | 133 export GYP_DEFINES="${DEFINES}" |
128 export GYP_GENERATORS="make-android" | 134 export GYP_GENERATORS="make-android" |
129 | 135 |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
288 | 294 |
289 export GYP_GENERATORS="android" | 295 export GYP_GENERATORS="android" |
290 | 296 |
291 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" | 297 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" |
292 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" | 298 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" |
293 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} auto_regeneration=0" | 299 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} auto_regeneration=0" |
294 | 300 |
295 # TODO(torne): This isn't upstream yet. Upstream it or remove this setting. | 301 # TODO(torne): This isn't upstream yet. Upstream it or remove this setting. |
296 export CHROMIUM_GYP_FILE="${CHROME_SRC}/build/all_android_webview.gyp" | 302 export CHROMIUM_GYP_FILE="${CHROME_SRC}/build/all_android_webview.gyp" |
297 } | 303 } |
OLD | NEW |