db/sqlite3/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.

     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 NO_VISIBILITY_FLAGS = True
     8 EXPORTS += [
     9     'sqlite3.h',
    10 ]
    12 LIBRARY_NAME = 'mozsqlite3'
    14 SOURCES += [
    15     'sqlite3.c',
    16 ]
    18 if CONFIG['MOZ_FOLD_LIBS']:
    19     FORCE_STATIC_LIB = True
    20 else:
    21     FORCE_SHARED_LIB = True
    23 # -DSQLITE_SECURE_DELETE=1 will cause SQLITE to 0-fill delete data so we
    24 # don't have to vacuum to make sure the data is not visible in the file.
    25 # -DSQLITE_ENABLE_FTS3=1 enables the full-text index module.
    26 # -DSQLITE_CORE=1 statically links that module into the SQLite library.
    27 # -DSQLITE_DEFAULT_PAGE_SIZE=32768 and SQLITE_MAX_DEFAULT_PAGE_SIZE=32768
    28 # increases the page size from 1k, see bug 416330.  It must be kept in sync with
    29 # the value of PREF_TS_PAGESIZE_DEFAULT in mozStorageService.cpp.  The value can
    30 # be overridden on a per-platform basis through the use of the PREF_TS_PAGESIZE
    31 # hidden preference.  If that preference is missing or invalid then this value
    32 # will be used.
    33 # -DSQLITE_MAX_SCHEMA_RETRY increases the times SQLite may try to reparse
    34 # statements when the schema changes. This is important when supporting lots of
    35 # concurrent connections, especially when they use shared cache.
    36 # Note: Be sure to update the configure.in checks when these change!
    37 for var in ('SQLITE_SECURE_DELETE', 'SQLITE_THREADSAFE', 'SQLITE_CORE',
    38             'SQLITE_ENABLE_FTS3', 'SQLITE_ENABLE_UNLOCK_NOTIFY'):
    39     DEFINES[var] = 1
    41 DEFINES['SQLITE_DEFAULT_PAGE_SIZE'] = 32768
    42 DEFINES['SQLITE_MAX_DEFAULT_PAGE_SIZE'] = 32768
    43 DEFINES['SQLITE_MAX_SCHEMA_RETRY'] = 25
    45 # -DSQLITE_WIN32_GETVERSIONEX=0 avoids using deprecated functions.
    46 # SQLite will just assume we are running on NT kinds of Windows. That's fine
    47 # because we don't support Win9x.
    48 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
    49     DEFINES['SQLITE_WIN32_GETVERSIONEX'] = 0
    51 # -DSQLITE_ENABLE_LOCKING_STYLE=1 to help with AFP folders
    52 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
    53     DEFINES['SQLITE_ENABLE_LOCKING_STYLE'] = 1
    55 # Turn on SQLite's assertions in debug builds.
    56 if CONFIG['MOZ_DEBUG']:
    57     DEFINES['SQLITE_DEBUG'] = 1
    59 if CONFIG['OS_TARGET'] == 'Android':
    60     # default to user readable only to fit Android security model
    61     DEFINES['SQLITE_DEFAULT_FILE_PERMISSIONS'] = '0600'
    63 # Force using malloc_usable_size when building with jemalloc because _msize
    64 # causes assertions on Win64. See bug 719579.
    65 if CONFIG['OS_ARCH'] == 'WINNT' and CONFIG['MOZ_MEMORY']:
    66     DEFINES['HAVE_MALLOC_USABLE_SIZE'] = True
    67     DEFINES['SQLITE_WITHOUT_MSIZE'] = True
    69 # disable PGO for Sun Studio
    70 if CONFIG['SOLARIS_SUNPRO_CC']:
    71     NO_PGO = True
    73 if CONFIG['OS_ARCH'] == 'WINNT':
    74     RCFILE  = 'sqlite.rc'
    75     RESFILE = 'sqlite.res'
    77 # Suppress warnings in third-party code.
    78 if CONFIG['GNU_CC']:
    79     CFLAGS += [
    80         '-Wno-sign-compare',
    81         '-Wno-type-limits',
    82     ]

mercurial