1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/db/sqlite3/src/moz.build Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,82 @@ 1.4 +# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- 1.5 +# vim: set filetype=python: 1.6 +# This Source Code Form is subject to the terms of the Mozilla Public 1.7 +# License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 +# file, You can obtain one at http://mozilla.org/MPL/2.0/. 1.9 +NO_VISIBILITY_FLAGS = True 1.10 + 1.11 +EXPORTS += [ 1.12 + 'sqlite3.h', 1.13 +] 1.14 + 1.15 +LIBRARY_NAME = 'mozsqlite3' 1.16 + 1.17 +SOURCES += [ 1.18 + 'sqlite3.c', 1.19 +] 1.20 + 1.21 +if CONFIG['MOZ_FOLD_LIBS']: 1.22 + FORCE_STATIC_LIB = True 1.23 +else: 1.24 + FORCE_SHARED_LIB = True 1.25 + 1.26 +# -DSQLITE_SECURE_DELETE=1 will cause SQLITE to 0-fill delete data so we 1.27 +# don't have to vacuum to make sure the data is not visible in the file. 1.28 +# -DSQLITE_ENABLE_FTS3=1 enables the full-text index module. 1.29 +# -DSQLITE_CORE=1 statically links that module into the SQLite library. 1.30 +# -DSQLITE_DEFAULT_PAGE_SIZE=32768 and SQLITE_MAX_DEFAULT_PAGE_SIZE=32768 1.31 +# increases the page size from 1k, see bug 416330. It must be kept in sync with 1.32 +# the value of PREF_TS_PAGESIZE_DEFAULT in mozStorageService.cpp. The value can 1.33 +# be overridden on a per-platform basis through the use of the PREF_TS_PAGESIZE 1.34 +# hidden preference. If that preference is missing or invalid then this value 1.35 +# will be used. 1.36 +# -DSQLITE_MAX_SCHEMA_RETRY increases the times SQLite may try to reparse 1.37 +# statements when the schema changes. This is important when supporting lots of 1.38 +# concurrent connections, especially when they use shared cache. 1.39 +# Note: Be sure to update the configure.in checks when these change! 1.40 +for var in ('SQLITE_SECURE_DELETE', 'SQLITE_THREADSAFE', 'SQLITE_CORE', 1.41 + 'SQLITE_ENABLE_FTS3', 'SQLITE_ENABLE_UNLOCK_NOTIFY'): 1.42 + DEFINES[var] = 1 1.43 + 1.44 +DEFINES['SQLITE_DEFAULT_PAGE_SIZE'] = 32768 1.45 +DEFINES['SQLITE_MAX_DEFAULT_PAGE_SIZE'] = 32768 1.46 +DEFINES['SQLITE_MAX_SCHEMA_RETRY'] = 25 1.47 + 1.48 +# -DSQLITE_WIN32_GETVERSIONEX=0 avoids using deprecated functions. 1.49 +# SQLite will just assume we are running on NT kinds of Windows. That's fine 1.50 +# because we don't support Win9x. 1.51 +if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': 1.52 + DEFINES['SQLITE_WIN32_GETVERSIONEX'] = 0 1.53 + 1.54 +# -DSQLITE_ENABLE_LOCKING_STYLE=1 to help with AFP folders 1.55 +if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': 1.56 + DEFINES['SQLITE_ENABLE_LOCKING_STYLE'] = 1 1.57 + 1.58 +# Turn on SQLite's assertions in debug builds. 1.59 +if CONFIG['MOZ_DEBUG']: 1.60 + DEFINES['SQLITE_DEBUG'] = 1 1.61 + 1.62 +if CONFIG['OS_TARGET'] == 'Android': 1.63 + # default to user readable only to fit Android security model 1.64 + DEFINES['SQLITE_DEFAULT_FILE_PERMISSIONS'] = '0600' 1.65 + 1.66 +# Force using malloc_usable_size when building with jemalloc because _msize 1.67 +# causes assertions on Win64. See bug 719579. 1.68 +if CONFIG['OS_ARCH'] == 'WINNT' and CONFIG['MOZ_MEMORY']: 1.69 + DEFINES['HAVE_MALLOC_USABLE_SIZE'] = True 1.70 + DEFINES['SQLITE_WITHOUT_MSIZE'] = True 1.71 + 1.72 +# disable PGO for Sun Studio 1.73 +if CONFIG['SOLARIS_SUNPRO_CC']: 1.74 + NO_PGO = True 1.75 + 1.76 +if CONFIG['OS_ARCH'] == 'WINNT': 1.77 + RCFILE = 'sqlite.rc' 1.78 + RESFILE = 'sqlite.res' 1.79 + 1.80 +# Suppress warnings in third-party code. 1.81 +if CONFIG['GNU_CC']: 1.82 + CFLAGS += [ 1.83 + '-Wno-sign-compare', 1.84 + '-Wno-type-limits', 1.85 + ]