Chromium Code Reviews| Index: libjpeg.gyp |
| =================================================================== |
| --- libjpeg.gyp (revision 96975) |
| +++ libjpeg.gyp (working copy) |
| @@ -162,12 +162,18 @@ |
| 'simd/jiss2red-64.asm', |
| ], |
| }], |
| - [ 'target_arch=="arm"', { |
| + # The ARM SIMD implementation requires the Neon instruction set. |
| + [ '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.
|
| 'sources': [ |
| 'simd/jsimd_arm.c', |
| 'simd/jsimd_arm_neon.S', |
| ], |
| }], |
| + [ 'target_arch=="arm" and arm_neon==0', { |
| + 'sources': [ |
| + 'jsimd_none.c', |
| + ], |
| + }], |
| # Build rules for an asm file. |
| # On Windows, we use the precompiled yasm binary. On Linux, we build |
| @@ -238,22 +244,26 @@ |
| { |
| 'rule_name': 'assemble', |
| 'extension': 'asm', |
| - 'inputs': [ '<(yasm_path)', ], |
| - 'outputs': [ |
| - '<(shared_generated_dir)/<(RULE_INPUT_ROOT).<(object_suffix)', |
| - ], |
| - 'action': [ |
| - '<(yasm_path)', |
| - '<(yasm_format)', |
| - '<@(yasm_flags)', |
| - '-DRGBX_FILLER_0XFF', |
| - '-DSTRICT_MEMORY_ACCESS', |
| - '-Isimd/', |
| - '-o', '<(shared_generated_dir)/<(RULE_INPUT_ROOT).<(object_suffix)', |
| - '<(RULE_INPUT_PATH)', |
| - ], |
| - 'process_outputs_as_sources': 1, |
| - 'message': 'Building <(RULE_INPUT_ROOT).<(object_suffix)', |
| + 'conditions': [ |
| + [ 'target_arch!="arm"', { |
| + 'inputs': [ '<(yasm_path)', ], |
| + 'outputs': [ |
| + '<(shared_generated_dir)/<(RULE_INPUT_ROOT).<(object_suffix)', |
| + ], |
| + 'action': [ |
| + '<(yasm_path)', |
| + '<(yasm_format)', |
| + '<@(yasm_flags)', |
| + '-DRGBX_FILLER_0XFF', |
| + '-DSTRICT_MEMORY_ACCESS', |
| + '-Isimd/', |
| + '-o', '<(shared_generated_dir)/<(RULE_INPUT_ROOT).<(object_suffix)', |
| + '<(RULE_INPUT_PATH)', |
| + ], |
| + 'process_outputs_as_sources': 1, |
| + 'message': 'Building <(RULE_INPUT_ROOT).<(object_suffix)', |
| + }], |
| + ] |
| }, |
| ], |
| }, |