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 ndk_target_arch=arm " |
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 ;; | 98 ;; |
99 "trygon"|"tervigon") | 99 "trygon"|"tervigon") |
100 DEFINES+=" target_arch=arm" | 100 DEFINES+=" target_arch=arm ndk_target_arch=arm " |
101 DEFINES+=" arm_neon=0 armv7=1 arm_thumb=1 arm_fpu=vfpv3-d16" | 101 DEFINES+=" arm_neon=0 armv7=1 arm_thumb=1 arm_fpu=vfpv3-d16" |
102 DEFINES+=" ${ORDER_DEFINES}" | 102 DEFINES+=" ${ORDER_DEFINES}" |
103 ;; | 103 ;; |
104 "full") | 104 "full") |
105 DEFINES+=" target_arch=arm" | 105 DEFINES+=" target_arch=arm ndk_target_arch=arm " |
106 DEFINES+=" arm_neon=0 armv7=0 arm_thumb=1 arm_fpu=vfp" | 106 DEFINES+=" arm_neon=0 armv7=0 arm_thumb=1 arm_fpu=vfp" |
107 ;; | 107 ;; |
108 *x86*) | 108 *x86*) |
109 # TODO(tedbo): The ia32 build fails on ffmpeg, so we disable it here. | 109 # TODO(tedbo): The ia32 build fails on ffmpeg, so we disable it here. |
110 DEFINES+=" target_arch=ia32 use_libffmpeg=0" | 110 DEFINES+=" target_arch=ia32 ndk_target_arch=x86 use_libffmpeg=0" |
Yaron
2012/08/22 22:51:35
I don't think you need this new variable at all. L
Peter Beverloo
2012/08/23 10:45:48
Agreed. If it turns out you do, please name it "an
michaelbai
2012/08/23 22:53:00
Done.
| |
111 | 111 |
112 host_arch=$(uname -m | sed -e \ | 112 host_arch=$(uname -m | sed -e \ |
113 's/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/') | 113 's/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/') |
114 DEFINES+=" host_arch=${host_arch}" | 114 DEFINES+=" host_arch=${host_arch}" |
115 ;; | 115 ;; |
116 *) | 116 *) |
117 echo "TARGET_PRODUCT: ${TARGET_PRODUCT} is not supported." >& 2 | 117 echo "TARGET_PRODUCT: ${TARGET_PRODUCT} is not supported." >& 2 |
118 return 1 | 118 return 1 |
119 esac | 119 esac |
120 } | 120 } |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
288 | 288 |
289 export GYP_GENERATORS="android" | 289 export GYP_GENERATORS="android" |
290 | 290 |
291 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" | 291 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" |
292 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" | 292 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" |
293 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} auto_regeneration=0" | 293 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} auto_regeneration=0" |
294 | 294 |
295 # TODO(torne): This isn't upstream yet. Upstream it or remove this setting. | 295 # 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" | 296 export CHROMIUM_GYP_FILE="${CHROME_SRC}/build/all_android_webview.gyp" |
297 } | 297 } |
OLD | NEW |