update gyp for ARM builds to be more well defined.

R=mtklein@google.com

Review URL: https://codereview.chromium.org/21096005

git-svn-id: http://skia.googlecode.com/svn/trunk@10454 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
djsollen@google.com 2013-07-31 12:57:27 +00:00
parent 76015b0953
commit f7542ba18e
7 changed files with 36 additions and 28 deletions

View File

@ -150,17 +150,28 @@
'cflags': [
'-mthumb',
],
}],
[ 'skia_arch_type == "arm" and armv7 == 1', {
'variables': {
'arm_neon_optional%': 0,
},
'defines': [
'__ARM_ARCH__=7',
# The --fix-cortex-a8 switch enables a link-time workaround for
# an erratum in certain Cortex-A8 processors. The workaround is
# enabled by default if you target the ARM v7-A arch profile.
# It can be enabled otherwise by specifying --fix-cortex-a8, or
# disabled unconditionally by specifying --no-fix-cortex-a8.
#
# The erratum only affects Thumb-2 code.
'conditions': [
[ 'arm_version < 7', {
'ldflags': [
'-Wl,--fix-cortex-a8',
],
}],
],
}],
[ 'skia_arch_type == "arm" and arm_version >= 7', {
'cflags': [
'-march=armv7-a',
],
'ldflags': [
'-march=armv7-a',
],
'conditions': [
[ 'arm_neon == 1', {
'defines': [
@ -169,10 +180,6 @@
'cflags': [
'-mfpu=neon',
],
'ldflags': [
'-march=armv7-a',
'-Wl,--fix-cortex-a8',
],
}],
[ 'arm_neon_optional == 1', {
'defines': [

View File

@ -69,11 +69,11 @@
}],
[ 'skia_os == "ios"', {
'skia_arch_type%': 'arm',
'armv7%': 1,
'arm_version%': 7,
'arm_neon%': 0, # neon asm files known not to work with the ios build
},{ # skia_os is not ios
'skia_arch_type%': 'x86',
'armv7%': 0,
'arm_version%': 0,
'arm_neon%': 0,
}],
],
@ -121,8 +121,9 @@
# Re-define all variables defined within the level-2 'variables' dict,
# so that siblings of the level-1 'variables' dict can see them.
'armv7%': '<(armv7)',
'arm_version%': '<(arm_version)',
'arm_neon%': '<(arm_neon)',
'arm_neon_optional%': 0,
'skia_os%': '<(skia_os)',
'os_posix%': '<(os_posix)',
'skia_scalar%': '<(skia_scalar)',

View File

@ -80,7 +80,7 @@
'../src/core/SkPaintOptionsAndroid.cpp',
],
}],
[ 'skia_os == "android" and skia_arch_type == "arm" and armv7 == 1', {
[ 'skia_os == "android" and skia_arch_type == "arm"', {
# The code in SkUtilsArm.cpp can be used on an ARM-based Linux system, not only Android.
'sources': [
'../src/core/SkPaintOptionsAndroid.cpp',

View File

@ -67,7 +67,7 @@
{
'target_name': 'libwebp_dsp_neon',
'conditions': [
['armv7 == 1', {
['arm_version >= 7', {
'type': 'static_library',
'include_dirs': [
'../third_party/externals/libwebp',
@ -82,7 +82,7 @@
'-mfpu=vfpv3-d16',
],
'cflags': [ '-mfpu=neon' ],
},{ # "armv7 != 1"
},{ # !(arm_version >= 7)
'type': 'none',
}],
],

View File

@ -56,7 +56,7 @@
'../src/opts/SkUtils_opts_SSE2.cpp',
],
}],
[ 'skia_arch_type == "arm" and armv7 == 1', {
[ 'skia_arch_type == "arm" and arm_version >= 7', {
# The assembly uses the frame pointer register (r7 in Thumb/r11 in
# ARM), the compiler doesn't like that.
'cflags!': [
@ -94,7 +94,7 @@
}],
],
}],
[ '(skia_arch_type == "arm" and armv7 == 0) or (skia_os == "ios")', {
[ '(skia_arch_type == "arm" and arm_version < 7) or (skia_os == "ios")', {
'sources': [
'../src/opts/SkBitmapProcState_opts_none.cpp',
'../src/opts/SkBlitRow_opts_none.cpp',

View File

@ -141,17 +141,17 @@ setup_device() {
case $TARGET_DEVICE in
nexus_s)
DEFINES="${DEFINES} skia_arch_type=arm arm_neon=1 armv7=1 arm_thumb=1"
DEFINES="${DEFINES} skia_arch_type=arm arm_neon=1 arm_version=7 arm_thumb=1"
DEFINES="${DEFINES} skia_texture_cache_mb_limit=24"
;;
nexus_4 | nexus_7 | nexus_10)
DEFINES="${DEFINES} skia_arch_type=arm arm_neon=1 armv7=1 arm_thumb=1"
DEFINES="${DEFINES} skia_arch_type=arm arm_neon=1 arm_version=7 arm_thumb=1"
;;
xoom)
DEFINES="${DEFINES} skia_arch_type=arm arm_neon=0 armv7=1 arm_thumb=1"
DEFINES="${DEFINES} skia_arch_type=arm arm_neon=0 arm_version=7 arm_thumb=1"
;;
galaxy_nexus)
DEFINES="${DEFINES} skia_arch_type=arm arm_neon=1 armv7=1 arm_thumb=1"
DEFINES="${DEFINES} skia_arch_type=arm arm_neon=1 arm_version=7 arm_thumb=1"
DEFINES="${DEFINES} skia_texture_cache_mb_limit=32"
;;
razr_i)
@ -159,16 +159,16 @@ setup_device() {
DEFINES="${DEFINES} skia_texture_cache_mb_limit=32"
;;
arm_v7)
DEFINES="${DEFINES} skia_arch_type=arm arm_neon_optional=1 armv7=1 arm_thumb=0"
DEFINES="${DEFINES} skia_arch_type=arm arm_neon_optional=1 arm_version=7 arm_thumb=0"
;;
arm_v7_thumb)
DEFINES="${DEFINES} skia_arch_type=arm arm_neon_optional=1 armv7=1 arm_thumb=1"
DEFINES="${DEFINES} skia_arch_type=arm arm_neon_optional=1 arm_version=7 arm_thumb=1"
;;
arm)
DEFINES="${DEFINES} skia_arch_type=arm arm_neon=0 armv7=0 arm_thumb=0"
DEFINES="${DEFINES} skia_arch_type=arm arm_neon=0 arm_thumb=0"
;;
arm_thumb)
DEFINES="${DEFINES} skia_arch_type=arm arm_neon=0 armv7=0 arm_thumb=1"
DEFINES="${DEFINES} skia_arch_type=arm arm_neon=0 arm_thumb=1"
;;
x86)
DEFINES="${DEFINES} skia_arch_type=x86 skia_arch_width=32"

View File

@ -21,7 +21,7 @@
'android_arch%': "x86",
}, {
'conditions': [
[ 'armv7', {
[ 'arm_version == 7', {
'android_arch%': "armeabi-v7a",
}, {
'android_arch%': "armeabi",