| OLD | NEW |
| 1 { | 1 { |
| 2 'targets': [ | 2 'targets': [ |
| 3 # Due to an unfortunate intersection of lameness between gcc and gyp, | 3 # Due to an unfortunate intersection of lameness between gcc and gyp, |
| 4 # we have to build the *_SSE2.cpp files in a separate target. The | 4 # we have to build the *_SSE2.cpp files in a separate target. The |
| 5 # gcc lameness is that, in order to compile SSE2 intrinsics code, it | 5 # gcc lameness is that, in order to compile SSE2 intrinsics code, it |
| 6 # must be passed the -msse2 flag. However, with this flag, it may | 6 # must be passed the -msse2 flag. However, with this flag, it may |
| 7 # emit SSE2 instructions even for scalar code, such as the CPUID | 7 # emit SSE2 instructions even for scalar code, such as the CPUID |
| 8 # test used to test for the presence of SSE2. So that, and all other | 8 # test used to test for the presence of SSE2. So that, and all other |
| 9 # code must be compiled *without* -msse2. The gyp lameness is that it | 9 # code must be compiled *without* -msse2. The gyp lameness is that it |
| 10 # does not allow file-specific CFLAGS, so we must create this extra | 10 # does not allow file-specific CFLAGS, so we must create this extra |
| 11 # target for those files to be compiled with -msse2. | 11 # target for those files to be compiled with -msse2. |
| 12 # | 12 # |
| 13 # This is actually only a problem on 32-bit Linux (all Intel Macs have | 13 # This is actually only a problem on 32-bit Linux (all Intel Macs have |
| 14 # SSE2, Linux x86_64 has SSE2 by definition, and MSC will happily emit | 14 # SSE2, Linux x86_64 has SSE2 by definition, and MSC will happily emit |
| 15 # SSE2 from instrinsics, while generating plain ol' 386 for everything | 15 # SSE2 from instrinsics, while generating plain ol' 386 for everything |
| 16 # else). However, to keep the .gyp file simple and avoid platform-specific | 16 # else). However, to keep the .gyp file simple and avoid platform-specific |
| 17 # build breakage, we do this on all platforms. | 17 # build breakage, we do this on all platforms. |
| 18 | 18 |
| 19 # For about the same reason, we need to compile the ARM opts files | 19 # For about the same reason, we need to compile the ARM opts files |
| 20 # separately as well. | 20 # separately as well. |
| 21 { | 21 { |
| 22 'target_name': 'opts', | 22 'target_name': 'opts', |
| 23 'product_name': 'skia_opts', | 23 'product_name': 'skia_opts', |
| 24 'type': 'static_library', | 24 'type': 'static_library', |
| 25 'standalone_static_library': 1, | 25 'standalone_static_library': 1, |
| 26 'dependencies': [ | 26 'dependencies': [ |
| 27 'core.gyp:*', | 27 'core.gyp:*', |
| 28 'effects.gyp:*' |
| 28 ], | 29 ], |
| 29 'include_dirs': [ | 30 'include_dirs': [ |
| 30 '../src/core', | 31 '../src/core', |
| 31 '../src/opts', | 32 '../src/opts', |
| 32 ], | 33 ], |
| 33 'conditions': [ | 34 'conditions': [ |
| 34 [ 'skia_arch_type == "x86" and skia_os != "ios"', { | 35 [ 'skia_arch_type == "x86" and skia_os != "ios"', { |
| 35 'conditions': [ | 36 'conditions': [ |
| 36 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "ch
romeos", "android"]', { | 37 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "ch
romeos", "android"]', { |
| 37 'cflags': [ | 38 'cflags': [ |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 # create another target specifically for SSSE3 code as we would not want | 115 # create another target specifically for SSSE3 code as we would not want |
| 115 # to compile the SSE2 code with -mssse3 which would potentially allow | 116 # to compile the SSE2 code with -mssse3 which would potentially allow |
| 116 # gcc to generate SSSE3 code. | 117 # gcc to generate SSSE3 code. |
| 117 { | 118 { |
| 118 'target_name': 'opts_ssse3', | 119 'target_name': 'opts_ssse3', |
| 119 'product_name': 'skia_opts_ssse3', | 120 'product_name': 'skia_opts_ssse3', |
| 120 'type': 'static_library', | 121 'type': 'static_library', |
| 121 'standalone_static_library': 1, | 122 'standalone_static_library': 1, |
| 122 'dependencies': [ | 123 'dependencies': [ |
| 123 'core.gyp:*', | 124 'core.gyp:*', |
| 125 'effects.gyp:*' |
| 124 ], | 126 ], |
| 125 'include_dirs': [ | 127 'include_dirs': [ |
| 126 '../src/core', | 128 '../src/core', |
| 127 ], | 129 ], |
| 128 'conditions': [ | 130 'conditions': [ |
| 129 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chrome
os", "android"]', { | 131 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chrome
os", "android"]', { |
| 130 'cflags': [ | 132 'cflags': [ |
| 131 '-mssse3', | 133 '-mssse3', |
| 132 ], | 134 ], |
| 133 }], | 135 }], |
| 134 # (Mac has -mssse3 globally.) | 136 # (Mac has -mssse3 globally.) |
| 135 [ 'skia_arch_type == "x86"', { | 137 [ 'skia_arch_type == "x86"', { |
| 136 'sources': [ | 138 'sources': [ |
| 137 '../src/opts/SkBitmapProcState_opts_SSSE3.cpp', | 139 '../src/opts/SkBitmapProcState_opts_SSSE3.cpp', |
| 138 ], | 140 ], |
| 139 }], | 141 }], |
| 140 ], | 142 ], |
| 141 }, | 143 }, |
| 142 # NEON code must be compiled with -mfpu=neon which also affects scalar | 144 # NEON code must be compiled with -mfpu=neon which also affects scalar |
| 143 # code. To support dynamic NEON code paths, we need to build all | 145 # code. To support dynamic NEON code paths, we need to build all |
| 144 # NEON-specific sources in a separate static library. The situation | 146 # NEON-specific sources in a separate static library. The situation |
| 145 # is very similar to the SSSE3 one. | 147 # is very similar to the SSSE3 one. |
| 146 { | 148 { |
| 147 'target_name': 'opts_neon', | 149 'target_name': 'opts_neon', |
| 148 'product_name': 'skia_opts_neon', | 150 'product_name': 'skia_opts_neon', |
| 149 'type': 'static_library', | 151 'type': 'static_library', |
| 150 'standalone_static_library': 1, | 152 'standalone_static_library': 1, |
| 151 'dependencies': [ | 153 'dependencies': [ |
| 152 'core.gyp:*', | 154 'core.gyp:*', |
| 155 'effects.gyp:*' |
| 153 ], | 156 ], |
| 154 'include_dirs': [ | 157 'include_dirs': [ |
| 155 '../src/core', | 158 '../src/core', |
| 156 '../src/opts', | 159 '../src/opts', |
| 157 ], | 160 ], |
| 158 'cflags!': [ | 161 'cflags!': [ |
| 159 '-fno-omit-frame-pointer', | 162 '-fno-omit-frame-pointer', |
| 160 '-mfpu=vfp', # remove them all, just in case. | 163 '-mfpu=vfp', # remove them all, just in case. |
| 161 '-mfpu=vfpv3', | 164 '-mfpu=vfpv3', |
| 162 '-mfpu=vfpv3-d16', | 165 '-mfpu=vfpv3-d16', |
| (...skipping 15 matching lines...) Expand all Loading... |
| 178 '../src/opts/SkBitmapProcState_matrix_repeat_neon.h', | 181 '../src/opts/SkBitmapProcState_matrix_repeat_neon.h', |
| 179 '../src/opts/SkBlitMask_opts_arm_neon.cpp', | 182 '../src/opts/SkBlitMask_opts_arm_neon.cpp', |
| 180 '../src/opts/SkBlitRow_opts_arm_neon.cpp', | 183 '../src/opts/SkBlitRow_opts_arm_neon.cpp', |
| 181 '../src/opts/SkBlurImage_opts_neon.cpp', | 184 '../src/opts/SkBlurImage_opts_neon.cpp', |
| 182 '../src/opts/SkMorphology_opts_neon.cpp', | 185 '../src/opts/SkMorphology_opts_neon.cpp', |
| 183 '../src/opts/SkXfermode_opts_arm_neon.cpp', | 186 '../src/opts/SkXfermode_opts_arm_neon.cpp', |
| 184 ], | 187 ], |
| 185 }, | 188 }, |
| 186 ], | 189 ], |
| 187 } | 190 } |
| OLD | NEW |