1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/cairo/libpixman/src/moz.build Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,154 @@ 1.4 +# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- 1.5 +# vim: set filetype=python: 1.6 +# This Source Code Form is subject to the terms of the Mozilla Public 1.7 +# License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 +# file, You can obtain one at http://mozilla.org/MPL/2.0/. 1.9 + 1.10 +EXPORTS += [ 1.11 + 'pixman-version.h', 1.12 + 'pixman.h', 1.13 +] 1.14 + 1.15 +# Apple's arm assembler doesn't support the same syntax as 1.16 +# the standard GNU assembler, so use the C fallback paths for now. 1.17 +# This may be fixable if clang's ARM/iOS assembler improves into a 1.18 +# viable solution in the future. 1.19 +if CONFIG['OS_ARCH'] != 'Darwin' and CONFIG['GNU_CC']: 1.20 + if CONFIG['HAVE_ARM_NEON']: 1.21 + SOURCES += [ 1.22 + 'pixman-arm-neon-asm-bilinear.S', 1.23 + 'pixman-arm-neon-asm.S', 1.24 + ] 1.25 + if CONFIG['HAVE_ARM_SIMD']: 1.26 + SOURCES += [ 1.27 + 'pixman-arm-simd-asm-scaled.S', 1.28 + 'pixman-arm-simd-asm.S', 1.29 + ] 1.30 + 1.31 +SOURCES += [ 1.32 + 'pixman-access-accessors.c', 1.33 + 'pixman-access.c', 1.34 + 'pixman-arm.c', 1.35 + 'pixman-bits-image.c', 1.36 + 'pixman-combine-float.c', 1.37 + 'pixman-combine16.c', 1.38 + 'pixman-combine32.c', 1.39 + 'pixman-conical-gradient.c', 1.40 + 'pixman-edge-accessors.c', 1.41 + 'pixman-edge.c', 1.42 + 'pixman-fast-path.c', 1.43 + 'pixman-filter.c', 1.44 + 'pixman-general.c', 1.45 + 'pixman-glyph.c', 1.46 + 'pixman-gradient-walker.c', 1.47 + 'pixman-image.c', 1.48 + 'pixman-implementation.c', 1.49 + 'pixman-linear-gradient.c', 1.50 + 'pixman-matrix.c', 1.51 + 'pixman-mips.c', 1.52 + 'pixman-noop.c', 1.53 + 'pixman-ppc.c', 1.54 + 'pixman-radial-gradient.c', 1.55 + 'pixman-region16.c', 1.56 + 'pixman-region32.c', 1.57 + 'pixman-solid-fill.c', 1.58 + 'pixman-trap.c', 1.59 + 'pixman-utils.c', 1.60 + 'pixman-x86.c', 1.61 + 'pixman.c', 1.62 +] 1.63 + 1.64 +MSVC_ENABLE_PGO = True 1.65 + 1.66 +FINAL_LIBRARY = 'gkmedias' 1.67 +LOCAL_INCLUDES += [ 1.68 + '../../cairo/src', 1.69 +] 1.70 + 1.71 +if CONFIG['MOZ_USE_PTHREADS']: 1.72 + DEFINES['HAVE_PTHREAD_SETSPECIFIC'] = True 1.73 + 1.74 +if CONFIG['_MSC_VER']: 1.75 + DEFINES['PIXMAN_USE_XP_DLL_TLS_WORKAROUND'] = True 1.76 + 1.77 +DEFINES['PACKAGE'] = 'mozpixman' 1.78 + 1.79 +DEFINES['_USE_MATH_DEFINES'] = True 1.80 + 1.81 +use_mmx = False 1.82 +use_sse2 = False 1.83 +use_vmx = False 1.84 +use_arm_simd_gcc = False 1.85 +use_arm_neon_gcc = False 1.86 +if '86' in CONFIG['OS_TEST']: 1.87 + if '64' in CONFIG['OS_TEST']: 1.88 + if CONFIG['GNU_CC']: 1.89 + use_sse2 = True 1.90 + else: 1.91 + if CONFIG['_MSC_VER']: 1.92 + use_mmx = True 1.93 + if CONFIG['HAVE_GCC_ALIGN_ARG_POINTER']: 1.94 + use_sse2 = True 1.95 + if CONFIG['GNU_CC']: 1.96 + use_mmx = True 1.97 + if CONFIG['_MSC_VER']: 1.98 + use_sse2 = True 1.99 +elif 'ppc' in CONFIG['OS_TEST']: 1.100 + if CONFIG['GNU_CC']: 1.101 + use_vmx = True 1.102 +# Apple's arm assembler doesn't support the same syntax as 1.103 +# the standard GNU assembler, so use the C fallback paths for now. 1.104 +# This may be fixable if clang's ARM/iOS assembler improves into a 1.105 +# viable solution in the future. 1.106 +elif 'arm' in CONFIG['OS_TEST']: 1.107 + if CONFIG['OS_ARCH'] != 'Darwin': 1.108 + if CONFIG['HAVE_ARM_SIMD']: 1.109 + use_arm_simd_gcc = True 1.110 + if CONFIG['HAVE_ARM_NEON']: 1.111 + use_arm_neon_gcc = True 1.112 + 1.113 +if use_mmx: 1.114 + DEFINES['USE_MMX'] = True 1.115 + SOURCES += ['pixman-mmx.c'] 1.116 + SOURCES['pixman-mmx.c'].flags += CONFIG['MMX_FLAGS'] 1.117 + if CONFIG['GNU_CC']: 1.118 + SOURCES['pixman-mmx.c'].flags += [ 1.119 + '-Winline', 1.120 + '--param inline-unit-growth=10000', 1.121 + '--param large-function-growth=10000', 1.122 + ] 1.123 + 1.124 +if use_sse2: 1.125 + DEFINES['USE_SSE'] = True 1.126 + DEFINES['USE_SSE2'] = True 1.127 + SOURCES += ['pixman-sse2.c'] 1.128 + SOURCES['pixman-sse2.c'].flags += CONFIG['SSE_FLAGS'] + CONFIG['SSE2_FLAGS'] 1.129 + if CONFIG['GNU_CC']: 1.130 + SOURCES['pixman-sse2.c'].flags += ['-Winline'] 1.131 + 1.132 +if use_vmx: 1.133 + DEFINES['USE_VMX'] = True 1.134 + SOURCES += ['pixman-vmx.c'] 1.135 + SOURCES['pixman-vmx.c'].flags += ['-maltivec'] 1.136 + 1.137 +if use_arm_simd_gcc: 1.138 + DEFINES['USE_ARM_SIMD'] = True 1.139 + SOURCES += ['pixman-arm-simd.c'] 1.140 + 1.141 +if use_arm_neon_gcc: 1.142 + DEFINES['USE_ARM_NEON'] = True 1.143 + SOURCES += ['pixman-arm-neon.c'] 1.144 + SOURCES['pixman-arm-neon.c'].flags += ['-mfpu=neon'] 1.145 + 1.146 +# Suppress warnings in third-party code. 1.147 +if CONFIG['GNU_CC']: 1.148 + CFLAGS += [ 1.149 + '-Wno-address', 1.150 + '-Wno-sign-compare' 1.151 + ] 1.152 + if CONFIG['CLANG_CXX']: 1.153 + CFLAGS += [ 1.154 + '-Wno-incompatible-pointer-types', 1.155 + '-Wno-tautological-compare', 1.156 + '-Wno-tautological-constant-out-of-range-compare', 1.157 + ]