Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 | 5 |
| 6 # This gyp file contains the platform-specific optimizations for Skia | 6 # This gyp file contains the platform-specific optimizations for Skia |
| 7 { | 7 { |
| 8 'targets': [ | 8 'targets': [ |
| 9 # Due to an unfortunate intersection of lameness between gcc and gyp, | 9 # Due to an unfortunate intersection of lameness between gcc and gyp, |
| 10 # we have to build the *_SSE2.cpp files in a separate target. The | 10 # we have to build the *_SSE2.cpp files in a separate target. The |
| 11 # gcc lameness is that, in order to compile SSE2 intrinsics code, it | 11 # gcc lameness is that, in order to compile SSE2 intrinsics code, it |
| 12 # must be passed the -msse2 flag. However, with this flag, it may | 12 # must be passed the -msse2 flag. However, with this flag, it may |
| 13 # emit SSE2 instructions even for scalar code, such as the CPUID | 13 # emit SSE2 instructions even for scalar code, such as the CPUID |
| 14 # test used to test for the presence of SSE2. So that, and all other | 14 # test used to test for the presence of SSE2. So that, and all other |
| 15 # code must be compiled *without* -msse2. The gyp lameness is that it | 15 # code must be compiled *without* -msse2. The gyp lameness is that it |
| 16 # does not allow file-specific CFLAGS, so we must create this extra | 16 # does not allow file-specific CFLAGS, so we must create this extra |
| 17 # target for those files to be compiled with -msse2. | 17 # target for those files to be compiled with -msse2. |
| 18 # | 18 # |
| 19 # This is actually only a problem on 32-bit Linux (all Intel Macs have | 19 # This is actually only a problem on 32-bit Linux (all Intel Macs have |
| 20 # SSE2, Linux x86_64 has SSE2 by definition, and MSC will happily emit | 20 # SSE2, Linux x86_64 has SSE2 by definition, and MSC will happily emit |
| 21 # SSE2 from instrinsics, which generating plain ol' 386 for everything | 21 # SSE2 from instrinsics, which generating plain ol' 386 for everything |
| 22 # else). However, to keep the .gyp file simple and avoid platform-specific | 22 # else). However, to keep the .gyp file simple and avoid platform-specific |
| 23 # build breakage, we do this on all platforms. | 23 # build breakage, we do this on all platforms. |
| 24 | 24 |
| 25 # For about the same reason, we need to compile the ARM opts files | 25 # For about the same reason, we need to compile the ARM opts files |
| 26 # separately as well. | 26 # separately as well. |
| 27 { | 27 { |
| 28 'target_name': 'skia_opts', | 28 'target_name': 'skia_opts', |
| 29 'type': 'static_library', | 29 'type': 'static_library', |
| 30 'includes': [ | |
| 31 'skia_common.gypi', | |
| 32 ], | |
| 30 'include_dirs': [ | 33 'include_dirs': [ |
| 34 '..', | |
|
djsollen
2013/09/27 13:52:25
if '..' is now a requirement due to the something
bungeman-skia
2013/09/27 17:59:13
Hmmm... it was kind of a requirement before, but t
| |
| 31 'config', | 35 'config', |
| 32 '../third_party/skia/include/config', | 36 '../third_party/skia/include/config', |
| 33 '../third_party/skia/include/core', | 37 '../third_party/skia/include/core', |
| 34 '../third_party/skia/src/core', | 38 '../third_party/skia/src/core', |
| 35 '../third_party/skia/src/opts', | 39 '../third_party/skia/src/opts', |
| 36 ], | 40 ], |
| 37 'conditions': [ | 41 'conditions': [ |
| 38 [ 'os_posix == 1 and OS != "mac" and OS != "android" and \ | 42 [ 'os_posix == 1 and OS != "mac" and OS != "android" and \ |
| 39 target_arch != "arm" and target_arch != "mipsel"', { | 43 target_arch != "arm" and target_arch != "mipsel"', { |
| 40 'cflags': [ | 44 'cflags': [ |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 127 }], | 131 }], |
| 128 ], | 132 ], |
| 129 }, | 133 }, |
| 130 # For the same lame reasons as what is done for skia_opts, we have to | 134 # For the same lame reasons as what is done for skia_opts, we have to |
| 131 # create another target specifically for SSSE3 code as we would not want | 135 # create another target specifically for SSSE3 code as we would not want |
| 132 # to compile the SSE2 code with -mssse3 which would potentially allow | 136 # to compile the SSE2 code with -mssse3 which would potentially allow |
| 133 # gcc to generate SSSE3 code. | 137 # gcc to generate SSSE3 code. |
| 134 { | 138 { |
| 135 'target_name': 'skia_opts_ssse3', | 139 'target_name': 'skia_opts_ssse3', |
| 136 'type': 'static_library', | 140 'type': 'static_library', |
| 141 'includes': [ | |
| 142 'skia_common.gypi', | |
| 143 ], | |
| 137 'include_dirs': [ | 144 'include_dirs': [ |
| 138 '..', | 145 '..', |
| 139 'config', | 146 'config', |
| 140 '../third_party/skia/include/config', | 147 '../third_party/skia/include/config', |
| 141 '../third_party/skia/include/core', | 148 '../third_party/skia/include/core', |
| 142 '../third_party/skia/src/core', | 149 '../third_party/skia/src/core', |
| 143 ], | 150 ], |
| 144 'conditions': [ | 151 'conditions': [ |
| 145 [ 'OS in ["linux", "freebsd", "openbsd", "solaris", "android"]', { | 152 [ 'OS in ["linux", "freebsd", "openbsd", "solaris", "android"]', { |
| 146 'cflags': [ | 153 'cflags': [ |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 165 [ 'target_arch != "arm" and target_arch != "mipsel"', { | 172 [ 'target_arch != "arm" and target_arch != "mipsel"', { |
| 166 'sources': [ | 173 'sources': [ |
| 167 '../third_party/skia/src/opts/SkBitmapProcState_opts_SSSE3.cpp', | 174 '../third_party/skia/src/opts/SkBitmapProcState_opts_SSSE3.cpp', |
| 168 ], | 175 ], |
| 169 }], | 176 }], |
| 170 ], | 177 ], |
| 171 }, | 178 }, |
| 172 { | 179 { |
| 173 'target_name': 'skia_opts_none', | 180 'target_name': 'skia_opts_none', |
| 174 'type': 'static_library', | 181 'type': 'static_library', |
| 182 'includes': [ | |
| 183 'skia_common.gypi', | |
| 184 ], | |
| 175 'include_dirs': [ | 185 'include_dirs': [ |
| 176 '..', | 186 '..', |
| 177 'config', | 187 'config', |
| 178 '../third_party/skia/include/config', | 188 '../third_party/skia/include/config', |
| 179 '../third_party/skia/include/core', | 189 '../third_party/skia/include/core', |
| 180 '../third_party/skia/src/core', | 190 '../third_party/skia/src/core', |
| 181 ], | 191 ], |
| 182 'sources': [ | 192 'sources': [ |
| 183 '../third_party/skia/src/opts/SkBitmapProcState_opts_none.cpp', | 193 '../third_party/skia/src/opts/SkBitmapProcState_opts_none.cpp', |
| 184 '../third_party/skia/src/opts/SkBlitMask_opts_none.cpp', | 194 '../third_party/skia/src/opts/SkBlitMask_opts_none.cpp', |
| 185 '../third_party/skia/src/opts/SkBlitRow_opts_none.cpp', | 195 '../third_party/skia/src/opts/SkBlitRow_opts_none.cpp', |
| 186 '../third_party/skia/src/opts/SkUtils_opts_none.cpp', | 196 '../third_party/skia/src/opts/SkUtils_opts_none.cpp', |
| 187 ], | 197 ], |
| 188 }, | 198 }, |
| 189 ], | 199 ], |
| 190 'conditions': [ | 200 'conditions': [ |
| 191 # NEON code must be compiled with -mfpu=neon which also affects scalar | 201 # NEON code must be compiled with -mfpu=neon which also affects scalar |
| 192 # code. To support dynamic NEON code paths, we need to build all | 202 # code. To support dynamic NEON code paths, we need to build all |
| 193 # NEON-specific sources in a separate static library. The situation | 203 # NEON-specific sources in a separate static library. The situation |
| 194 # is very similar to the SSSE3 one. | 204 # is very similar to the SSSE3 one. |
| 195 ['target_arch == "arm" and (arm_neon == 1 or arm_neon_optional == 1)', { | 205 ['target_arch == "arm" and (arm_neon == 1 or arm_neon_optional == 1)', { |
| 196 'targets': [ | 206 'targets': [ |
| 197 { | 207 { |
| 198 'target_name': 'skia_opts_neon', | 208 'target_name': 'skia_opts_neon', |
| 199 'type': 'static_library', | 209 'type': 'static_library', |
| 210 'includes': [ | |
| 211 'skia_common.gypi', | |
| 212 ], | |
| 200 'include_dirs': [ | 213 'include_dirs': [ |
| 201 '..', | 214 '..', |
| 202 'config', | 215 'config', |
| 203 '../third_party/skia/include/core', | 216 '../third_party/skia/include/core', |
| 204 '../third_party/skia/src/core', | 217 '../third_party/skia/src/core', |
| 205 '../third_party/skia/src/opts', | 218 '../third_party/skia/src/opts', |
| 206 ], | 219 ], |
| 207 'cflags!': [ | 220 'cflags!': [ |
| 208 '-fno-omit-frame-pointer', | 221 '-fno-omit-frame-pointer', |
| 209 '-mfpu=vfp', # remove them all, just in case. | 222 '-mfpu=vfp', # remove them all, just in case. |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 237 'defines': [ | 250 'defines': [ |
| 238 '__ARM_HAVE_OPTIONAL_NEON_SUPPORT', | 251 '__ARM_HAVE_OPTIONAL_NEON_SUPPORT', |
| 239 ], | 252 ], |
| 240 }], | 253 }], |
| 241 ], | 254 ], |
| 242 }, | 255 }, |
| 243 ], | 256 ], |
| 244 }], | 257 }], |
| 245 ], | 258 ], |
| 246 } | 259 } |
| OLD | NEW |