Backed out changeset 2284c3e8c336 (bug 1215092)
[gecko.git] / storage / moz.build
blob0275017903a0c5117b87ad580518e0722dea51e8
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 DIRS += ['build']
9 TEST_DIRS += ['test']
11 XPIDL_SOURCES += [
12     'mozIStorageAggregateFunction.idl',
13     'mozIStorageAsyncConnection.idl',
14     'mozIStorageAsyncStatement.idl',
15     'mozIStorageBaseStatement.idl',
16     'mozIStorageBindingParams.idl',
17     'mozIStorageBindingParamsArray.idl',
18     'mozIStorageCompletionCallback.idl',
19     'mozIStorageConnection.idl',
20     'mozIStorageError.idl',
21     'mozIStorageFunction.idl',
22     'mozIStoragePendingStatement.idl',
23     'mozIStorageProgressHandler.idl',
24     'mozIStorageResultSet.idl',
25     'mozIStorageRow.idl',
26     'mozIStorageService.idl',
27     'mozIStorageStatement.idl',
28     'mozIStorageStatementCallback.idl',
29     'mozIStorageStatementParams.idl',
30     'mozIStorageStatementRow.idl',
31     'mozIStorageVacuumParticipant.idl',
32     'mozIStorageValueArray.idl',
35 XPIDL_MODULE = 'storage'
37 EXPORTS += [
38     'mozStorageHelper.h',
41 EXPORTS.mozilla += [
42     'storage.h',
45 # NOTE When adding something to this list, you probably need to add it to the
46 #      storage.h file too.
47 EXPORTS.mozilla.storage += [
48     'StatementCache.h',
49     'Variant.h',
50     'Variant_inl.h',
52 # SEE ABOVE NOTE!
54 UNIFIED_SOURCES += [
55     'FileSystemModule.cpp',
56     'mozStorageArgValueArray.cpp',
57     'mozStorageAsyncStatement.cpp',
58     'mozStorageAsyncStatementExecution.cpp',
59     'mozStorageAsyncStatementJSHelper.cpp',
60     'mozStorageAsyncStatementParams.cpp',
61     'mozStorageBindingParamsArray.cpp',
62     'mozStorageError.cpp',
63     'mozStoragePrivateHelpers.cpp',
64     'mozStorageResultSet.cpp',
65     'mozStorageRow.cpp',
66     'mozStorageService.cpp',
67     'mozStorageSQLFunctions.cpp',
68     'mozStorageStatement.cpp',
69     'mozStorageStatementJSHelper.cpp',
70     'mozStorageStatementParams.cpp',
71     'mozStorageStatementRow.cpp',
72     'SQLCollations.cpp',
73     'StorageBaseStatementInternal.cpp',
74     'TelemetryVFS.cpp',
75     'VacuumManager.cpp',
78 # These files need to be built separately because they #include variantToSQLiteT_impl.h.
79 SOURCES += [
80     'mozStorageBindingParams.cpp',
81     'mozStorageConnection.cpp',
84 include('/ipc/chromium/chromium-config.mozbuild')
86 FINAL_LIBRARY = 'xul'
88 # Don't use the jemalloc allocator on Android, because we can't guarantee
89 # that Gecko will configure sqlite before it is first used (bug 730495).
91 # Don't use the jemalloc allocator when using system sqlite. Linked in libraries
92 # (such as NSS) might trigger an initialization of sqlite and allocation
93 # of memory using the default allocator, prior to the storage service
94 # registering its allocator, causing memory management failures (bug 938730).
95 # However, this is not an issue if both the jemalloc allocator and the default
96 # allocator are the same thing.
98 # Note: On Windows our sqlite build assumes we use jemalloc.  If you disable
99 # MOZ_STORAGE_MEMORY on Windows, you will also need to change the "ifdef
100 # MOZ_MEMORY" options in db/sqlite3/src/Makefile.in.
101 if CONFIG['MOZ_MEMORY'] and (not CONFIG['MOZ_NATIVE_SQLITE']
102                              or CONFIG['MOZ_NATIVE_JEMALLOC']):
103     if CONFIG['OS_TARGET'] != 'Android':
104         DEFINES['MOZ_STORAGE_MEMORY'] = True
106 # This is the default value.  If we ever change it when compiling sqlite, we
107 # will need to change it here as well.
108 DEFINES['SQLITE_MAX_LIKE_PATTERN_LENGTH'] = 50000
110 LOCAL_INCLUDES += [
111     '/db/sqlite3/src',
112     '/dom/base',
115 CXXFLAGS += CONFIG['SQLITE_CFLAGS']