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': [ |
| 27 'core.gyp:*', |
| 28 ], |
26 'include_dirs': [ | 29 'include_dirs': [ |
27 '../include/config', | |
28 '../include/core', | |
29 '../src/core', | 30 '../src/core', |
30 '../src/opts', | 31 '../src/opts', |
31 ], | 32 ], |
32 'conditions': [ | 33 'conditions': [ |
33 [ 'skia_arch_type == "x86" and skia_os != "ios"', { | 34 [ 'skia_arch_type == "x86" and skia_os != "ios"', { |
34 'conditions': [ | 35 'conditions': [ |
35 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "ch
romeos"]', { | 36 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "ch
romeos"]', { |
36 'cflags': [ | 37 'cflags': [ |
37 '-msse2', | 38 '-msse2', |
38 ], | 39 ], |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 }, | 105 }, |
105 # For the same lame reasons as what is done for skia_opts, we have to | 106 # For the same lame reasons as what is done for skia_opts, we have to |
106 # create another target specifically for SSSE3 code as we would not want | 107 # create another target specifically for SSSE3 code as we would not want |
107 # to compile the SSE2 code with -mssse3 which would potentially allow | 108 # to compile the SSE2 code with -mssse3 which would potentially allow |
108 # gcc to generate SSSE3 code. | 109 # gcc to generate SSSE3 code. |
109 { | 110 { |
110 'target_name': 'opts_ssse3', | 111 'target_name': 'opts_ssse3', |
111 'product_name': 'skia_opts_ssse3', | 112 'product_name': 'skia_opts_ssse3', |
112 'type': 'static_library', | 113 'type': 'static_library', |
113 'standalone_static_library': 1, | 114 'standalone_static_library': 1, |
| 115 'dependencies': [ |
| 116 'core.gyp:*', |
| 117 ], |
114 'include_dirs': [ | 118 'include_dirs': [ |
115 '../include/config', | |
116 '../include/core', | |
117 '../src/core', | 119 '../src/core', |
118 ], | 120 ], |
119 'conditions': [ | 121 'conditions': [ |
120 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chrome
os"]', { | 122 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chrome
os"]', { |
121 'cflags': [ | 123 'cflags': [ |
122 '-mssse3', | 124 '-mssse3', |
123 ], | 125 ], |
124 }], | 126 }], |
125 # TODO(epoger): the following will enable SSSE3 on Macs, but it will | 127 # TODO(epoger): the following will enable SSSE3 on Macs, but it will |
126 # break once we set OTHER_CFLAGS anywhere else (the first setting will | 128 # break once we set OTHER_CFLAGS anywhere else (the first setting will |
(...skipping 12 matching lines...) Expand all Loading... |
139 }, | 141 }, |
140 # NEON code must be compiled with -mfpu=neon which also affects scalar | 142 # NEON code must be compiled with -mfpu=neon which also affects scalar |
141 # code. To support dynamic NEON code paths, we need to build all | 143 # code. To support dynamic NEON code paths, we need to build all |
142 # NEON-specific sources in a separate static library. The situation | 144 # NEON-specific sources in a separate static library. The situation |
143 # is very similar to the SSSE3 one. | 145 # is very similar to the SSSE3 one. |
144 { | 146 { |
145 'target_name': 'opts_neon', | 147 'target_name': 'opts_neon', |
146 'product_name': 'skia_opts_neon', | 148 'product_name': 'skia_opts_neon', |
147 'type': 'static_library', | 149 'type': 'static_library', |
148 'standalone_static_library': 1, | 150 'standalone_static_library': 1, |
| 151 'dependencies': [ |
| 152 'core.gyp:*', |
| 153 ], |
149 'include_dirs': [ | 154 'include_dirs': [ |
150 '../include/config', | |
151 '../include/core', | |
152 '../src/core', | 155 '../src/core', |
153 '../src/opts', | 156 '../src/opts', |
154 ], | 157 ], |
155 'cflags!': [ | 158 'cflags!': [ |
156 '-fno-omit-frame-pointer', | 159 '-fno-omit-frame-pointer', |
157 '-mfpu=vfp', # remove them all, just in case. | 160 '-mfpu=vfp', # remove them all, just in case. |
158 '-mfpu=vfpv3', | 161 '-mfpu=vfpv3', |
159 '-mfpu=vfpv3-d16', | 162 '-mfpu=vfpv3-d16', |
160 ], | 163 ], |
161 'cflags': [ | 164 'cflags': [ |
(...skipping 15 matching lines...) Expand all Loading... |
177 ], | 180 ], |
178 }, | 181 }, |
179 ], | 182 ], |
180 } | 183 } |
181 | 184 |
182 # Local Variables: | 185 # Local Variables: |
183 # tab-width:2 | 186 # tab-width:2 |
184 # indent-tabs-mode:nil | 187 # indent-tabs-mode:nil |
185 # End: | 188 # End: |
186 # vim: set expandtab tabstop=2 shiftwidth=2: | 189 # vim: set expandtab tabstop=2 shiftwidth=2: |
OLD | NEW |