diff options
-rwxr-xr-x | build/android/envsetup.sh | 15 | ||||
-rwxr-xr-x | build/android/envsetup_functions.sh | 57 |
2 files changed, 3 insertions, 69 deletions
diff --git a/build/android/envsetup.sh b/build/android/envsetup.sh index e381ac5..9083584 100755 --- a/build/android/envsetup.sh +++ b/build/android/envsetup.sh @@ -6,26 +6,17 @@ # Sets up environment for building Chromium on Android. It can either be # compiled with the Android tree or using the Android SDK/NDK. To build with -# NDK/SDK: ". build/android/envsetup.sh --sdk". Environment variable +# NDK/SDK: ". build/android/envsetup.sh". Environment variable # ANDROID_SDK_BUILD=1 will then be defined and used in the rest of the setup to # specifiy build type. # When building WebView as part of Android we can't use the SDK. Other builds # default to using the SDK. -# NOTE(yfriedman): This looks unnecessary but downstream the default value -# should be 0 until all builds switch to SDK/NDK. if [[ "${CHROME_ANDROID_BUILD_WEBVIEW}" -eq 1 ]]; then export ANDROID_SDK_BUILD=0 else export ANDROID_SDK_BUILD=1 fi -# Loop over args in case we add more arguments in the future. -while [ "$1" != "" ]; do - case $1 in - -s | --sdk ) export ANDROID_SDK_BUILD=1 ; shift ;; - * ) shift ; break ;; - esac -done if [[ "${ANDROID_SDK_BUILD}" -eq 1 ]]; then echo "Using SDK build" @@ -79,12 +70,10 @@ elif [[ -z "$ANDROID_BUILD_TOP" || \ echo " . build/envsetup.sh" echo " lunch" echo "Then try this again." - echo "Or did you mean NDK/SDK build. Run envsetup.sh with --sdk argument." + echo "Or did you mean NDK/SDK build. Run envsetup.sh without any arguments." return 1 elif [[ -n "$CHROME_ANDROID_BUILD_WEBVIEW" ]]; then webview_build_init -else - non_sdk_build_init fi # Workaround for valgrind build diff --git a/build/android/envsetup_functions.sh b/build/android/envsetup_functions.sh index f91e5da..051f4ee 100755 --- a/build/android/envsetup_functions.sh +++ b/build/android/envsetup_functions.sh @@ -169,11 +169,10 @@ common_gyp_vars() { # environment ANDROID_NDK_ROOT must be set to Android NDK's root path. The # ANDROID_SDK_ROOT only needs to be set to override the default SDK which is in # the tree under $ROOT/src/third_party/android_tools/sdk. -# TODO(navabi): Add NDK to $ROOT/src/third_party/android_tools/ndk. # To build Chromium for Android with NDK/SDK follow the steps below: # > export ANDROID_NDK_ROOT=<android ndk root> # > export ANDROID_SDK_ROOT=<android sdk root> # to override the default sdk -# > . build/android/envsetup.sh --sdk +# > . build/android/envsetup.sh # > make ################################################################################ sdk_build_init() { @@ -192,7 +191,6 @@ sdk_build_init() { export ANDROID_SDK_ROOT="${CHROME_SRC}/third_party/android_tools/sdk/" fi - # Makes sure ANDROID_BUILD_TOP is unset if build has option --sdk unset ANDROID_BUILD_TOP # Set default target. @@ -240,59 +238,6 @@ sdk_build_init() { } ################################################################################ -# Initializes environment variables for build with android source. This expects -# android environment to be set up along with lunch. To build: -# > . build/envsetup.sh -# > lunch <lunch-type> -# > . build/android/envsetup.sh -# > make -############################################################################# -non_sdk_build_init() { - # We export "TOP" here so that "mmm" can be run to build Java code without - # having to cd to $ANDROID_BUILD_TOP. - export TOP="$ANDROID_BUILD_TOP" - - # Set "ANDROID_NDK_ROOT" as checked-in version, if it was not set. - if [[ "${ANDROID_NDK_ROOT}" || ! -d "$ANDROID_NDK_ROOT" ]] ; then - export ANDROID_NDK_ROOT="${CHROME_SRC}/third_party/android_tools/ndk/" - fi - if [[ ! -d "${ANDROID_NDK_ROOT}" ]] ; then - echo "Can not find Android NDK root ${ANDROID_NDK_ROOT}." >& 2 - return 1 - fi - - # We export "ANDROID_SDK_ROOT" for building Java source with the SDK. - export ANDROID_SDK_ROOT=${ANDROID_BUILD_TOP}/prebuilts/sdk/\ -${ANDROID_SDK_VERSION} - # Needed by android antfiles when creating apks. - export ANDROID_SDK_HOME=${ANDROID_SDK_ROOT} - - # Unset ANDROID_TOOLCHAIN, so it could be set to checked-in 64-bit toolchain. - # in common_vars_defines - unset ANDROID_TOOLCHAIN - - common_vars_defines - - DEFINES+=" sdk_build=0" - DEFINES+=" android_product_out=${ANDROID_PRODUCT_OUT}" - - if [[ -n "$CHROME_ANDROID_BUILD_WEBVIEW" ]]; then - webview_build_init - return - fi - - # The non-SDK build currently requires the SDK path to build the framework - # Java aidl files. TODO(steveblock): Investigate avoiding this requirement. - DEFINES+=" android_sdk=${ANDROID_SDK_ROOT}" - DEFINES+=" android_sdk_root=${ANDROID_SDK_ROOT}" - DEFINES+=" android_sdk_tools=${ANDROID_SDK_ROOT}/../tools/linux" - DEFINES+=" android_sdk_version=${ANDROID_SDK_VERSION}" - DEFINES+=" android_toolchain=${ANDROID_TOOLCHAIN}" - - common_gyp_vars -} - -################################################################################ # To build WebView, we use the Android build system and build inside an Android # source tree. This method is called from non_sdk_build_init() and adds to the # settings specified there. |