| OLD | NEW |
| 1 { | 1 { |
| 2 # Source lists live in opts.gypi. This makes it easier to maintain our Chrome
GYP/GN setup. | 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 i
t was automatic.) | 3 # (To be honest, I'm not sure why we need to include common.gypi. I thought i
t was automatic.) |
| 4 'variables': { | 4 'variables': { |
| 5 'includes': [ 'common.gypi', 'opts.gypi' ], | 5 'includes': [ 'common.gypi', 'opts.gypi' ], |
| 6 }, | 6 }, |
| 7 | 7 |
| 8 # Generally we shove things into one 'opts' target conditioned on platform. | 8 # Generally we shove things into one 'opts' target conditioned on platform. |
| 9 # If a particular platform needs some files built with different flags, | 9 # If a particular platform needs some files built with different flags, |
| 10 # those become separate targets: opts_ssse3, opts_sse41, opts_neon. | 10 # those become separate targets: opts_ssse3, opts_sse41, opts_neon. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 ], | 21 ], |
| 22 'include_dirs': [ | 22 'include_dirs': [ |
| 23 '../src/core', | 23 '../src/core', |
| 24 '../src/opts', | 24 '../src/opts', |
| 25 '../src/utils', | 25 '../src/utils', |
| 26 '../include/utils', | 26 '../include/utils', |
| 27 ], | 27 ], |
| 28 'conditions': [ | 28 'conditions': [ |
| 29 [ 'skia_arch_type == "x86" and skia_os != "ios"', { | 29 [ 'skia_arch_type == "x86" and skia_os != "ios"', { |
| 30 'cflags': [ '-msse2' ], | 30 'cflags': [ '-msse2' ], |
| 31 'dependencies': [ 'opts_ssse3', 'opts_sse41', 'opts_avx' ], | 31 'dependencies': [ 'opts_ssse3', 'opts_sse41' ], |
| 32 'sources': [ '<@(sse2_sources)' ], | 32 'sources': [ '<@(sse2_sources)' ], |
| 33 }], | 33 }], |
| 34 | 34 |
| 35 [ 'skia_arch_type == "mips"', { | 35 [ 'skia_arch_type == "mips"', { |
| 36 'conditions': [ | 36 'conditions': [ |
| 37 [ '(mips_arch_variant == "mips32r2") and (mips_dsp == 1 or mips_dsp
== 2)', { | 37 [ '(mips_arch_variant == "mips32r2") and (mips_dsp == 1 or mips_dsp
== 2)', { |
| 38 'sources': [ '<@(mips_dsp_sources)' ], | 38 'sources': [ '<@(mips_dsp_sources)' ], |
| 39 },{ | 39 },{ |
| 40 'sources': [ '<@(none_sources)' ], | 40 'sources': [ '<@(none_sources)' ], |
| 41 }], | 41 }], |
| 42 ] | 42 ] |
| 43 }], | 43 }], |
| 44 | 44 |
| 45 [ '(skia_arch_type == "arm" and arm_version < 7) \ | 45 [ '(skia_arch_type == "arm" and arm_version < 7) \ |
| 46 or (skia_os == "ios") \ | 46 or (skia_os == "ios") \ |
| 47 or (skia_os == "android" and skia_arch_type not in ["x86", "arm", "m
ips", "arm64"])', { | 47 or (skia_os == "android" and skia_arch_type not in ["x86", "arm", "m
ips", "arm64"])', { |
| 48 'sources': [ '<@(none_sources)' ], | 48 'sources': [ '<@(none_sources)' ], |
| 49 }], | 49 }], |
| 50 | 50 |
| 51 [ 'skia_arch_type == "arm" and arm_version >= 7', { | 51 [ 'skia_arch_type == "arm" and arm_version >= 7', { |
| 52 # The assembly uses the frame pointer register (r7 in Thumb/r11 in | 52 # The assembly uses the frame pointer register (r7 in Thumb/r11 in |
| 53 # ARM), the compiler doesn't like that. | 53 # ARM), the compiler doesn't like that. |
| 54 'cflags!': [ '-fno-omit-frame-pointer', '-mapcs-frame', '-mapcs' ], | 54 'cflags!': [ '-fno-omit-frame-pointer', '-mapcs-frame', '-mapcs' ], |
| 55 'cflags': [ '-fomit-frame-pointer' ], | 55 'cflags': [ '-fomit-frame-pointer' ], |
| 56 'variables': { 'arm_neon_optional%': '<(arm_neon_optional>' }, | 56 'variables': { 'arm_neon_optional%': '<(arm_neon_optional>' }, |
| 57 'sources': [ '<@(armv7_sources)' ], | 57 'sources': [ '<@(armv7_sources)' ], |
| 58 'dependencies': [ 'opts_neon_fp16' ], | |
| 59 'conditions': [ | 58 'conditions': [ |
| 60 [ 'arm_neon == 1 or arm_neon_optional == 1', { | 59 [ 'arm_neon == 1 or arm_neon_optional == 1', { |
| 61 'dependencies': [ 'opts_neon' ] | 60 'dependencies': [ 'opts_neon' ] |
| 62 }], | 61 }], |
| 63 [ 'skia_os == "ios"', { | 62 [ 'skia_os == "ios"', { |
| 64 'sources!': [ | 63 'sources!': [ |
| 65 # these fail to compile under xcode for ios | 64 # these fail to compile under xcode for ios |
| 66 '../src/opts/memset.arm.S', | 65 '../src/opts/memset.arm.S', |
| 67 '../src/opts/SkBitmapProcState_opts_arm.cpp', | 66 '../src/opts/SkBitmapProcState_opts_arm.cpp', |
| 68 '../src/opts/SkBlitRow_opts_arm.cpp', | 67 '../src/opts/SkBlitRow_opts_arm.cpp', |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 }], | 113 }], |
| 115 [ 'not skia_android_framework', { | 114 [ 'not skia_android_framework', { |
| 116 'cflags': [ '-msse4.1' ], | 115 'cflags': [ '-msse4.1' ], |
| 117 }], | 116 }], |
| 118 [ 'skia_os == "mac"', { | 117 [ 'skia_os == "mac"', { |
| 119 'xcode_settings': { 'GCC_ENABLE_SSE41_EXTENSIONS': 'YES' }, | 118 'xcode_settings': { 'GCC_ENABLE_SSE41_EXTENSIONS': 'YES' }, |
| 120 }], | 119 }], |
| 121 ], | 120 ], |
| 122 }, | 121 }, |
| 123 { | 122 { |
| 124 'target_name': 'opts_avx', | |
| 125 'product_name': 'skia_opts_avx', | |
| 126 'type': 'static_library', | |
| 127 'standalone_static_library': 1, | |
| 128 'dependencies': [ 'core.gyp:*' ], | |
| 129 'sources': [ '<@(avx_sources)' ], | |
| 130 'conditions': [ | |
| 131 [ 'skia_os == "win"', { | |
| 132 'defines' : [ 'SK_CPU_SSE_LEVEL=50' ], | |
| 133 'msvs_settings': { 'VCCLCompilerTool': { 'EnabledEnhancedInstruction
Set': '3' } }, | |
| 134 }], | |
| 135 [ 'not skia_android_framework', { | |
| 136 'cflags': [ '-mavx' ], | |
| 137 }], | |
| 138 [ 'skia_os == "mac"', { | |
| 139 'xcode_settings': { 'OTHER_CPLUSPLUSFLAGS': [ '-mavx' ] }, | |
| 140 }], | |
| 141 ], | |
| 142 }, | |
| 143 { | |
| 144 'target_name': 'opts_neon', | 123 'target_name': 'opts_neon', |
| 145 'product_name': 'skia_opts_neon', | 124 'product_name': 'skia_opts_neon', |
| 146 'type': 'static_library', | 125 'type': 'static_library', |
| 147 'standalone_static_library': 1, | 126 'standalone_static_library': 1, |
| 148 'dependencies': [ | 127 'dependencies': [ |
| 149 'core.gyp:*', | 128 'core.gyp:*', |
| 150 'effects.gyp:*' | 129 'effects.gyp:*' |
| 151 ], | 130 ], |
| 152 'include_dirs': [ | 131 'include_dirs': [ |
| 153 '../src/core', | 132 '../src/core', |
| (...skipping 13 matching lines...) Expand all Loading... |
| 167 '-mfpu=neon', | 146 '-mfpu=neon', |
| 168 '-fomit-frame-pointer', | 147 '-fomit-frame-pointer', |
| 169 ], | 148 ], |
| 170 }], | 149 }], |
| 171 ], | 150 ], |
| 172 'ldflags': [ | 151 'ldflags': [ |
| 173 '-march=armv7-a', | 152 '-march=armv7-a', |
| 174 '-Wl,--fix-cortex-a8', | 153 '-Wl,--fix-cortex-a8', |
| 175 ], | 154 ], |
| 176 }, | 155 }, |
| 177 { | |
| 178 'target_name': 'opts_neon_fp16', | |
| 179 'product_name': 'skia_opts_neon_fp16', | |
| 180 'type': 'static_library', | |
| 181 'standalone_static_library': 1, | |
| 182 'dependencies': [ 'core.gyp:*' ], | |
| 183 'include_dirs': [ '../src/core' ], | |
| 184 'sources': [ '<@(neon_fp16_sources)' ], | |
| 185 'conditions': [ | |
| 186 [ 'not skia_android_framework', { | |
| 187 'cflags': [ | |
| 188 '-mfpu=neon-fp16', | |
| 189 '-mfp16-format=ieee', | |
| 190 '-fomit-frame-pointer', | |
| 191 ], | |
| 192 }], | |
| 193 ], | |
| 194 'ldflags': [ | |
| 195 '-march=armv7-a', | |
| 196 '-Wl,--fix-cortex-a8', | |
| 197 ], | |
| 198 }, | |
| 199 ], | 156 ], |
| 200 } | 157 } |
| OLD | NEW |