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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
99 # shared library, libchromeview.so. The file is an order list of section | 99 # shared library, libchromeview.so. The file is an order list of section |
100 # names and the library is linked with option | 100 # names and the library is linked with option |
101 # --section-ordering-file=<orderfile>. The order file is updated by profiling | 101 # --section-ordering-file=<orderfile>. The order file is updated by profiling |
102 # startup after compiling with the order_profiling=1 GYP_DEFINES flag. | 102 # startup after compiling with the order_profiling=1 GYP_DEFINES flag. |
103 ORDER_DEFINES="order_text_section=${CHROME_SRC}/orderfiles/orderfile.out" | 103 ORDER_DEFINES="order_text_section=${CHROME_SRC}/orderfiles/orderfile.out" |
104 | 104 |
105 # The following defines will affect ARM code generation of both C/C++ compiler | 105 # The following defines will affect ARM code generation of both C/C++ compiler |
106 # and V8 mksnapshot. | 106 # and V8 mksnapshot. |
107 case "${TARGET_ARCH}" in | 107 case "${TARGET_ARCH}" in |
108 "arm") | 108 "arm") |
109 DEFINES+=" arm_neon=0 armv7=1 arm_thumb=1 arm_fpu=vfpv3-d16" | 109 DEFINES+=" arm_neon=0 arm_version=7 arm_thumb=1 arm_fpu=vfpv3-d16" |
Yaron
2013/04/10 18:01:44
Rather than just updating this field, I'd prefer t
Fredrik Öhrn
2013/04/10 19:16:10
OK, I did it this way because the existing default
| |
110 DEFINES+=" arm_neon_optional=1" # Enable dynamic NEON support. | 110 DEFINES+=" arm_neon_optional=1" # Enable dynamic NEON support. |
111 DEFINES+=" ${ORDER_DEFINES}" | 111 DEFINES+=" ${ORDER_DEFINES}" |
112 DEFINES+=" target_arch=arm" | 112 DEFINES+=" target_arch=arm" |
113 ;; | 113 ;; |
114 "x86") | 114 "x86") |
115 # TODO(tedbo): The ia32 build fails on ffmpeg, so we disable it here. | 115 # TODO(tedbo): The ia32 build fails on ffmpeg, so we disable it here. |
116 DEFINES+=" use_libffmpeg=0" | 116 DEFINES+=" use_libffmpeg=0" |
117 | 117 |
118 host_arch=$(uname -m | sed -e \ | 118 host_arch=$(uname -m | sed -e \ |
119 's/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/') | 119 's/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/') |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
278 '${ANDROID_BUILD_TOP}')") | 278 '${ANDROID_BUILD_TOP}')") |
279 ;; | 279 ;; |
280 "mac") | 280 "mac") |
281 ANDROID_SDK_TOOLS=$(python -c \ | 281 ANDROID_SDK_TOOLS=$(python -c \ |
282 "import os.path; \ | 282 "import os.path; \ |
283 print os.path.relpath('${ANDROID_SDK_ROOT}/../tools/darwin', \ | 283 print os.path.relpath('${ANDROID_SDK_ROOT}/../tools/darwin', \ |
284 '${ANDROID_BUILD_TOP}')") | 284 '${ANDROID_BUILD_TOP}')") |
285 ;; | 285 ;; |
286 esac | 286 esac |
287 DEFINES+=" android_webview_build=1" | 287 DEFINES+=" android_webview_build=1" |
288 # The WebView build gets its cpu-specific flags from the Android build system. | |
289 DEFINES+=" arm_arch= arm_tune= arm_fpu= arm_float_abi= arm_thumb=0" | |
288 # temporary until all uses of android_build_type are gone (crbug.com/184431) | 290 # temporary until all uses of android_build_type are gone (crbug.com/184431) |
289 DEFINES+=" android_build_type=1" | 291 DEFINES+=" android_build_type=1" |
290 DEFINES+=" android_src=\$(GYP_ABS_ANDROID_TOP_DIR)" | 292 DEFINES+=" android_src=\$(GYP_ABS_ANDROID_TOP_DIR)" |
291 DEFINES+=" android_sdk=\$(GYP_ABS_ANDROID_TOP_DIR)/${ANDROID_SDK}" | 293 DEFINES+=" android_sdk=\$(GYP_ABS_ANDROID_TOP_DIR)/${ANDROID_SDK}" |
292 DEFINES+=" android_sdk_root=\$(GYP_ABS_ANDROID_TOP_DIR)/${ANDROID_SDK}" | 294 DEFINES+=" android_sdk_root=\$(GYP_ABS_ANDROID_TOP_DIR)/${ANDROID_SDK}" |
293 DEFINES+=" android_sdk_tools=\$(GYP_ABS_ANDROID_TOP_DIR)/${ANDROID_SDK_TOOLS}" | 295 DEFINES+=" android_sdk_tools=\$(GYP_ABS_ANDROID_TOP_DIR)/${ANDROID_SDK_TOOLS}" |
294 DEFINES+=" android_sdk_version=${ANDROID_SDK_VERSION}" | 296 DEFINES+=" android_sdk_version=${ANDROID_SDK_VERSION}" |
295 DEFINES+=" android_toolchain=${ANDROID_TOOLCHAIN}" | 297 DEFINES+=" android_toolchain=${ANDROID_TOOLCHAIN}" |
296 export GYP_DEFINES="${DEFINES}" | 298 export GYP_DEFINES="${DEFINES}" |
297 | 299 |
298 export GYP_GENERATORS="android" | 300 export GYP_GENERATORS="android" |
299 | 301 |
300 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" | 302 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" |
301 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" | 303 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" |
302 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} auto_regeneration=0" | 304 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} auto_regeneration=0" |
303 | 305 |
304 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/all_webview.gyp" | 306 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/all_webview.gyp" |
305 } | 307 } |
OLD | NEW |