OLD | NEW |
---|---|
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 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 'variables': { | 6 'variables': { |
7 'shared_generated_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/libjpeg_turb o', | 7 'shared_generated_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/libjpeg_turb o', |
8 'conditions': [ | 8 'conditions': [ |
9 [ 'chromeos==1 or OS=="freebsd" or OS=="openbsd"', { | 9 [ 'chromeos==1 or OS=="freebsd" or OS=="openbsd"', { |
10 # Link to system .so since we already use it due to GTK. | 10 # Link to system .so since we already use it due to GTK. |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
155 'simd/jdsamss2-64.asm', | 155 'simd/jdsamss2-64.asm', |
156 'simd/jfss2fst-64.asm', | 156 'simd/jfss2fst-64.asm', |
157 'simd/jfss2int-64.asm', | 157 'simd/jfss2int-64.asm', |
158 'simd/jfsseflt-64.asm', | 158 'simd/jfsseflt-64.asm', |
159 'simd/jiss2flt-64.asm', | 159 'simd/jiss2flt-64.asm', |
160 'simd/jiss2fst-64.asm', | 160 'simd/jiss2fst-64.asm', |
161 'simd/jiss2int-64.asm', | 161 'simd/jiss2int-64.asm', |
162 'simd/jiss2red-64.asm', | 162 'simd/jiss2red-64.asm', |
163 ], | 163 ], |
164 }], | 164 }], |
165 [ 'target_arch=="arm"', { | 165 # The ARM SIMD implementation requires the Neon instruction set. |
166 [ 'target_arch=="arm" and arm_neon==1', { | |
Satish
2011/08/18 09:01:05
can this be done with:
[ 'target_arch=="arm"', {
Sami
2011/08/18 09:24:11
Thanks, that is a lot more concise.
| |
166 'sources': [ | 167 'sources': [ |
167 'simd/jsimd_arm.c', | 168 'simd/jsimd_arm.c', |
168 'simd/jsimd_arm_neon.S', | 169 'simd/jsimd_arm_neon.S', |
169 ], | 170 ], |
170 }], | 171 }], |
172 [ 'target_arch=="arm" and arm_neon==0', { | |
173 'sources': [ | |
174 'jsimd_none.c', | |
175 ], | |
176 }], | |
171 | 177 |
172 # Build rules for an asm file. | 178 # Build rules for an asm file. |
173 # On Windows, we use the precompiled yasm binary. On Linux, we build | 179 # On Windows, we use the precompiled yasm binary. On Linux, we build |
174 # our patched yasm and use it except when use_system_yasm is 1. On | 180 # our patched yasm and use it except when use_system_yasm is 1. On |
175 # Mac, we always build our patched yasm and use it because of | 181 # Mac, we always build our patched yasm and use it because of |
176 # <http://www.tortall.net/projects/yasm/ticket/236>. | 182 # <http://www.tortall.net/projects/yasm/ticket/236>. |
177 [ 'OS=="win"', { | 183 [ 'OS=="win"', { |
178 'variables': { | 184 'variables': { |
179 'yasm_path': '../yasm/binaries/win/yasm<(EXECUTABLE_SUFFIX)', | 185 'yasm_path': '../yasm/binaries/win/yasm<(EXECUTABLE_SUFFIX)', |
180 'yasm_format': '-fwin32', | 186 'yasm_format': '-fwin32', |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
231 ], | 237 ], |
232 }], | 238 }], |
233 ], | 239 ], |
234 }, | 240 }, |
235 }], | 241 }], |
236 ], | 242 ], |
237 'rules': [ | 243 'rules': [ |
238 { | 244 { |
239 'rule_name': 'assemble', | 245 'rule_name': 'assemble', |
240 'extension': 'asm', | 246 'extension': 'asm', |
241 'inputs': [ '<(yasm_path)', ], | 247 'conditions': [ |
242 'outputs': [ | 248 [ 'target_arch!="arm"', { |
243 '<(shared_generated_dir)/<(RULE_INPUT_ROOT).<(object_suffix)', | 249 'inputs': [ '<(yasm_path)', ], |
244 ], | 250 'outputs': [ |
245 'action': [ | 251 '<(shared_generated_dir)/<(RULE_INPUT_ROOT).<(object_suffix) ', |
246 '<(yasm_path)', | 252 ], |
247 '<(yasm_format)', | 253 'action': [ |
248 '<@(yasm_flags)', | 254 '<(yasm_path)', |
249 '-DRGBX_FILLER_0XFF', | 255 '<(yasm_format)', |
250 '-DSTRICT_MEMORY_ACCESS', | 256 '<@(yasm_flags)', |
251 '-Isimd/', | 257 '-DRGBX_FILLER_0XFF', |
252 '-o', '<(shared_generated_dir)/<(RULE_INPUT_ROOT).<(object_suffi x)', | 258 '-DSTRICT_MEMORY_ACCESS', |
253 '<(RULE_INPUT_PATH)', | 259 '-Isimd/', |
254 ], | 260 '-o', '<(shared_generated_dir)/<(RULE_INPUT_ROOT).<(object_s uffix)', |
255 'process_outputs_as_sources': 1, | 261 '<(RULE_INPUT_PATH)', |
256 'message': 'Building <(RULE_INPUT_ROOT).<(object_suffix)', | 262 ], |
263 'process_outputs_as_sources': 1, | |
264 'message': 'Building <(RULE_INPUT_ROOT).<(object_suffix)', | |
265 }], | |
266 ] | |
257 }, | 267 }, |
258 ], | 268 ], |
259 }, | 269 }, |
260 ], | 270 ], |
261 }, { # else: use_system_libjpeg != 0 | 271 }, { # else: use_system_libjpeg != 0 |
262 'targets': [ | 272 'targets': [ |
263 { | 273 { |
264 'target_name': 'libjpeg', | 274 'target_name': 'libjpeg', |
265 'type': 'settings', | 275 'type': 'settings', |
266 'direct_dependent_settings': { | 276 'direct_dependent_settings': { |
(...skipping 10 matching lines...) Expand all Loading... | |
277 ], | 287 ], |
278 }], | 288 }], |
279 ], | 289 ], |
280 } | 290 } |
281 | 291 |
282 # Local Variables: | 292 # Local Variables: |
283 # tab-width:2 | 293 # tab-width:2 |
284 # indent-tabs-mode:nil | 294 # indent-tabs-mode:nil |
285 # End: | 295 # End: |
286 # vim: set expandtab tabstop=2 shiftwidth=2: | 296 # vim: set expandtab tabstop=2 shiftwidth=2: |
OLD | NEW |