| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 ${ANDROID_NDK_ROOT}/toolchains/${toolchain_arch}-${toolchain_version}) | 48 ${ANDROID_NDK_ROOT}/toolchains/${toolchain_arch}-${toolchain_version}) |
| 49 toolchain_path="${ANDROID_NDK_ROOT}/toolchains/${toolchain_target}"\ | 49 toolchain_path="${ANDROID_NDK_ROOT}/toolchains/${toolchain_target}"\ |
| 50 "/prebuilt/${toolchain_dir}/bin/" | 50 "/prebuilt/${toolchain_dir}/bin/" |
| 51 | 51 |
| 52 # Set only if not already set. | 52 # Set only if not already set. |
| 53 # Don't override ANDROID_TOOLCHAIN if set by Android configuration env. | 53 # Don't override ANDROID_TOOLCHAIN if set by Android configuration env. |
| 54 export ANDROID_TOOLCHAIN=${ANDROID_TOOLCHAIN:-${toolchain_path}} | 54 export ANDROID_TOOLCHAIN=${ANDROID_TOOLCHAIN:-${toolchain_path}} |
| 55 | 55 |
| 56 common_check_toolchain | 56 common_check_toolchain |
| 57 | 57 |
| 58 # Add Android SDK/NDK tools to system path. | 58 # Add Android SDK tools to system path. |
| 59 export PATH=$PATH:${ANDROID_NDK_ROOT} | |
| 60 export PATH=$PATH:${ANDROID_SDK_ROOT}/tools | 59 export PATH=$PATH:${ANDROID_SDK_ROOT}/tools |
| 61 export PATH=$PATH:${ANDROID_SDK_ROOT}/platform-tools | 60 export PATH=$PATH:${ANDROID_SDK_ROOT}/platform-tools |
| 62 export PATH=$PATH:${ANDROID_SDK_ROOT}/build-tools/\ | 61 export PATH=$PATH:${ANDROID_SDK_ROOT}/build-tools/\ |
| 63 ${ANDROID_SDK_BUILD_TOOLS_VERSION} | 62 ${ANDROID_SDK_BUILD_TOOLS_VERSION} |
| 64 | 63 |
| 65 # This must be set before ANDROID_TOOLCHAIN, so that clang could find the | 64 # This must be set before ANDROID_TOOLCHAIN, so that clang could find the |
| 66 # gold linker. | 65 # gold linker. |
| 67 # TODO(michaelbai): Remove this path once the gold linker become the default | 66 # TODO(michaelbai): Remove this path once the gold linker become the default |
| 68 # linker. | 67 # linker. |
| 69 export PATH=$PATH:${CHROME_SRC}/build/android/${toolchain_arch}-gold | 68 export PATH=$PATH:${CHROME_SRC}/build/android/${toolchain_arch}-gold |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 fi | 284 fi |
| 286 export GYP_DEFINES="${DEFINES}" | 285 export GYP_DEFINES="${DEFINES}" |
| 287 | 286 |
| 288 export GYP_GENERATORS="android" | 287 export GYP_GENERATORS="android" |
| 289 | 288 |
| 290 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" | 289 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" |
| 291 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" | 290 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" |
| 292 | 291 |
| 293 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/all_webview.gyp" | 292 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/all_webview.gyp" |
| 294 } | 293 } |
| OLD | NEW |