diff options
author | yfriedman@chromium.org <yfriedman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-16 17:45:57 +0000 |
---|---|---|
committer | yfriedman@chromium.org <yfriedman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-16 17:45:57 +0000 |
commit | 5061d15833c78f4e13b64c9133e556954bc3f7e4 (patch) | |
tree | ff68db9c78b8f90a740ee4f09803b739f84cb008 /build | |
parent | cd5b7fe4080e10415dc3a38810d54b8b6244f871 (diff) | |
download | chromium_src-5061d15833c78f4e13b64c9133e556954bc3f7e4.zip chromium_src-5061d15833c78f4e13b64c9133e556954bc3f7e4.tar.gz chromium_src-5061d15833c78f4e13b64c9133e556954bc3f7e4.tar.bz2 |
Move android gyp definitions to gyp
This removes unneeded gyp defines from envsetup. I still left the environment variables because some scripts (e.g. findbugs) still depend on them. I'll remove those usages and the environment variables separately.
Review URL: https://codereview.chromium.org/11886053
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177169 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rwxr-xr-x | build/android/envsetup_functions.sh | 13 | ||||
-rw-r--r-- | build/common.gypi | 64 |
2 files changed, 41 insertions, 36 deletions
diff --git a/build/android/envsetup_functions.sh b/build/android/envsetup_functions.sh index 810b981..3746012 100755 --- a/build/android/envsetup_functions.sh +++ b/build/android/envsetup_functions.sh @@ -129,9 +129,6 @@ common_vars_defines() { print_usage return 1 esac - - DEFINES+=" android_gdbserver=${ANDROID_NDK_ROOT}/prebuilt/\ -android-${TARGET_ARCH}/gdbserver/gdbserver" } @@ -232,16 +229,6 @@ sdk_build_init() { unset ANDROID_TOOLCHAIN common_vars_defines - - # Sets android specific directories to NOT_SDK_COMPLIANT. This will allow - # android_gyp to generate make files, but will cause errors when (and only - # when) building targets that depend on these directories. - DEFINES+=" android_sdk=${ANDROID_SDK_ROOT}/${sdk_suffix}" - DEFINES+=" android_sdk_root=${ANDROID_SDK_ROOT}" - DEFINES+=" android_sdk_tools=${ANDROID_SDK_ROOT}/platform-tools" - DEFINES+=" android_sdk_version=${ANDROID_SDK_VERSION}" - DEFINES+=" android_toolchain=${ANDROID_TOOLCHAIN}" - common_gyp_vars if [[ -n "$CHROME_ANDROID_BUILD_WEBVIEW" ]]; then diff --git a/build/common.gypi b/build/common.gypi index 35f41ff..bfed69b 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -1081,36 +1081,54 @@ # Location of Android NDK. 'variables': { 'variables': { - 'variables': { - 'android_ndk_root%': '<!(/bin/echo -n $ANDROID_NDK_ROOT)', - }, - 'android_ndk_root%': '<(android_ndk_root)', - 'conditions': [ - ['target_arch == "ia32"', { - 'android_app_abi%': 'x86', - 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-9/arch-x86', - }], - ['target_arch=="arm"', { - 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-9/arch-arm', - 'conditions': [ - ['armv7==0', { - 'android_app_abi%': 'armeabi', - }, { - 'android_app_abi%': 'armeabi-v7a', - }], - ], - }], - ], + # Unfortuantely we have to use absolute paths to the SDK/NDK beause + # they're passed to ant which uses a different relative path from + # gyp. + 'android_ndk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/ndk/', + 'android_sdk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/sdk/', + 'android_host_arch%': '<!(uname -m)', }, + # Copy conditionally-set variables out one scope. 'android_ndk_root%': '<(android_ndk_root)', - 'android_app_abi%': '<(android_app_abi)', - 'android_ndk_sysroot%': '<(android_ndk_sysroot)', + 'android_sdk_root%': '<(android_sdk_root)', + + # Android API-level of the SDK used for compilation. + 'android_sdk_version%': '17', + + 'conditions': [ + ['target_arch == "ia32"', { + 'android_app_abi%': 'x86', + 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gdbserver/gdbserver', + 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-9/arch-x86', + 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin', + }], + ['target_arch=="arm"', { + 'conditions': [ + ['armv7==0', { + 'android_app_abi%': 'armeabi', + }, { + 'android_app_abi%': 'armeabi-v7a', + }], + ], + 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gdbserver/gdbserver', + 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-9/arch-arm', + 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-androideabi-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin', + }], + ], }, + # Copy conditionally-set variables out one scope. + 'android_app_abi%': '<(android_app_abi)', + 'android_gdbserver%': '<(android_gdbserver)', 'android_ndk_root%': '<(android_ndk_root)', 'android_ndk_sysroot': '<(android_ndk_sysroot)', + 'android_sdk_root%': '<(android_sdk_root)', + 'android_sdk_version%': '<(android_sdk_version)', + 'android_toolchain%': '<(android_toolchain)', + 'android_ndk_include': '<(android_ndk_sysroot)/usr/include', 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib', - 'android_app_abi%': '<(android_app_abi)', + 'android_sdk_tools%': '<(android_sdk_root)/platform-tools', + 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_version)', # Location of the "strip" binary, used by both gyp and scripts. 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)', |