gfx/cairo/libpixman/src/moz.build

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial