diff options
Diffstat (limited to 'gyp')
-rw-r--r-- | gyp/opts.gyp | 38 | ||||
-rw-r--r-- | gyp/skia_lib.gyp | 1 |
2 files changed, 38 insertions, 1 deletions
diff --git a/gyp/opts.gyp b/gyp/opts.gyp index dc5ff5c9e9..69b8efe4cf 100644 --- a/gyp/opts.gyp +++ b/gyp/opts.gyp @@ -46,6 +46,7 @@ ], 'dependencies': [ 'opts_ssse3', + 'opts_sse4', ], 'sources': [ '../src/opts/opts_check_x86.cpp', @@ -172,10 +173,45 @@ }], ], }, + # For the same lame reasons as what is done for skia_opts, we also have to + # create another target specifically for SSE4 code as we would not want + # to compile the SSE2 code with -msse4 which would potentially allow + # gcc to generate SSE4 code. + { + 'target_name': 'opts_sse4', + 'product_name': 'skia_opts_sse4', + 'type': 'static_library', + 'standalone_static_library': 1, + 'dependencies': [ + 'core.gyp:*', + 'effects.gyp:*' + ], + 'include_dirs': [ + '../src/core', + ], + 'conditions': [ + [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chromeos", "android", "mac"] \ + and not skia_android_framework', { + 'cflags': [ + '-msse4', + ], + }], + [ 'skia_arch_width == 64 and skia_arch_type == "x86"', { + 'sources': [ + '../src/opts/SkBlitRow_opts_SSE4_x64_asm.S', + ], + }], + [ 'skia_arch_width == 32 and skia_arch_type == "x86"', { + 'sources': [ + '../src/opts/SkBlitRow_opts_SSE4_asm.S', + ], + }], + ], + }, # NEON code must be compiled with -mfpu=neon which also affects scalar # code. To support dynamic NEON code paths, we need to build all # NEON-specific sources in a separate static library. The situation - # is very similar to the SSSE3 one. + # is very similar to the SSSE3 and SSE4 one. { 'target_name': 'opts_neon', 'product_name': 'skia_opts_neon', diff --git a/gyp/skia_lib.gyp b/gyp/skia_lib.gyp index 5f3f14155c..04d4bfc207 100644 --- a/gyp/skia_lib.gyp +++ b/gyp/skia_lib.gyp @@ -15,6 +15,7 @@ [ 'skia_arch_type == "x86" and skia_os != "android"', { 'component_libs': [ 'opts.gyp:opts_ssse3', + 'opts.gyp:opts_sse4', ], }], [ 'arm_neon == 1', { |