Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
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 | 'qcms.h', |
michael@0 | 9 | 'qcmstypes.h', |
michael@0 | 10 | ] |
michael@0 | 11 | |
michael@0 | 12 | SOURCES += [ |
michael@0 | 13 | 'chain.c', |
michael@0 | 14 | 'iccread.c', |
michael@0 | 15 | 'matrix.c', |
michael@0 | 16 | 'transform.c', |
michael@0 | 17 | 'transform_util.c', |
michael@0 | 18 | ] |
michael@0 | 19 | |
michael@0 | 20 | MSVC_ENABLE_PGO = True |
michael@0 | 21 | |
michael@0 | 22 | FINAL_LIBRARY = 'gkmedias' |
michael@0 | 23 | |
michael@0 | 24 | if CONFIG['GNU_CC']: |
michael@0 | 25 | CFLAGS += ['-Wno-missing-field-initializers'] |
michael@0 | 26 | |
michael@0 | 27 | use_sse1 = False |
michael@0 | 28 | use_sse2 = False |
michael@0 | 29 | use_altivec = False |
michael@0 | 30 | if '86' in CONFIG['OS_TEST']: |
michael@0 | 31 | use_sse2 = True |
michael@0 | 32 | if CONFIG['_MSC_VER']: |
michael@0 | 33 | if CONFIG['OS_ARCH'] != 'WINNT' or CONFIG['OS_TEST'] != 'x86_64': |
michael@0 | 34 | use_sse1 = True |
michael@0 | 35 | else: |
michael@0 | 36 | use_sse1 = True |
michael@0 | 37 | elif 'ppc' in CONFIG['CPU_ARCH']: |
michael@0 | 38 | if CONFIG['GNU_CC']: |
michael@0 | 39 | use_altivec = True |
michael@0 | 40 | |
michael@0 | 41 | if use_sse1: |
michael@0 | 42 | SOURCES += ['transform-sse1.c'] |
michael@0 | 43 | SOURCES['transform-sse1.c'].flags += CONFIG['SSE_FLAGS'] |
michael@0 | 44 | if CONFIG['SOLARIS_SUNPRO_CC']: |
michael@0 | 45 | if '64' in CONFIG['OS_TEST']: |
michael@0 | 46 | # Sun Studio doesn't work correctly for x86 intristics |
michael@0 | 47 | # with -m64 and without optimization. |
michael@0 | 48 | SOURCES['transform-sse1.c'].flags += ['-xO4'] |
michael@0 | 49 | else: |
michael@0 | 50 | SOURCES['transform-sse1.c'].flags += ['-xarch=sse'] |
michael@0 | 51 | |
michael@0 | 52 | if use_sse2: |
michael@0 | 53 | SOURCES += ['transform-sse2.c'] |
michael@0 | 54 | SOURCES['transform-sse2.c'].flags += CONFIG['SSE2_FLAGS'] |
michael@0 | 55 | if CONFIG['SOLARIS_SUNPRO_CC']: |
michael@0 | 56 | if '64' in CONFIG['OS_TEST']: |
michael@0 | 57 | # Sun Studio doesn't work correctly for x86 intristics |
michael@0 | 58 | # with -m64 and without optimization. |
michael@0 | 59 | SOURCES['transform-sse2.c'].flags += ['-xO4'] |
michael@0 | 60 | else: |
michael@0 | 61 | SOURCES['transform-sse2.c'].flags += ['-xarch=sse2'] |
michael@0 | 62 | |
michael@0 | 63 | if use_altivec: |
michael@0 | 64 | SOURCES += ['transform-altivec.c'] |
michael@0 | 65 | SOURCES['transform-altivec.c'].flags += ['-maltivec'] |