gfx/cairo/libpixman/src/moz.build

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:620dc402baaa
1 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
2 # vim: set filetype=python:
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7 EXPORTS += [
8 'pixman-version.h',
9 'pixman.h',
10 ]
11
12 # Apple's arm assembler doesn't support the same syntax as
13 # the standard GNU assembler, so use the C fallback paths for now.
14 # This may be fixable if clang's ARM/iOS assembler improves into a
15 # viable solution in the future.
16 if CONFIG['OS_ARCH'] != 'Darwin' and CONFIG['GNU_CC']:
17 if CONFIG['HAVE_ARM_NEON']:
18 SOURCES += [
19 'pixman-arm-neon-asm-bilinear.S',
20 'pixman-arm-neon-asm.S',
21 ]
22 if CONFIG['HAVE_ARM_SIMD']:
23 SOURCES += [
24 'pixman-arm-simd-asm-scaled.S',
25 'pixman-arm-simd-asm.S',
26 ]
27
28 SOURCES += [
29 'pixman-access-accessors.c',
30 'pixman-access.c',
31 'pixman-arm.c',
32 'pixman-bits-image.c',
33 'pixman-combine-float.c',
34 'pixman-combine16.c',
35 'pixman-combine32.c',
36 'pixman-conical-gradient.c',
37 'pixman-edge-accessors.c',
38 'pixman-edge.c',
39 'pixman-fast-path.c',
40 'pixman-filter.c',
41 'pixman-general.c',
42 'pixman-glyph.c',
43 'pixman-gradient-walker.c',
44 'pixman-image.c',
45 'pixman-implementation.c',
46 'pixman-linear-gradient.c',
47 'pixman-matrix.c',
48 'pixman-mips.c',
49 'pixman-noop.c',
50 'pixman-ppc.c',
51 'pixman-radial-gradient.c',
52 'pixman-region16.c',
53 'pixman-region32.c',
54 'pixman-solid-fill.c',
55 'pixman-trap.c',
56 'pixman-utils.c',
57 'pixman-x86.c',
58 'pixman.c',
59 ]
60
61 MSVC_ENABLE_PGO = True
62
63 FINAL_LIBRARY = 'gkmedias'
64 LOCAL_INCLUDES += [
65 '../../cairo/src',
66 ]
67
68 if CONFIG['MOZ_USE_PTHREADS']:
69 DEFINES['HAVE_PTHREAD_SETSPECIFIC'] = True
70
71 if CONFIG['_MSC_VER']:
72 DEFINES['PIXMAN_USE_XP_DLL_TLS_WORKAROUND'] = True
73
74 DEFINES['PACKAGE'] = 'mozpixman'
75
76 DEFINES['_USE_MATH_DEFINES'] = True
77
78 use_mmx = False
79 use_sse2 = False
80 use_vmx = False
81 use_arm_simd_gcc = False
82 use_arm_neon_gcc = False
83 if '86' in CONFIG['OS_TEST']:
84 if '64' in CONFIG['OS_TEST']:
85 if CONFIG['GNU_CC']:
86 use_sse2 = True
87 else:
88 if CONFIG['_MSC_VER']:
89 use_mmx = True
90 if CONFIG['HAVE_GCC_ALIGN_ARG_POINTER']:
91 use_sse2 = True
92 if CONFIG['GNU_CC']:
93 use_mmx = True
94 if CONFIG['_MSC_VER']:
95 use_sse2 = True
96 elif 'ppc' in CONFIG['OS_TEST']:
97 if CONFIG['GNU_CC']:
98 use_vmx = True
99 # Apple's arm assembler doesn't support the same syntax as
100 # the standard GNU assembler, so use the C fallback paths for now.
101 # This may be fixable if clang's ARM/iOS assembler improves into a
102 # viable solution in the future.
103 elif 'arm' in CONFIG['OS_TEST']:
104 if CONFIG['OS_ARCH'] != 'Darwin':
105 if CONFIG['HAVE_ARM_SIMD']:
106 use_arm_simd_gcc = True
107 if CONFIG['HAVE_ARM_NEON']:
108 use_arm_neon_gcc = True
109
110 if use_mmx:
111 DEFINES['USE_MMX'] = True
112 SOURCES += ['pixman-mmx.c']
113 SOURCES['pixman-mmx.c'].flags += CONFIG['MMX_FLAGS']
114 if CONFIG['GNU_CC']:
115 SOURCES['pixman-mmx.c'].flags += [
116 '-Winline',
117 '--param inline-unit-growth=10000',
118 '--param large-function-growth=10000',
119 ]
120
121 if use_sse2:
122 DEFINES['USE_SSE'] = True
123 DEFINES['USE_SSE2'] = True
124 SOURCES += ['pixman-sse2.c']
125 SOURCES['pixman-sse2.c'].flags += CONFIG['SSE_FLAGS'] + CONFIG['SSE2_FLAGS']
126 if CONFIG['GNU_CC']:
127 SOURCES['pixman-sse2.c'].flags += ['-Winline']
128
129 if use_vmx:
130 DEFINES['USE_VMX'] = True
131 SOURCES += ['pixman-vmx.c']
132 SOURCES['pixman-vmx.c'].flags += ['-maltivec']
133
134 if use_arm_simd_gcc:
135 DEFINES['USE_ARM_SIMD'] = True
136 SOURCES += ['pixman-arm-simd.c']
137
138 if use_arm_neon_gcc:
139 DEFINES['USE_ARM_NEON'] = True
140 SOURCES += ['pixman-arm-neon.c']
141 SOURCES['pixman-arm-neon.c'].flags += ['-mfpu=neon']
142
143 # Suppress warnings in third-party code.
144 if CONFIG['GNU_CC']:
145 CFLAGS += [
146 '-Wno-address',
147 '-Wno-sign-compare'
148 ]
149 if CONFIG['CLANG_CXX']:
150 CFLAGS += [
151 '-Wno-incompatible-pointer-types',
152 '-Wno-tautological-compare',
153 '-Wno-tautological-constant-out-of-range-compare',
154 ]

mercurial