OLD | NEW |
---|---|
1 # Gyp file for opts projects | 1 # Gyp file for opts projects |
2 { | 2 { |
3 'targets': [ | 3 'targets': [ |
4 # Due to an unfortunate intersection of lameness between gcc and gyp, | 4 # Due to an unfortunate intersection of lameness between gcc and gyp, |
5 # we have to build the *_SSE2.cpp files in a separate target. The | 5 # we have to build the *_SSE2.cpp files in a separate target. The |
6 # gcc lameness is that, in order to compile SSE2 intrinsics code, it | 6 # gcc lameness is that, in order to compile SSE2 intrinsics code, it |
7 # must be passed the -msse2 flag. However, with this flag, it may | 7 # must be passed the -msse2 flag. However, with this flag, it may |
8 # emit SSE2 instructions even for scalar code, such as the CPUID | 8 # emit SSE2 instructions even for scalar code, such as the CPUID |
9 # test used to test for the presence of SSE2. So that, and all other | 9 # test used to test for the presence of SSE2. So that, and all other |
10 # code must be compiled *without* -msse2. The gyp lameness is that it | 10 # code must be compiled *without* -msse2. The gyp lameness is that it |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
107 'sources': [ | 107 'sources': [ |
108 '../src/opts/SkBitmapProcState_opts_none.cpp', | 108 '../src/opts/SkBitmapProcState_opts_none.cpp', |
109 '../src/opts/SkBlitMask_opts_none.cpp', | 109 '../src/opts/SkBlitMask_opts_none.cpp', |
110 '../src/opts/SkBlitRow_opts_none.cpp', | 110 '../src/opts/SkBlitRow_opts_none.cpp', |
111 '../src/opts/SkBlurImage_opts_none.cpp', | 111 '../src/opts/SkBlurImage_opts_none.cpp', |
112 '../src/opts/SkMorphology_opts_none.cpp', | 112 '../src/opts/SkMorphology_opts_none.cpp', |
113 '../src/opts/SkUtils_opts_none.cpp', | 113 '../src/opts/SkUtils_opts_none.cpp', |
114 '../src/opts/SkXfermode_opts_none.cpp', | 114 '../src/opts/SkXfermode_opts_none.cpp', |
115 ], | 115 ], |
116 }], | 116 }], |
117 [ 'skia_android_framework', { | |
118 'cflags!': [ | |
119 '-msse2', | |
djsollen
2014/02/28 13:54:21
is there any way to tell gyp to unset all the cfla
scroggo
2014/02/28 14:17:21
I don't know how to tell gyp that, but I could do
| |
120 '-mfpu=neon', | |
121 '-fomit-frame-pointer', | |
122 '-mno-apcs-frame', | |
123 ] | |
124 }], | |
117 ], | 125 ], |
118 }, | 126 }, |
119 # For the same lame reasons as what is done for skia_opts, we have to | 127 # For the same lame reasons as what is done for skia_opts, we have to |
120 # create another target specifically for SSSE3 code as we would not want | 128 # create another target specifically for SSSE3 code as we would not want |
121 # to compile the SSE2 code with -mssse3 which would potentially allow | 129 # to compile the SSE2 code with -mssse3 which would potentially allow |
122 # gcc to generate SSSE3 code. | 130 # gcc to generate SSSE3 code. |
123 { | 131 { |
124 'target_name': 'opts_ssse3', | 132 'target_name': 'opts_ssse3', |
125 'product_name': 'skia_opts_ssse3', | 133 'product_name': 'skia_opts_ssse3', |
126 'type': 'static_library', | 134 'type': 'static_library', |
127 'standalone_static_library': 1, | 135 'standalone_static_library': 1, |
128 'dependencies': [ | 136 'dependencies': [ |
129 'core.gyp:*', | 137 'core.gyp:*', |
130 'effects.gyp:*' | 138 'effects.gyp:*' |
131 ], | 139 ], |
132 'include_dirs': [ | 140 'include_dirs': [ |
133 '../src/core', | 141 '../src/core', |
134 ], | 142 ], |
135 'conditions': [ | 143 'conditions': [ |
136 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chrome os", "android"]', { | 144 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chrome os", "android"] \ |
145 and not skia_android_framework', { | |
137 'cflags': [ | 146 'cflags': [ |
138 '-mssse3', | 147 '-mssse3', |
139 ], | 148 ], |
140 }], | 149 }], |
141 # (Mac has -mssse3 globally.) | 150 # (Mac has -mssse3 globally.) |
142 [ 'skia_arch_type == "x86"', { | 151 [ 'skia_arch_type == "x86"', { |
143 'sources': [ | 152 'sources': [ |
144 '../src/opts/SkBitmapProcState_opts_SSSE3.cpp', | 153 '../src/opts/SkBitmapProcState_opts_SSSE3.cpp', |
145 ], | 154 ], |
146 }], | 155 }], |
(...skipping 15 matching lines...) Expand all Loading... | |
162 'include_dirs': [ | 171 'include_dirs': [ |
163 '../src/core', | 172 '../src/core', |
164 '../src/opts', | 173 '../src/opts', |
165 ], | 174 ], |
166 'cflags!': [ | 175 'cflags!': [ |
167 '-fno-omit-frame-pointer', | 176 '-fno-omit-frame-pointer', |
168 '-mfpu=vfp', # remove them all, just in case. | 177 '-mfpu=vfp', # remove them all, just in case. |
169 '-mfpu=vfpv3', | 178 '-mfpu=vfpv3', |
170 '-mfpu=vfpv3-d16', | 179 '-mfpu=vfpv3-d16', |
171 ], | 180 ], |
172 'cflags': [ | 181 'conditions': [ |
173 '-mfpu=neon', | 182 [ 'not skia_android_framework', { |
174 '-fomit-frame-pointer', | 183 'cflags': [ |
184 '-mfpu=neon', | |
185 '-fomit-frame-pointer', | |
186 ], | |
187 }], | |
175 ], | 188 ], |
176 'ldflags': [ | 189 'ldflags': [ |
177 '-march=armv7-a', | 190 '-march=armv7-a', |
178 '-Wl,--fix-cortex-a8', | 191 '-Wl,--fix-cortex-a8', |
179 ], | 192 ], |
180 'sources': [ | 193 'sources': [ |
181 '../src/opts/memset16_neon.S', | 194 '../src/opts/memset16_neon.S', |
182 '../src/opts/memset32_neon.S', | 195 '../src/opts/memset32_neon.S', |
183 '../src/opts/SkBitmapProcState_arm_neon.cpp', | 196 '../src/opts/SkBitmapProcState_arm_neon.cpp', |
184 '../src/opts/SkBitmapProcState_matrixProcs_neon.cpp', | 197 '../src/opts/SkBitmapProcState_matrixProcs_neon.cpp', |
185 '../src/opts/SkBitmapProcState_matrix_neon.h', | 198 '../src/opts/SkBitmapProcState_matrix_neon.h', |
186 '../src/opts/SkBlitMask_opts_arm_neon.cpp', | 199 '../src/opts/SkBlitMask_opts_arm_neon.cpp', |
187 '../src/opts/SkBlitRow_opts_arm_neon.cpp', | 200 '../src/opts/SkBlitRow_opts_arm_neon.cpp', |
188 '../src/opts/SkBlurImage_opts_neon.cpp', | 201 '../src/opts/SkBlurImage_opts_neon.cpp', |
189 '../src/opts/SkMorphology_opts_neon.cpp', | 202 '../src/opts/SkMorphology_opts_neon.cpp', |
190 '../src/opts/SkXfermode_opts_arm_neon.cpp', | 203 '../src/opts/SkXfermode_opts_arm_neon.cpp', |
191 ], | 204 ], |
192 }, | 205 }, |
193 ], | 206 ], |
194 } | 207 } |
OLD | NEW |