| 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 # This gyp file contains the platform-specific optimizations for Skia | 5 # This gyp file contains the platform-specific optimizations for Skia |
| 6 { | 6 { |
| 7 'variables': { | 7 'variables': { |
| 8 'skia_src_path': '../third_party/skia/src', | 8 'skia_src_path': '../third_party/skia/src', |
| 9 'includes': [ '../third_party/skia/gyp/opts.gypi' ], | 9 'includes': [ '../third_party/skia/gyp/opts.gypi' ], |
| 10 'include_dirs': [ | 10 'include_dirs': [ |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 'targets': [ | 21 'targets': [ |
| 22 # SSE files have to be built in a separate target, because gcc needs | 22 # SSE files have to be built in a separate target, because gcc needs |
| 23 # different -msse flags for different SSE levels which enable use of SSE | 23 # different -msse flags for different SSE levels which enable use of SSE |
| 24 # intrinsics but also allow emission of SSE2 instructions for scalar code. | 24 # intrinsics but also allow emission of SSE2 instructions for scalar code. |
| 25 # gyp does not allow per-file compiler flags. | 25 # gyp does not allow per-file compiler flags. |
| 26 # For about the same reason, we need to compile the ARM opts files | 26 # For about the same reason, we need to compile the ARM opts files |
| 27 # separately as well. | 27 # separately as well. |
| 28 { | 28 { |
| 29 'target_name': 'skia_opts', | 29 'target_name': 'skia_opts', |
| 30 'type': 'static_library', | 30 'type': 'static_library', |
| 31 # The optimize: 'max' scattered throughout are particularly |
| 32 # important when compiled by MSVC 2013, which seems |
| 33 # to mis-link-time-compile code that's built with |
| 34 # different optimization levels. http://crbug.com/543583 |
| 35 'variables': { |
| 36 'optimize': 'max', |
| 37 }, |
| 31 'includes': [ | 38 'includes': [ |
| 32 'skia_common.gypi', | 39 'skia_common.gypi', |
| 33 '../build/android/increase_size_for_speed.gypi', | 40 '../build/android/increase_size_for_speed.gypi', |
| 34 # Disable LTO due to compiler error | 41 # Disable LTO due to compiler error |
| 35 # in mems_in_disjoint_alias_sets_p, at alias.c:393 | 42 # in mems_in_disjoint_alias_sets_p, at alias.c:393 |
| 36 # crbug.com/422255 | 43 # crbug.com/422255 |
| 37 '../build/android/disable_gcc_lto.gypi', | 44 '../build/android/disable_gcc_lto.gypi', |
| 38 ], | 45 ], |
| 39 'include_dirs': [ '<@(include_dirs)' ], | 46 'include_dirs': [ '<@(include_dirs)' ], |
| 40 'conditions': [ | 47 'conditions': [ |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 }], | 102 }], |
| 96 ], | 103 ], |
| 97 }, | 104 }, |
| 98 # For the same lame reasons as what is done for skia_opts, we have to | 105 # For the same lame reasons as what is done for skia_opts, we have to |
| 99 # create another target specifically for SSSE3 code as we would not want | 106 # create another target specifically for SSSE3 code as we would not want |
| 100 # to compile the SSE2 code with -mssse3 which would potentially allow | 107 # to compile the SSE2 code with -mssse3 which would potentially allow |
| 101 # gcc to generate SSSE3 code. | 108 # gcc to generate SSSE3 code. |
| 102 { | 109 { |
| 103 'target_name': 'skia_opts_ssse3', | 110 'target_name': 'skia_opts_ssse3', |
| 104 'type': 'static_library', | 111 'type': 'static_library', |
| 112 # The optimize: 'max' scattered throughout are particularly |
| 113 # important when compiled by MSVC 2013, which seems |
| 114 # to mis-link-time-compile code that's built with |
| 115 # different optimization levels. http://crbug.com/543583 |
| 116 'variables': { |
| 117 'optimize': 'max', |
| 118 }, |
| 105 'includes': [ | 119 'includes': [ |
| 106 'skia_common.gypi', | 120 'skia_common.gypi', |
| 107 '../build/android/increase_size_for_speed.gypi', | 121 '../build/android/increase_size_for_speed.gypi', |
| 108 ], | 122 ], |
| 109 'include_dirs': [ '<@(include_dirs)' ], | 123 'include_dirs': [ '<@(include_dirs)' ], |
| 110 'conditions': [ | 124 'conditions': [ |
| 111 [ 'OS in ["linux", "freebsd", "openbsd", "solaris", "android"]', { | 125 [ 'OS in ["linux", "freebsd", "openbsd", "solaris", "android"]', { |
| 112 'cflags': [ '-mssse3' ], | 126 'cflags': [ '-mssse3' ], |
| 113 }], | 127 }], |
| 114 [ 'OS == "mac"', { | 128 [ 'OS == "mac"', { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 132 }], | 146 }], |
| 133 ], | 147 ], |
| 134 }, | 148 }, |
| 135 # For the same lame reasons as what is done for skia_opts, we also have to | 149 # For the same lame reasons as what is done for skia_opts, we also have to |
| 136 # create another target specifically for SSE4.1 code as we would not want | 150 # create another target specifically for SSE4.1 code as we would not want |
| 137 # to compile the SSE2 code with -msse4.1 which would potentially allow | 151 # to compile the SSE2 code with -msse4.1 which would potentially allow |
| 138 # gcc to generate SSE4.1 code. | 152 # gcc to generate SSE4.1 code. |
| 139 { | 153 { |
| 140 'target_name': 'skia_opts_sse41', | 154 'target_name': 'skia_opts_sse41', |
| 141 'type': 'static_library', | 155 'type': 'static_library', |
| 156 # The optimize: 'max' scattered throughout are particularly |
| 157 # important when compiled by MSVC 2013, which seems |
| 158 # to mis-link-time-compile code that's built with |
| 159 # different optimization levels. http://crbug.com/543583 |
| 160 'variables': { |
| 161 'optimize': 'max', |
| 162 }, |
| 142 'includes': [ | 163 'includes': [ |
| 143 'skia_common.gypi', | 164 'skia_common.gypi', |
| 144 '../build/android/increase_size_for_speed.gypi', | 165 '../build/android/increase_size_for_speed.gypi', |
| 145 ], | 166 ], |
| 146 'include_dirs': [ '<@(include_dirs)' ], | 167 'include_dirs': [ '<@(include_dirs)' ], |
| 147 'sources': [ '<@(sse41_sources)' ], | 168 'sources': [ '<@(sse41_sources)' ], |
| 148 'conditions': [ | 169 'conditions': [ |
| 149 [ 'OS in ["linux", "freebsd", "openbsd", "solaris", "android"]', { | 170 [ 'OS in ["linux", "freebsd", "openbsd", "solaris", "android"]', { |
| 150 'cflags': [ '-msse4.1' ], | 171 'cflags': [ '-msse4.1' ], |
| 151 }], | 172 }], |
| (...skipping 10 matching lines...) Expand all Loading... |
| 162 }, | 183 }, |
| 163 }], | 184 }], |
| 164 [ 'OS == "win"', { | 185 [ 'OS == "win"', { |
| 165 'defines' : [ 'SK_CPU_SSE_LEVEL=41' ], | 186 'defines' : [ 'SK_CPU_SSE_LEVEL=41' ], |
| 166 }], | 187 }], |
| 167 ], | 188 ], |
| 168 }, | 189 }, |
| 169 { | 190 { |
| 170 'target_name': 'skia_opts_none', | 191 'target_name': 'skia_opts_none', |
| 171 'type': 'static_library', | 192 'type': 'static_library', |
| 193 # The optimize: 'max' scattered throughout are particularly |
| 194 # important when compiled by MSVC 2013, which seems |
| 195 # to mis-link-time-compile code that's built with |
| 196 # different optimization levels. http://crbug.com/543583 |
| 197 'variables': { |
| 198 'optimize': 'max', |
| 199 }, |
| 172 'includes': [ | 200 'includes': [ |
| 173 'skia_common.gypi', | 201 'skia_common.gypi', |
| 174 '../build/android/increase_size_for_speed.gypi', | 202 '../build/android/increase_size_for_speed.gypi', |
| 175 ], | 203 ], |
| 176 'include_dirs': [ '<@(include_dirs)' ], | 204 'include_dirs': [ '<@(include_dirs)' ], |
| 177 'sources': [ '<@(none_sources)' ], | 205 'sources': [ '<@(none_sources)' ], |
| 178 }, | 206 }, |
| 179 ], | 207 ], |
| 180 'conditions': [ | 208 'conditions': [ |
| 181 # NEON code must be compiled with -mfpu=neon which also affects scalar | 209 # NEON code must be compiled with -mfpu=neon which also affects scalar |
| (...skipping 26 matching lines...) Expand all Loading... |
| 208 'ldflags': [ | 236 'ldflags': [ |
| 209 '-march=armv7-a', | 237 '-march=armv7-a', |
| 210 '-Wl,--fix-cortex-a8', | 238 '-Wl,--fix-cortex-a8', |
| 211 ], | 239 ], |
| 212 'sources': [ '<@(neon_sources)' ], | 240 'sources': [ '<@(neon_sources)' ], |
| 213 }, | 241 }, |
| 214 ], | 242 ], |
| 215 }], | 243 }], |
| 216 ], | 244 ], |
| 217 } | 245 } |
| OLD | NEW |