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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 # Add Android SDK tools to system path. | 58 # Add Android SDK tools to system path. |
59 export PATH=$PATH:${ANDROID_SDK_ROOT}/tools | 59 export PATH=$PATH:${ANDROID_SDK_ROOT}/tools |
60 export PATH=$PATH:${ANDROID_SDK_ROOT}/platform-tools | 60 export PATH=$PATH:${ANDROID_SDK_ROOT}/platform-tools |
61 export PATH=$PATH:${ANDROID_SDK_ROOT}/build-tools/\ | 61 export PATH=$PATH:${ANDROID_SDK_ROOT}/build-tools/\ |
62 ${ANDROID_SDK_BUILD_TOOLS_VERSION} | 62 ${ANDROID_SDK_BUILD_TOOLS_VERSION} |
63 | 63 |
64 # Add Chromium Android development scripts to system path. | 64 # Add Chromium Android development scripts to system path. |
65 # Must be after CHROME_SRC is set. | 65 # Must be after CHROME_SRC is set. |
66 export PATH=$PATH:${CHROME_SRC}/build/android | 66 export PATH=$PATH:${CHROME_SRC}/build/android |
67 | 67 |
68 # TODO(beverloo): Remove these once all consumers updated to --strip-binary. | |
69 # http://crbug.com/142642 | |
70 export STRIP=$(echo ${ANDROID_TOOLCHAIN}/*-strip) | |
71 | |
72 # The set of GYP_DEFINES to pass to gyp. | 68 # The set of GYP_DEFINES to pass to gyp. |
73 DEFINES="OS=android" | 69 DEFINES="OS=android" |
74 DEFINES+=" host_os=${host_os}" | 70 DEFINES+=" host_os=${host_os}" |
75 | 71 |
76 if [[ -n "$CHROME_ANDROID_OFFICIAL_BUILD" ]]; then | 72 if [[ -n "$CHROME_ANDROID_OFFICIAL_BUILD" ]]; then |
77 DEFINES+=" branding=Chrome" | 73 DEFINES+=" branding=Chrome" |
78 DEFINES+=" buildtype=Official" | 74 DEFINES+=" buildtype=Official" |
79 | 75 |
80 # These defines are used by various chrome build scripts to tag the binary's | 76 # These defines are used by various chrome build scripts to tag the binary's |
81 # version string as 'official' in linux builds (e.g. in | 77 # version string as 'official' in linux builds (e.g. in |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 DEFINES+=" android_sdk_root=\$(PWD)/${ANDROID_SDK}" | 237 DEFINES+=" android_sdk_root=\$(PWD)/${ANDROID_SDK}" |
242 DEFINES+=" android_sdk_tools=\$(PWD)/${ANDROID_SDK_TOOLS}" | 238 DEFINES+=" android_sdk_tools=\$(PWD)/${ANDROID_SDK_TOOLS}" |
243 DEFINES+=" android_sdk_version=${ANDROID_SDK_VERSION}" | 239 DEFINES+=" android_sdk_version=${ANDROID_SDK_VERSION}" |
244 DEFINES+=" android_toolchain=${ANDROID_TOOLCHAIN}" | 240 DEFINES+=" android_toolchain=${ANDROID_TOOLCHAIN}" |
245 if [[ -n "$CHROME_ANDROID_WEBVIEW_OFFICIAL_BUILD" ]]; then | 241 if [[ -n "$CHROME_ANDROID_WEBVIEW_OFFICIAL_BUILD" ]]; then |
246 DEFINES+=" logging_like_official_build=1" | 242 DEFINES+=" logging_like_official_build=1" |
247 DEFINES+=" tracing_like_official_build=1" | 243 DEFINES+=" tracing_like_official_build=1" |
248 fi | 244 fi |
249 export GYP_DEFINES="${DEFINES}" | 245 export GYP_DEFINES="${DEFINES}" |
250 } | 246 } |
OLD | NEW |