Thu, 15 Jan 2015 15:59:08 +0100
Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
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/.
7 include('sources.mozbuild')
9 EXPORTS.vpx += files['EXPORTS']
11 if CONFIG['VPX_NEED_OBJ_INT_EXTRACT']:
12 HOST_SOURCES += [
13 'build/make/obj_int_extract.c',
14 ]
16 HOST_PROGRAM = 'host_obj_int_extract'
18 # Unify fewer files together to reduce the chance of name collision
19 FILES_PER_UNIFIED_FILE = 8
21 SOURCES += files['SOURCES']
22 UNIFIED_SOURCES += files['UNIFIED_SOURCES']
24 if CONFIG['MOZ_VPX_ERROR_CONCEALMENT']:
25 SOURCES += files['ERROR_CONCEALMENT']
27 if CONFIG['VPX_X86_ASM'] and CONFIG['OS_TARGET'] == 'WINNT':
28 offset_sources = [
29 'vp8/encoder/vp8_asm_enc_offsets.c',
30 'vpx_scale/vpx_scale_asm_offsets.c',
31 ]
32 SOURCES += offset_sources
33 if CONFIG['_MSC_VER']:
34 for s in offset_sources:
35 SOURCES[s].no_pgo = True
37 if CONFIG['VPX_X86_ASM']:
38 SOURCES += files['X86_ASM']
40 if '64' in CONFIG['OS_TEST']:
41 SOURCES += files['X86-64_ASM']
43 # AVX2 only supported on
44 # Darwin toolchain right now
45 if CONFIG['OS_TARGET'] == 'Darwin':
46 SOURCES += files['AVX2']
48 #postproc is only enabled on x86 with asm
49 SOURCES += files['VP8_POSTPROC']
51 arm_asm_files = []
52 if CONFIG['VPX_ARM_ASM']:
53 arm_asm_files += files['ARM_ASM']
55 if CONFIG['VPX_AS_CONVERSION']:
56 GENERATED_SOURCES += [ "%s.%s" % (f, CONFIG['VPX_ASM_SUFFIX'])
57 for f in sorted(arm_asm_files) if f.endswith('.asm')
58 ]
59 SOURCES += [
60 f for f in sorted(arm_asm_files) if not f.endswith('.asm')
61 ]
62 else:
63 SOURCES += sorted(arm_asm_files)
65 # boolhuff_armv5te.asm defines the same functions as boolhuff.c instead of
66 # using RTCD, so we have to make sure we only add one of the two.
67 if 'vp8/encoder/arm/armv5te/boolhuff_armv5te.asm' not in arm_asm_files:
68 SOURCES += [
69 'vp8/encoder/boolhuff.c',
70 ]
72 MSVC_ENABLE_PGO = True
74 if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
75 NO_VISIBILITY_FLAGS = True
77 FINAL_LIBRARY = 'gkmedias'
79 DEFINES['HAVE_CONFIG_H'] = 'vpx_config.h'
81 if CONFIG['OS_TARGET'] == 'Android':
82 # Older versions of the Android NDK don't pre-define anything to indicate
83 # the OS they're on, so do it for them.
84 DEFINES['__linux__'] = True
86 if not CONFIG['MOZ_WEBRTC']:
87 SOURCES += [
88 '%s/sources/android/cpufeatures/cpu-features.c' % CONFIG['ANDROID_NDK'],
89 ]
91 if not CONFIG['_MSC_VER']:
92 for f in SOURCES:
93 if f.endswith('.c'):
94 if 'sse2' in f:
95 SOURCES[f].flags += CONFIG['SSE2_FLAGS']
96 if 'ssse3' in f:
97 SOURCES[f].flags += ['-mssse3']
98 if 'avx2' in f:
99 SOURCES[f].flags += ['-mavx2']
101 # Suppress warnings in third-party code.
102 if CONFIG['GNU_CC']:
103 CFLAGS += ['-Wno-sign-compare']