config/expandlibs_config.py

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

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.

     1 # This Source Code Form is subject to the terms of the Mozilla Public
     2 # License, v. 2.0. If a copy of the MPL was not distributed with this
     3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
     5 from buildconfig import substs
     7 def normalize_suffix(suffix):
     8     '''Returns a normalized suffix, i.e. ensures it starts with a dot and
     9     doesn't starts or ends with whitespace characters'''
    10     value = suffix.strip()
    11     if len(value) and not value.startswith('.'):
    12         value = '.' + value
    13     return value
    15 # Variables from the build system
    16 AR = substs['AR']
    17 AR_EXTRACT = substs['AR_EXTRACT'].replace('$(AR)', AR)
    18 DLL_PREFIX = substs['DLL_PREFIX']
    19 LIB_PREFIX = substs['LIB_PREFIX']
    20 OBJ_SUFFIX = normalize_suffix(substs['OBJ_SUFFIX'])
    21 LIB_SUFFIX = normalize_suffix(substs['LIB_SUFFIX'])
    22 DLL_SUFFIX = normalize_suffix(substs['DLL_SUFFIX'])
    23 IMPORT_LIB_SUFFIX = normalize_suffix(substs['IMPORT_LIB_SUFFIX'])
    24 LIBS_DESC_SUFFIX = normalize_suffix(substs['LIBS_DESC_SUFFIX'])
    25 EXPAND_LIBS_LIST_STYLE = substs['EXPAND_LIBS_LIST_STYLE']
    26 EXPAND_LIBS_ORDER_STYLE = substs['EXPAND_LIBS_ORDER_STYLE']
    27 LD_PRINT_ICF_SECTIONS = substs['LD_PRINT_ICF_SECTIONS']

mercurial