summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsteveblock@chromium.org <steveblock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-23 13:36:12 +0000
committersteveblock@chromium.org <steveblock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-23 13:36:12 +0000
commitadb44341dafc75d02f68f01fb0c092605e7557d6 (patch)
tree473c9531a4a17a01bc6b9bb93187013350ca4be5
parentb019ec4224fa1358cc97b737cd3e40125ea39fa9 (diff)
downloadchromium_src-adb44341dafc75d02f68f01fb0c092605e7557d6.zip
chromium_src-adb44341dafc75d02f68f01fb0c092605e7557d6.tar.gz
chromium_src-adb44341dafc75d02f68f01fb0c092605e7557d6.tar.bz2
Hook up use_system_libjpeg for Android
Also enable it by default when builing with the Android build system. Review URL: https://chromiumcodereview.appspot.com/10807019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147850 0039d316-1c4b-4281-b951-d872f2087c98
-rwxr-xr-xbuild/android/envsetup.sh2
-rw-r--r--build/common.gypi25
-rw-r--r--third_party/libjpeg/libjpeg.gyp5
3 files changed, 20 insertions, 12 deletions
diff --git a/build/android/envsetup.sh b/build/android/envsetup.sh
index 4a3f9fb..9bf4349 100755
--- a/build/android/envsetup.sh
+++ b/build/android/envsetup.sh
@@ -139,7 +139,7 @@ export STRIP=$(echo ${ANDROID_TOOLCHAIN}/*-strip)
# The set of GYP_DEFINES to pass to gyp. Use 'readlink -e' on directories
# to canonicalize them (remove double '/', remove trailing '/', etc).
DEFINES+=" OS=android"
-DEFINES+=" android_build_type=0" # Currently, Only '0' is supportted.
+DEFINES+=" android_build_type=0"
DEFINES+=" host_os=${host_os}"
DEFINES+=" linux_fpic=1"
DEFINES+=" release_optimize=s"
diff --git a/build/common.gypi b/build/common.gypi
index cd2e4bf1a..5875062 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -512,6 +512,12 @@
['OS!="mac" and OS!="android"', {
'use_canvas_skia%': 1,
}],
+
+ ['OS=="android"', {
+ # When building as part of the Android system, use system libraries
+ # where possible to reduce ROM size.
+ 'use_system_libjpeg%': '<(android_build_type)',
+ }],
],
},
@@ -592,6 +598,7 @@
'sas_dll_path%': '<(sas_dll_path)',
'wix_path%': '<(wix_path)',
'android_upstream_bringup%': '<(android_upstream_bringup)',
+ 'use_system_libjpeg%': '<(use_system_libjpeg)',
# Use system yasm instead of bundled one.
'use_system_yasm%': 0,
@@ -892,8 +899,9 @@
}],
],
- # Switch between different build types, currently only '0' is
- # supported.
+ # Sets whether we're building with the Android SDK/NDK (and hence
+ # with Ant, value 0), or as part of the Android system (and hence
+ # with the Android build system, value 1).
'android_build_type%': 0,
},
'android_ndk_root%': '<(android_ndk_root)',
@@ -975,19 +983,14 @@
}],
],
- # TODO(steveblock): Investigate using the system versions of sqlite and
- # libjpeg.
- # Enable to use system sqlite.
+ # When building as part of the Android system, use system libraries
+ # where possible to reduce ROM size.
+ # TODO(steveblock): Investigate using the system version of sqlite.
'use_system_sqlite%': 0, # '<(android_build_type)',
- # Enable to use system libjpeg.
- 'use_system_libjpeg%': 0, # '<(android_build_type)',
- # Enable to use the system expat.
'use_system_expat%': '<(android_build_type)',
- # Enable to use the system ICU.
'use_system_icu%': '<(android_build_type)',
- # Enable to use the system stlport, otherwise statically
- # link the NDK one?
'use_system_stlport%': '<(android_build_type)',
+
# Copy it out one scope.
'android_build_type%': '<(android_build_type)',
}], # OS=="android"
diff --git a/third_party/libjpeg/libjpeg.gyp b/third_party/libjpeg/libjpeg.gyp
index 8f0dac8..f8ce278 100644
--- a/third_party/libjpeg/libjpeg.gyp
+++ b/third_party/libjpeg/libjpeg.gyp
@@ -92,6 +92,11 @@
'/usr/local/include',
],
}],
+ ['OS=="android"', {
+ 'include_dirs': [
+ '<(android_src)/external/jpeg',
+ ],
+ }],
],
},
'link_settings': {