epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 1 | { |
mtklein | c98fe3a | 2015-01-26 18:05:37 -0800 | [diff] [blame^] | 2 | # Source lists live in opts.gypi. This makes it easier to maintain our Chrome GYP/GN setup. |
| 3 | # (To be honest, I'm not sure why we need to include common.gypi. I thought it was automatic.) |
| 4 | 'variables': { |
| 5 | 'includes': [ 'common.gypi', 'opts.gypi' ], |
| 6 | }, |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 7 | |
mtklein | c98fe3a | 2015-01-26 18:05:37 -0800 | [diff] [blame^] | 8 | # Generally we shove things into one 'opts' target conditioned on platform. |
| 9 | # If a particular platform needs some files built with different flags, |
| 10 | # those become separate targets: opts_ssse3, opts_sse41, opts_neon. |
| 11 | |
| 12 | 'targets': [ |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 13 | { |
| 14 | 'target_name': 'opts', |
borenet@google.com | efb1d77 | 2012-10-10 19:45:51 +0000 | [diff] [blame] | 15 | 'product_name': 'skia_opts', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 16 | 'type': 'static_library', |
borenet@google.com | efb1d77 | 2012-10-10 19:45:51 +0000 | [diff] [blame] | 17 | 'standalone_static_library': 1, |
bungeman@google.com | b8f3655 | 2013-07-22 14:39:45 +0000 | [diff] [blame] | 18 | 'dependencies': [ |
| 19 | 'core.gyp:*', |
senorblanco@chromium.org | 0ded88d | 2014-01-24 15:43:50 +0000 | [diff] [blame] | 20 | 'effects.gyp:*' |
bungeman@google.com | b8f3655 | 2013-07-22 14:39:45 +0000 | [diff] [blame] | 21 | ], |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 22 | 'include_dirs': [ |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 23 | '../src/core', |
djsollen@google.com | a44e6c6 | 2012-01-09 14:38:25 +0000 | [diff] [blame] | 24 | '../src/opts', |
krajcevski | 630598c | 2014-07-14 12:00:04 -0700 | [diff] [blame] | 25 | '../src/utils', |
mtklein | c98fe3a | 2015-01-26 18:05:37 -0800 | [diff] [blame^] | 26 | '../include/utils', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 27 | ], |
| 28 | 'conditions': [ |
caryclark@google.com | 867cbd8 | 2012-09-20 15:45:41 +0000 | [diff] [blame] | 29 | [ 'skia_arch_type == "x86" and skia_os != "ios"', { |
mtklein | c98fe3a | 2015-01-26 18:05:37 -0800 | [diff] [blame^] | 30 | 'cflags': [ '-msse2' ], |
| 31 | 'dependencies': [ 'opts_ssse3', 'opts_sse41' ], |
| 32 | 'sources': [ '<@(sse2_sources)' ], |
djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 33 | }], |
mtklein | c98fe3a | 2015-01-26 18:05:37 -0800 | [diff] [blame^] | 34 | |
| 35 | [ 'skia_arch_type == "mips"', { |
| 36 | 'conditions': [ |
| 37 | [ '(mips_arch_variant == "mips32r2") and (mips_dsp == 1 or mips_dsp == 2)', { |
| 38 | 'sources': [ '<@(mips_dsp_sources)' ], |
| 39 | },{ |
| 40 | 'sources': [ '<@(none_sources)' ], |
| 41 | }], |
| 42 | ] |
| 43 | }], |
| 44 | |
| 45 | [ '(skia_arch_type == "arm" and arm_version < 7) \ |
| 46 | or (skia_os == "ios") \ |
| 47 | or (skia_os == "android" and skia_arch_type not in ["x86", "arm", "mips", "arm64"])', { |
| 48 | 'sources': [ '<@(none_sources)' ], |
| 49 | }], |
| 50 | |
djsollen@google.com | f7542ba | 2013-07-31 12:57:27 +0000 | [diff] [blame] | 51 | [ 'skia_arch_type == "arm" and arm_version >= 7', { |
djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 52 | # The assembly uses the frame pointer register (r7 in Thumb/r11 in |
| 53 | # ARM), the compiler doesn't like that. |
mtklein | c98fe3a | 2015-01-26 18:05:37 -0800 | [diff] [blame^] | 54 | 'cflags!': [ '-fno-omit-frame-pointer', '-mapcs-frame', '-mapcs' ], |
| 55 | 'cflags': [ '-fomit-frame-pointer' ], |
| 56 | 'variables': { 'arm_neon_optional%': '<(arm_neon_optional>' }, |
| 57 | 'sources': [ '<@(armv7_sources)' ], |
digit@google.com | eec9dbc | 2012-05-30 13:54:41 +0000 | [diff] [blame] | 58 | 'conditions': [ |
| 59 | [ 'arm_neon == 1 or arm_neon_optional == 1', { |
mtklein | c98fe3a | 2015-01-26 18:05:37 -0800 | [diff] [blame^] | 60 | 'dependencies': [ 'opts_neon' ] |
caryclark@google.com | 867cbd8 | 2012-09-20 15:45:41 +0000 | [diff] [blame] | 61 | }], |
| 62 | [ 'skia_os == "ios"', { |
| 63 | 'sources!': [ |
caryclark@google.com | 594dd3c | 2012-09-24 19:33:57 +0000 | [diff] [blame] | 64 | # these fail to compile under xcode for ios |
caryclark@google.com | 867cbd8 | 2012-09-20 15:45:41 +0000 | [diff] [blame] | 65 | '../src/opts/memset.arm.S', |
caryclark@google.com | 594dd3c | 2012-09-24 19:33:57 +0000 | [diff] [blame] | 66 | '../src/opts/SkBitmapProcState_opts_arm.cpp', |
| 67 | '../src/opts/SkBlitRow_opts_arm.cpp', |
caryclark@google.com | 867cbd8 | 2012-09-20 15:45:41 +0000 | [diff] [blame] | 68 | ], |
| 69 | }], |
digit@google.com | eec9dbc | 2012-05-30 13:54:41 +0000 | [diff] [blame] | 70 | ], |
djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 71 | }], |
mtklein | c98fe3a | 2015-01-26 18:05:37 -0800 | [diff] [blame^] | 72 | |
| 73 | [ 'skia_arch_type == "arm64"', { |
| 74 | 'sources': [ '<@(armv64_sources)' ], |
djordje.pesut | 632a454 | 2014-06-11 06:56:10 -0700 | [diff] [blame] | 75 | }], |
mtklein | c98fe3a | 2015-01-26 18:05:37 -0800 | [diff] [blame^] | 76 | |
commit-bot@chromium.org | e72a408 | 2014-02-28 16:07:39 +0000 | [diff] [blame] | 77 | [ 'skia_android_framework', { |
| 78 | 'cflags!': [ |
| 79 | '-msse2', |
| 80 | '-mfpu=neon', |
| 81 | '-fomit-frame-pointer', |
commit-bot@chromium.org | e72a408 | 2014-02-28 16:07:39 +0000 | [diff] [blame] | 82 | ] |
| 83 | }], |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 84 | ], |
| 85 | }, |
tomhudson@google.com | 95ad155 | 2012-02-14 18:28:54 +0000 | [diff] [blame] | 86 | { |
| 87 | 'target_name': 'opts_ssse3', |
borenet@google.com | efb1d77 | 2012-10-10 19:45:51 +0000 | [diff] [blame] | 88 | 'product_name': 'skia_opts_ssse3', |
tomhudson@google.com | 95ad155 | 2012-02-14 18:28:54 +0000 | [diff] [blame] | 89 | 'type': 'static_library', |
borenet@google.com | efb1d77 | 2012-10-10 19:45:51 +0000 | [diff] [blame] | 90 | 'standalone_static_library': 1, |
mtklein | c98fe3a | 2015-01-26 18:05:37 -0800 | [diff] [blame^] | 91 | 'dependencies': [ 'core.gyp:*' ], |
| 92 | 'include_dirs': [ '../src/core' ], |
| 93 | 'sources': [ '<@(ssse3_sources)' ], |
tomhudson@google.com | 95ad155 | 2012-02-14 18:28:54 +0000 | [diff] [blame] | 94 | 'conditions': [ |
djsollen | bc89329 | 2014-07-24 13:53:56 -0700 | [diff] [blame] | 95 | [ 'skia_os == "win"', { |
| 96 | 'defines' : [ 'SK_CPU_SSE_LEVEL=31' ], |
| 97 | }], |
mtklein | c98fe3a | 2015-01-26 18:05:37 -0800 | [diff] [blame^] | 98 | [ 'not skia_android_framework', { |
| 99 | 'cflags': [ '-mssse3' ], |
tomhudson@google.com | 95ad155 | 2012-02-14 18:28:54 +0000 | [diff] [blame] | 100 | }], |
tomhudson@google.com | 95ad155 | 2012-02-14 18:28:54 +0000 | [diff] [blame] | 101 | ], |
| 102 | }, |
henrik.smiding | 3bb195e | 2014-06-27 08:03:17 -0700 | [diff] [blame] | 103 | { |
mtklein | c98fe3a | 2015-01-26 18:05:37 -0800 | [diff] [blame^] | 104 | 'target_name': 'opts_sse41', |
| 105 | 'product_name': 'skia_opts_sse41', |
henrik.smiding | 3bb195e | 2014-06-27 08:03:17 -0700 | [diff] [blame] | 106 | 'type': 'static_library', |
| 107 | 'standalone_static_library': 1, |
mtklein | c98fe3a | 2015-01-26 18:05:37 -0800 | [diff] [blame^] | 108 | 'dependencies': [ 'core.gyp:*' ], |
| 109 | 'sources': [ '<@(sse41_sources)' ], |
henrik.smiding | 3bb195e | 2014-06-27 08:03:17 -0700 | [diff] [blame] | 110 | 'conditions': [ |
djsollen | bc89329 | 2014-07-24 13:53:56 -0700 | [diff] [blame] | 111 | [ 'skia_os == "win"', { |
| 112 | 'defines' : [ 'SK_CPU_SSE_LEVEL=41' ], |
| 113 | }], |
mtklein | c98fe3a | 2015-01-26 18:05:37 -0800 | [diff] [blame^] | 114 | [ 'not skia_android_framework', { |
| 115 | 'cflags': [ '-msse4.1' ], |
henrik.smiding | 3bb195e | 2014-06-27 08:03:17 -0700 | [diff] [blame] | 116 | }], |
henrik.smiding | 5f7f9d0 | 2014-07-07 08:05:40 -0700 | [diff] [blame] | 117 | [ 'skia_os == "mac"', { |
mtklein | c98fe3a | 2015-01-26 18:05:37 -0800 | [diff] [blame^] | 118 | 'xcode_settings': { 'GCC_ENABLE_SSE41_EXTENSIONS': 'YES' }, |
henrik.smiding | 5f7f9d0 | 2014-07-07 08:05:40 -0700 | [diff] [blame] | 119 | }], |
henrik.smiding | 3bb195e | 2014-06-27 08:03:17 -0700 | [diff] [blame] | 120 | ], |
| 121 | }, |
digit@google.com | eec9dbc | 2012-05-30 13:54:41 +0000 | [diff] [blame] | 122 | { |
| 123 | 'target_name': 'opts_neon', |
borenet@google.com | efb1d77 | 2012-10-10 19:45:51 +0000 | [diff] [blame] | 124 | 'product_name': 'skia_opts_neon', |
digit@google.com | eec9dbc | 2012-05-30 13:54:41 +0000 | [diff] [blame] | 125 | 'type': 'static_library', |
borenet@google.com | efb1d77 | 2012-10-10 19:45:51 +0000 | [diff] [blame] | 126 | 'standalone_static_library': 1, |
bungeman@google.com | b8f3655 | 2013-07-22 14:39:45 +0000 | [diff] [blame] | 127 | 'dependencies': [ |
| 128 | 'core.gyp:*', |
senorblanco@chromium.org | 0ded88d | 2014-01-24 15:43:50 +0000 | [diff] [blame] | 129 | 'effects.gyp:*' |
bungeman@google.com | b8f3655 | 2013-07-22 14:39:45 +0000 | [diff] [blame] | 130 | ], |
digit@google.com | eec9dbc | 2012-05-30 13:54:41 +0000 | [diff] [blame] | 131 | 'include_dirs': [ |
digit@google.com | eec9dbc | 2012-05-30 13:54:41 +0000 | [diff] [blame] | 132 | '../src/core', |
digit@google.com | fce02ac | 2012-08-01 14:25:07 +0000 | [diff] [blame] | 133 | '../src/opts', |
krajcevski | 630598c | 2014-07-14 12:00:04 -0700 | [diff] [blame] | 134 | '../src/utils', |
digit@google.com | eec9dbc | 2012-05-30 13:54:41 +0000 | [diff] [blame] | 135 | ], |
mtklein | c98fe3a | 2015-01-26 18:05:37 -0800 | [diff] [blame^] | 136 | 'sources': [ '<@(neon_sources)' ], |
digit@google.com | eec9dbc | 2012-05-30 13:54:41 +0000 | [diff] [blame] | 137 | 'cflags!': [ |
| 138 | '-fno-omit-frame-pointer', |
| 139 | '-mfpu=vfp', # remove them all, just in case. |
| 140 | '-mfpu=vfpv3', |
| 141 | '-mfpu=vfpv3-d16', |
| 142 | ], |
commit-bot@chromium.org | e72a408 | 2014-02-28 16:07:39 +0000 | [diff] [blame] | 143 | 'conditions': [ |
| 144 | [ 'not skia_android_framework', { |
| 145 | 'cflags': [ |
| 146 | '-mfpu=neon', |
| 147 | '-fomit-frame-pointer', |
| 148 | ], |
| 149 | }], |
digit@google.com | eec9dbc | 2012-05-30 13:54:41 +0000 | [diff] [blame] | 150 | ], |
djsollen@google.com | 4dcc624 | 2013-01-23 18:56:38 +0000 | [diff] [blame] | 151 | 'ldflags': [ |
| 152 | '-march=armv7-a', |
| 153 | '-Wl,--fix-cortex-a8', |
| 154 | ], |
digit@google.com | eec9dbc | 2012-05-30 13:54:41 +0000 | [diff] [blame] | 155 | }, |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 156 | ], |
| 157 | } |