1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
6 # This file is not used when use_system_libjpeg==1. Settings for building with
7 # the system libjpeg is in third_party/libjpeg/libjpeg.gyp.
9 'shared_generated_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/libjpeg_turbo',
12 'object_suffix': 'obj',
20 'target_name': 'libjpeg',
21 'type': 'static_library',
27 'MOTION_JPEG_SUPPORTED',
88 'direct_dependent_settings': {
93 'msvs_disabled_warnings': [4018, 4101],
94 # VS2010 does not correctly incrementally link obj files generated
95 # from asm files. This flag disables UseLibraryDependencyInputs to
97 'msvs_2010_disable_uldi_when_referenced': 1,
99 [ 'OS!="win"', {'product_name': 'jpeg_turbo'}],
100 # Add target-specific source files.
101 [ 'target_arch=="ia32"', {
139 [ 'target_arch=="x64" and msan!=1', {
141 'simd/jsimd_x86_64.c',
142 'simd/jccolss2-64.asm',
143 'simd/jcgrass2-64.asm',
144 'simd/jcqnts2f-64.asm',
145 'simd/jcqnts2i-64.asm',
146 'simd/jcsamss2-64.asm',
147 'simd/jdcolss2-64.asm',
148 'simd/jdmerss2-64.asm',
149 'simd/jdsamss2-64.asm',
150 'simd/jfss2fst-64.asm',
151 'simd/jfss2int-64.asm',
152 'simd/jfsseflt-64.asm',
153 'simd/jiss2flt-64.asm',
154 'simd/jiss2fst-64.asm',
155 'simd/jiss2int-64.asm',
156 'simd/jiss2red-64.asm',
159 # MemorySanitizer doesn't support assembly code, so keep it disabled in
160 # MSan builds for now.
166 # The ARM SIMD implementation can be used for devices that support
167 # the NEON instruction set. This can safely be done dynamically by
168 # probing CPU features at runtime, if you wish.
169 [ 'target_arch=="arm"', {
171 [ 'arm_version >= 7 and (arm_neon == 1 or arm_neon_optional == 1)', {
174 'simd/jsimd_arm_neon.S',
183 [ 'target_arch=="arm64"', {
188 [ 'target_arch=="mipsel"', {
194 # Build rules for an asm file.
195 # On Windows, we use the precompiled yasm binary. On Linux, we build
196 # our patched yasm and use it except when use_system_yasm is 1. On
197 # Mac, we always build our patched yasm and use it because of
198 # <http://www.tortall.net/projects/yasm/ticket/236>.
201 'yasm_path': '../yasm/binaries/win/yasm<(EXECUTABLE_SUFFIX)',
203 [ 'target_arch=="ia32"', {
204 'yasm_format': '-fwin32',
212 'yasm_format': '-fwin64',
225 '../yasm/yasm.gyp:yasm#host',
228 'yasm_path': '<(PRODUCT_DIR)/yasm',
230 [ 'target_arch=="ia32"', {
231 'yasm_format': '-fmacho',
238 'yasm_format': '-fmacho64',
248 [ 'OS=="linux" or OS=="freebsd" or (OS=="android" and target_arch!="arm")', {
250 [ 'use_system_yasm==0', {
252 '../yasm/yasm.gyp:yasm#host',
258 [ 'use_system_yasm==1', {
259 'yasm_path': '<!(which yasm)',
261 'yasm_path': '<(PRODUCT_DIR)/yasm',
263 [ 'target_arch=="ia32"', {
264 'yasm_format': '-felf',
271 'yasm_format': '-felf64',
284 'rule_name': 'assemble',
287 [ 'target_arch!="arm"', {
288 'inputs': [ '<(yasm_path)', ],
290 '<(shared_generated_dir)/<(RULE_INPUT_ROOT).<(object_suffix)',
296 '-DRGBX_FILLER_0XFF',
297 '-DSTRICT_MEMORY_ACCESS',
299 '-o', '<(shared_generated_dir)/<(RULE_INPUT_ROOT).<(object_suffix)',
300 '<(RULE_INPUT_PATH)',
302 'process_outputs_as_sources': 1,
303 'message': 'Building <(RULE_INPUT_ROOT).<(object_suffix)',
314 # indent-tabs-mode:nil
316 # vim: set expandtab tabstop=2 shiftwidth=2: