diff options
-rw-r--r-- | gyp/common.gypi | 3 | ||||
-rw-r--r-- | gyp/common_conditions.gypi | 18 | ||||
-rw-r--r-- | gyp/common_variables.gypi | 6 | ||||
-rw-r--r-- | gyp/core.gyp | 2 | ||||
-rw-r--r-- | gyp/opts.gyp | 8 |
5 files changed, 27 insertions, 10 deletions
diff --git a/gyp/common.gypi b/gyp/common.gypi index 717e6ebbd8..85c590d56a 100644 --- a/gyp/common.gypi +++ b/gyp/common.gypi @@ -24,6 +24,9 @@ ['skia_angle and not skia_os == "win"', {'error': '<!(skia_angle=1 only supported with skia_os="win".)' }], + ['skia_arch_width != 32 or skia_arch_width != 64', + {'error': '<!(skia_arch_width can only be 32 or 64 bits not <(skia_arch_width) bits)' + }], ], }, 'includes': [ diff --git a/gyp/common_conditions.gypi b/gyp/common_conditions.gypi index f73fa50519..92113e3ba4 100644 --- a/gyp/common_conditions.gypi +++ b/gyp/common_conditions.gypi @@ -113,6 +113,18 @@ 'defines': [ 'SK_BUILD_FOR_MAC', ], + 'conditions' : [ + ['skia_arch_width == 64', { + 'xcode_settings': { + 'ARCHS': 'x86_64', + }, + }], + ['skia_arch_width == 32', { + 'xcode_settings': { + 'ARCHS': 'i386', + }, + }], + ], 'configurations': { 'Debug': { 'xcode_settings': { @@ -200,18 +212,18 @@ '-fno-rtti', ], 'conditions': [ - [ 'skia_target_arch == "arm"', { + [ 'skia_arch_type == "arm"', { 'ldflags': [ '-Wl', '--fix-cortex-a8', ], }], - [ 'skia_target_arch == "arm" and arm_thumb == 1', { + [ 'skia_arch_type == "arm" and arm_thumb == 1', { 'cflags': [ '-mthumb', ], }], - [ 'skia_target_arch == "arm" and armv7 == 1', { + [ 'skia_arch_type == "arm" and armv7 == 1', { 'variables': { 'arm_neon_optional%': 0, }, diff --git a/gyp/common_variables.gypi b/gyp/common_variables.gypi index 4a5f4a4696..49aadddc04 100644 --- a/gyp/common_variables.gypi +++ b/gyp/common_variables.gypi @@ -63,7 +63,8 @@ 'skia_mesa%': 0, # Do not turn on 'skia_angle' - it is currently experimental 'skia_angle%': 0, - 'skia_target_arch%': 'x86', + 'skia_arch_type%': 'x86', + 'skia_arch_width%': '32', }, # Re-define all variables defined within the level-2 'variables' dict, @@ -73,7 +74,8 @@ 'skia_scalar%': '<(skia_scalar)', 'skia_mesa%': '<(skia_mesa)', 'skia_angle%': '<(skia_angle)', - 'skia_target_arch%': '<(skia_target_arch)', + 'skia_arch_type%': '<(skia_arch_type)', + 'skia_arch_width%': '<(skia_arch_width)', }, } # Local Variables: diff --git a/gyp/core.gyp b/gyp/core.gyp index 5386407eca..a109d7b23f 100644 --- a/gyp/core.gyp +++ b/gyp/core.gyp @@ -313,7 +313,7 @@ 'android_system.gyp:ft2', ], }], - [ 'skia_os == "android" and skia_target_arch == "arm" and armv7 == 1', { + [ 'skia_os == "android" and skia_arch_type == "arm" and armv7 == 1', { # The code in SkUtilsArm.cpp can be used on an ARM-based Linux system, not only Android. 'sources': [ '../src/core/SkUtilsArm.cpp', diff --git a/gyp/opts.gyp b/gyp/opts.gyp index 41cb0ed6f7..ca2b1c1028 100644 --- a/gyp/opts.gyp +++ b/gyp/opts.gyp @@ -28,7 +28,7 @@ '../src/opts', ], 'conditions': [ - [ 'skia_target_arch == "x86"', { + [ 'skia_arch_type == "x86"', { 'conditions': [ [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', { 'cflags': [ @@ -47,7 +47,7 @@ 'opts_ssse3', ], }], - [ 'skia_target_arch == "arm" and armv7 == 1', { + [ 'skia_arch_type == "arm" and armv7 == 1', { # The assembly uses the frame pointer register (r7 in Thumb/r11 in # ARM), the compiler doesn't like that. 'cflags!': [ @@ -73,7 +73,7 @@ }] ], }], - [ 'skia_target_arch == "arm" and armv7 != 1', { + [ 'skia_arch_type == "arm" and armv7 != 1', { 'sources': [ '../src/opts/SkBitmapProcState_opts_none.cpp', '../src/opts/SkBlitRow_opts_none.cpp', @@ -108,7 +108,7 @@ 'OTHER_CFLAGS': ['-mssse3',], }, }], - [ 'skia_target_arch == "x86"', { + [ 'skia_arch_type == "x86"', { 'sources': [ '../src/opts/SkBitmapProcState_opts_SSSE3.cpp', ], |