Unfold sqlite3 from nss.
parent
d64f5c84a3
commit
2711cada39
|
@ -125,10 +125,8 @@
|
||||||
#endif
|
#endif
|
||||||
@RESPATH@/platform.ini
|
@RESPATH@/platform.ini
|
||||||
#ifndef MOZ_SYSTEM_SQLITE
|
#ifndef MOZ_SYSTEM_SQLITE
|
||||||
#ifndef MOZ_FOLD_LIBS
|
|
||||||
@BINPATH@/@DLL_PREFIX@mozsqlite3@DLL_SUFFIX@
|
@BINPATH@/@DLL_PREFIX@mozsqlite3@DLL_SUFFIX@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
@BINPATH@/@DLL_PREFIX@lgpllibs@DLL_SUFFIX@
|
@BINPATH@/@DLL_PREFIX@lgpllibs@DLL_SUFFIX@
|
||||||
#ifdef MOZ_FFVPX
|
#ifdef MOZ_FFVPX
|
||||||
@BINPATH@/@DLL_PREFIX@mozavutil@DLL_SUFFIX@
|
@BINPATH@/@DLL_PREFIX@mozavutil@DLL_SUFFIX@
|
||||||
|
|
|
@ -87,11 +87,6 @@ MOZ_CHROME_FILE_FORMAT=omni
|
||||||
# Set the default top-level extensions
|
# Set the default top-level extensions
|
||||||
MOZ_EXTENSIONS_DEFAULT=" gio"
|
MOZ_EXTENSIONS_DEFAULT=" gio"
|
||||||
|
|
||||||
# Fold Libs
|
|
||||||
if test "$OS_TARGET" = "WINNT" -o "$OS_TARGET" = "Darwin"; then
|
|
||||||
MOZ_FOLD_LIBS=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Include bundled fonts
|
# Include bundled fonts
|
||||||
if test "$OS_ARCH" = "WINNT" -o \
|
if test "$OS_ARCH" = "WINNT" -o \
|
||||||
"$OS_ARCH" = "Linux"; then
|
"$OS_ARCH" = "Linux"; then
|
||||||
|
|
|
@ -126,10 +126,8 @@
|
||||||
#endif
|
#endif
|
||||||
@RESPATH@/platform.ini
|
@RESPATH@/platform.ini
|
||||||
#ifndef MOZ_SYSTEM_SQLITE
|
#ifndef MOZ_SYSTEM_SQLITE
|
||||||
#ifndef MOZ_FOLD_LIBS
|
|
||||||
@BINPATH@/@DLL_PREFIX@mozsqlite3@DLL_SUFFIX@
|
@BINPATH@/@DLL_PREFIX@mozsqlite3@DLL_SUFFIX@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
@BINPATH@/@DLL_PREFIX@lgpllibs@DLL_SUFFIX@
|
@BINPATH@/@DLL_PREFIX@lgpllibs@DLL_SUFFIX@
|
||||||
#ifdef MOZ_FFVPX
|
#ifdef MOZ_FFVPX
|
||||||
@BINPATH@/@DLL_PREFIX@mozavutil@DLL_SUFFIX@
|
@BINPATH@/@DLL_PREFIX@mozavutil@DLL_SUFFIX@
|
||||||
|
|
|
@ -6,10 +6,8 @@
|
||||||
|
|
||||||
external_dirs = []
|
external_dirs = []
|
||||||
|
|
||||||
DIRS += [
|
DIRS += ['lgpllibs']
|
||||||
'lgpllibs',
|
|
||||||
'sqlite',
|
|
||||||
]
|
|
||||||
if not CONFIG['MOZ_SYSTEM_JPEG']:
|
if not CONFIG['MOZ_SYSTEM_JPEG']:
|
||||||
external_dirs += ['media/libjpeg']
|
external_dirs += ['media/libjpeg']
|
||||||
|
|
||||||
|
|
|
@ -119,12 +119,8 @@ DEFAULT_GMAKE_FLAGS += NSS_ENABLE_TLS_1_3=1
|
||||||
ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_1)
|
ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_1)
|
||||||
DEFAULT_GMAKE_FLAGS += OS_DLLFLAGS='-static-libgcc' NSPR31_LIB_PREFIX=lib
|
DEFAULT_GMAKE_FLAGS += OS_DLLFLAGS='-static-libgcc' NSPR31_LIB_PREFIX=lib
|
||||||
endif
|
endif
|
||||||
ifdef MOZ_FOLD_LIBS
|
|
||||||
DEFAULT_GMAKE_FLAGS += SQLITE_LIB_NAME=nss3
|
|
||||||
else
|
|
||||||
DEFAULT_GMAKE_FLAGS += SQLITE_LIB_NAME=mozsqlite3
|
DEFAULT_GMAKE_FLAGS += SQLITE_LIB_NAME=mozsqlite3
|
||||||
DEFAULT_GMAKE_FLAGS += SQLITE_LIB_DIR=$(ABS_DIST)/../config/external/sqlite
|
DEFAULT_GMAKE_FLAGS += SQLITE_LIB_DIR=$(ABS_DIST)/../db/sqlite3/src
|
||||||
endif # MOZ_FOLD_LIBS
|
|
||||||
DEFAULT_GMAKE_FLAGS += SQLITE_INCLUDE_DIR=$(ABS_DIST)/include
|
DEFAULT_GMAKE_FLAGS += SQLITE_INCLUDE_DIR=$(ABS_DIST)/include
|
||||||
ifdef NSS_DISABLE_DBM
|
ifdef NSS_DISABLE_DBM
|
||||||
DEFAULT_GMAKE_FLAGS += NSS_DISABLE_DBM=1
|
DEFAULT_GMAKE_FLAGS += NSS_DISABLE_DBM=1
|
||||||
|
|
|
@ -29,9 +29,10 @@ else:
|
||||||
'/security/nss/lib/smime/smime3',
|
'/security/nss/lib/smime/smime3',
|
||||||
'/security/nss/lib/ssl/ssl3',
|
'/security/nss/lib/ssl/ssl3',
|
||||||
'/security/nss/lib/util/nssutil3',
|
'/security/nss/lib/util/nssutil3',
|
||||||
'sqlite',
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
USE_LIBS += ['sqlite']
|
||||||
|
|
||||||
# XXX: We should fix these warnings.
|
# XXX: We should fix these warnings.
|
||||||
ALLOW_COMPILER_WARNINGS = True
|
ALLOW_COMPILER_WARNINGS = True
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
PR_*
|
PR_*
|
||||||
PL_*
|
PL_*
|
||||||
#endif
|
#endif
|
||||||
#include ../../../db/sqlite3/src/sqlite.symbols
|
|
||||||
ATOB_AsciiToData
|
ATOB_AsciiToData
|
||||||
ATOB_AsciiToData_Util
|
ATOB_AsciiToData_Util
|
||||||
ATOB_ConvertAsciiToItem
|
ATOB_ConvertAsciiToItem
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
|
||||||
# vim: set filetype=python:
|
|
||||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
||||||
|
|
||||||
DIRS += ['../../../db/sqlite3/src']
|
|
||||||
if CONFIG['MOZ_FOLD_LIBS']:
|
|
||||||
Library('sqlite')
|
|
||||||
# When folding libraries, sqlite is actually in the nss library.
|
|
||||||
USE_LIBS += [
|
|
||||||
'nss',
|
|
||||||
]
|
|
||||||
else:
|
|
||||||
SharedLibrary('sqlite')
|
|
||||||
SHARED_LIBRARY_NAME = 'mozsqlite3'
|
|
||||||
|
|
||||||
SYMBOLS_FILE = '/db/sqlite3/src/sqlite.symbols'
|
|
|
@ -3,25 +3,18 @@
|
||||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
NO_VISIBILITY_FLAGS = True
|
|
||||||
|
|
||||||
EXPORTS += [
|
NO_VISIBILITY_FLAGS = True
|
||||||
'sqlite3.h',
|
|
||||||
]
|
|
||||||
|
|
||||||
# We allow warnings for third-party code that can be updated from upstream.
|
# We allow warnings for third-party code that can be updated from upstream.
|
||||||
ALLOW_COMPILER_WARNINGS = True
|
ALLOW_COMPILER_WARNINGS = True
|
||||||
|
|
||||||
if CONFIG['MOZ_FOLD_LIBS']:
|
GeckoSharedLibrary('sqlite', linkage=None, mozglue='library')
|
||||||
# When folding libraries, sqlite is actually in the nss library.
|
SHARED_LIBRARY_NAME = 'mozsqlite3'
|
||||||
FINAL_LIBRARY = 'nss'
|
SYMBOLS_FILE = 'sqlite.symbols'
|
||||||
else:
|
|
||||||
# The final library is in config/external/sqlite
|
|
||||||
FINAL_LIBRARY = 'sqlite'
|
|
||||||
|
|
||||||
SOURCES += [
|
EXPORTS += ['sqlite3.h']
|
||||||
'sqlite3.c',
|
SOURCES += ['sqlite3.c']
|
||||||
]
|
|
||||||
|
|
||||||
# -DSQLITE_SECURE_DELETE=1 will cause SQLITE to 0-fill delete data so we
|
# -DSQLITE_SECURE_DELETE=1 will cause SQLITE to 0-fill delete data so we
|
||||||
# don't have to vacuum to make sure the data is not visible in the file.
|
# don't have to vacuum to make sure the data is not visible in the file.
|
||||||
|
@ -34,8 +27,11 @@ SOURCES += [
|
||||||
# hidden preference. If that preference is missing or invalid then this value
|
# hidden preference. If that preference is missing or invalid then this value
|
||||||
# will be used.
|
# will be used.
|
||||||
# Note: Be sure to update the configure.in checks when these change!
|
# Note: Be sure to update the configure.in checks when these change!
|
||||||
for var in ('SQLITE_SECURE_DELETE', 'SQLITE_THREADSAFE', 'SQLITE_CORE',
|
for var in ('SQLITE_SECURE_DELETE',
|
||||||
'SQLITE_ENABLE_FTS3', 'SQLITE_ENABLE_UNLOCK_NOTIFY',
|
'SQLITE_THREADSAFE',
|
||||||
|
'SQLITE_CORE',
|
||||||
|
'SQLITE_ENABLE_FTS3',
|
||||||
|
'SQLITE_ENABLE_UNLOCK_NOTIFY',
|
||||||
'SQLITE_ENABLE_DBSTAT_VTAB'):
|
'SQLITE_ENABLE_DBSTAT_VTAB'):
|
||||||
DEFINES[var] = 1
|
DEFINES[var] = 1
|
||||||
|
|
||||||
|
|
|
@ -1048,22 +1048,11 @@ bool DefineOSFileConstants(JSContext *cx, JS::Handle<JSObject*> global)
|
||||||
}
|
}
|
||||||
#endif // defined(XP_MACOSX)
|
#endif // defined(XP_MACOSX)
|
||||||
|
|
||||||
// sqlite3 is linked from different places depending on the platform
|
// sqlite3 is always a shared lib
|
||||||
nsAutoString libsqlite3;
|
nsAutoString libsqlite3;
|
||||||
#if defined(ANDROID)
|
|
||||||
// On Android, we use the system's libsqlite3
|
|
||||||
libsqlite3.AppendLiteral(DLL_PREFIX);
|
libsqlite3.AppendLiteral(DLL_PREFIX);
|
||||||
libsqlite3.AppendLiteral("sqlite3");
|
libsqlite3.AppendLiteral("mozsqlite3");
|
||||||
libsqlite3.AppendLiteral(DLL_SUFFIX);
|
libsqlite3.AppendLiteral(DLL_SUFFIX);
|
||||||
#elif defined(XP_WIN)
|
|
||||||
// On Windows, for some reason, this is part of nss3.dll
|
|
||||||
libsqlite3.AppendLiteral(DLL_PREFIX);
|
|
||||||
libsqlite3.AppendLiteral("nss3");
|
|
||||||
libsqlite3.AppendLiteral(DLL_SUFFIX);
|
|
||||||
#else
|
|
||||||
// On other platforms, we link sqlite3 into libxul
|
|
||||||
libsqlite3 = libxul;
|
|
||||||
#endif // defined(ANDROID) || defined(XP_WIN)
|
|
||||||
|
|
||||||
if (!SetStringProperty(cx, objPath, "libsqlite3", libsqlite3)) {
|
if (!SetStringProperty(cx, objPath, "libsqlite3", libsqlite3)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -69,6 +69,9 @@ if not CONFIG['MOZ_DISABLE_PLATFORM']:
|
||||||
if CONFIG['COMPILE_ENVIRONMENT']:
|
if CONFIG['COMPILE_ENVIRONMENT']:
|
||||||
|
|
||||||
if not CONFIG['JS_STANDALONE']:
|
if not CONFIG['JS_STANDALONE']:
|
||||||
|
# Hopefully build sqlite before nss
|
||||||
|
DIRS += ['db/sqlite3/src']
|
||||||
|
|
||||||
DIRS += [
|
DIRS += [
|
||||||
'config/external',
|
'config/external',
|
||||||
'config/external/nss',
|
'config/external/nss',
|
||||||
|
|
Loading…
Reference in New Issue