зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1611386 - Drop support for --enable-system-sqlite. r=asuth,glandium
Differential Revision: https://phabricator.services.mozilla.com/D63177 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
6428cbe4fc
Коммит
b5b6473a6d
|
@ -138,11 +138,9 @@
|
|||
@RESPATH@/update-settings.ini
|
||||
#endif
|
||||
@RESPATH@/platform.ini
|
||||
#ifndef MOZ_SYSTEM_SQLITE
|
||||
#ifndef MOZ_FOLD_LIBS
|
||||
@BINPATH@/@DLL_PREFIX@mozsqlite3@DLL_SUFFIX@
|
||||
#endif
|
||||
#endif
|
||||
@BINPATH@/@DLL_PREFIX@lgpllibs@DLL_SUFFIX@
|
||||
#ifdef MOZ_FFVPX
|
||||
@BINPATH@/@DLL_PREFIX@mozavutil@DLL_SUFFIX@
|
||||
|
|
|
@ -245,7 +245,6 @@ def old_configure_options(*options):
|
|||
'--enable-system-cairo',
|
||||
'--enable-system-extension-dirs',
|
||||
'--enable-system-pixman',
|
||||
'--enable-system-sqlite',
|
||||
'--enable-universalchardet',
|
||||
'--enable-updater',
|
||||
'--enable-xul',
|
||||
|
|
|
@ -4,19 +4,15 @@
|
|||
# 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/.
|
||||
|
||||
if CONFIG['MOZ_SYSTEM_SQLITE']:
|
||||
DIRS += ['../../../third_party/sqlite3/src']
|
||||
if CONFIG['MOZ_FOLD_LIBS']:
|
||||
Library('sqlite')
|
||||
OS_LIBS += CONFIG['SQLITE_LIBS']
|
||||
# When folding libraries, sqlite is actually in the nss library.
|
||||
USE_LIBS += [
|
||||
'nss',
|
||||
]
|
||||
else:
|
||||
DIRS += ['../../../third_party/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'
|
||||
SharedLibrary('sqlite')
|
||||
SHARED_LIBRARY_NAME = 'mozsqlite3'
|
||||
|
||||
SYMBOLS_FILE = '/third_party/sqlite3/src/sqlite.symbols'
|
||||
SYMBOLS_FILE = '/third_party/sqlite3/src/sqlite.symbols'
|
||||
|
|
|
@ -62,7 +62,6 @@ GTK3_VERSION=3.4.0
|
|||
GDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_4
|
||||
W32API_VERSION=3.14
|
||||
DBUS_VERSION=0.60
|
||||
SQLITE_VERSION=3.31.1
|
||||
|
||||
dnl Set various checks
|
||||
dnl ========================================================
|
||||
|
@ -2132,35 +2131,11 @@ dnl =
|
|||
dnl ========================================================
|
||||
MOZ_ARG_HEADER(Individual module options)
|
||||
|
||||
dnl ========================================================
|
||||
dnl Check for sqlite
|
||||
dnl ========================================================
|
||||
|
||||
MOZ_SYSTEM_SQLITE=
|
||||
MOZ_ARG_ENABLE_BOOL(system-sqlite,
|
||||
[ --enable-system-sqlite Use system sqlite (located with pkgconfig)],
|
||||
MOZ_SYSTEM_SQLITE=1,
|
||||
MOZ_SYSTEM_SQLITE= )
|
||||
|
||||
if test -n "$MOZ_SYSTEM_SQLITE"
|
||||
then
|
||||
dnl ============================
|
||||
dnl === SQLite Version check ===
|
||||
dnl ============================
|
||||
dnl Check to see if the system SQLite package is new enough.
|
||||
PKG_CHECK_MODULES(SQLITE, sqlite3 >= $SQLITE_VERSION)
|
||||
else
|
||||
dnl ==============================
|
||||
dnl === SQLite fdatasync check ===
|
||||
dnl ==============================
|
||||
dnl Check to see if fdatasync is available
|
||||
AC_CHECK_FUNC(fdatasync)
|
||||
fi
|
||||
|
||||
if test -n "$MOZ_SYSTEM_SQLITE"; then
|
||||
AC_DEFINE(MOZ_SYSTEM_SQLITE)
|
||||
fi
|
||||
AC_SUBST(MOZ_SYSTEM_SQLITE)
|
||||
dnl ==============================
|
||||
dnl === SQLite fdatasync check ===
|
||||
dnl ==============================
|
||||
dnl Check to see if fdatasync is available and make use of it
|
||||
AC_CHECK_FUNC(fdatasync)
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Disable zipwriter
|
||||
|
|
|
@ -56,7 +56,7 @@ class SQLiteMutex : private BlockingResourceBase {
|
|||
*/
|
||||
void lock() {
|
||||
MOZ_ASSERT(mMutex, "No mutex associated with this wrapper!");
|
||||
#if defined(DEBUG) && !defined(MOZ_SYSTEM_SQLITE)
|
||||
#if defined(DEBUG)
|
||||
// While SQLite Mutexes may be recursive, in our own code we do not want to
|
||||
// treat them as such.
|
||||
CheckAcquire();
|
||||
|
@ -64,7 +64,7 @@ class SQLiteMutex : private BlockingResourceBase {
|
|||
|
||||
::sqlite3_mutex_enter(mMutex);
|
||||
|
||||
#if defined(DEBUG) && !defined(MOZ_SYSTEM_SQLITE)
|
||||
#if defined(DEBUG)
|
||||
Acquire(); // Call is protected by us holding the mutex.
|
||||
#endif
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ class SQLiteMutex : private BlockingResourceBase {
|
|||
*/
|
||||
void unlock() {
|
||||
MOZ_ASSERT(mMutex, "No mutex associated with this wrapper!");
|
||||
#if defined(DEBUG) && !defined(MOZ_SYSTEM_SQLITE)
|
||||
#if defined(DEBUG)
|
||||
// While SQLite Mutexes may be recursive, in our own code we do not want to
|
||||
// treat them as such.
|
||||
Release(); // Call is protected by us holding the mutex.
|
||||
|
|
|
@ -98,12 +98,6 @@ if CONFIG['MOZ_THUNDERBIRD'] or CONFIG['MOZ_SUITE']:
|
|||
# will need to change it here as well.
|
||||
DEFINES['SQLITE_MAX_LIKE_PATTERN_LENGTH'] = 50000
|
||||
|
||||
# See Sqlite moz.build for reasoning about TEMP_STORE.
|
||||
# For system sqlite we cannot use the compile time option, so we use a pragma.
|
||||
if CONFIG['MOZ_SYSTEM_SQLITE'] and (CONFIG['OS_TARGET'] == 'Android'
|
||||
or CONFIG['HAVE_64BIT_BUILD']):
|
||||
DEFINES['MOZ_MEMORY_TEMP_STORE_PRAGMA'] = True
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'/dom/base',
|
||||
'/third_party/sqlite3/src',
|
||||
|
|
|
@ -766,10 +766,6 @@ nsresult Connection::initializeInternal() {
|
|||
return convertResultCode(srv);
|
||||
}
|
||||
|
||||
#if defined(MOZ_MEMORY_TEMP_STORE_PRAGMA)
|
||||
(void)ExecuteSimpleSQL(NS_LITERAL_CSTRING("PRAGMA temp_store = 2;"));
|
||||
#endif
|
||||
|
||||
// Register our built-in SQL functions.
|
||||
srv = registerFunctions(mDBConn);
|
||||
if (srv != SQLITE_OK) {
|
||||
|
|
|
@ -32,8 +32,6 @@
|
|||
# undef CompareString
|
||||
#endif
|
||||
|
||||
#include "nsIPromptService.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//// Defines
|
||||
|
||||
|
@ -184,31 +182,6 @@ already_AddRefed<Service> Service::getSingleton() {
|
|||
return do_AddRef(gService);
|
||||
}
|
||||
|
||||
// Ensure that we are using the same version of SQLite that we compiled with
|
||||
// or newer. Our configure check ensures we are using a new enough version
|
||||
// at compile time.
|
||||
if (SQLITE_VERSION_NUMBER > ::sqlite3_libversion_number() ||
|
||||
!::sqlite3_compileoption_used("SQLITE_SECURE_DELETE") ||
|
||||
!::sqlite3_compileoption_used("SQLITE_THREADSAFE=1") ||
|
||||
!::sqlite3_compileoption_used("SQLITE_ENABLE_FTS3") ||
|
||||
!::sqlite3_compileoption_used("SQLITE_ENABLE_UNLOCK_NOTIFY") ||
|
||||
!::sqlite3_compileoption_used("SQLITE_ENABLE_DBSTAT_VTAB")) {
|
||||
nsCOMPtr<nsIPromptService> ps(do_GetService(NS_PROMPTSERVICE_CONTRACTID));
|
||||
if (ps) {
|
||||
nsAutoString title, message;
|
||||
title.AppendLiteral("SQLite Version Error");
|
||||
message.AppendLiteral(
|
||||
"The application has been updated, but the SQLite "
|
||||
"library wasn't updated properly and the application "
|
||||
"cannot run. Please try to launch the application again. "
|
||||
"If that should still fail, please try reinstalling "
|
||||
"it, or contact the support of where you got the "
|
||||
"application from.");
|
||||
(void)ps->Alert(nullptr, title.get(), message.get());
|
||||
}
|
||||
MOZ_CRASH("SQLite Version Error");
|
||||
}
|
||||
|
||||
// The first reference to the storage service must be obtained on the
|
||||
// main thread.
|
||||
NS_ENSURE_TRUE(NS_IsMainThread(), nullptr);
|
||||
|
|
|
@ -81,7 +81,6 @@ DEFINES['SQLITE_OMIT_DECLTYPE'] = True
|
|||
# Try to use a MEMORY temp store when possible. That allows for better
|
||||
# performance and doesn't suffer from a full separate tmp partition.
|
||||
# Exclude 32bit platforms due to address space fragmentation issues.
|
||||
# System Sqlite is managed through a PRAGMA instead.
|
||||
if CONFIG['OS_TARGET'] == 'Android':
|
||||
# On Android there's no tmp partition, so always use a MEMORY temp store.
|
||||
DEFINES['SQLITE_TEMP_STORE'] = 3
|
||||
|
@ -91,7 +90,6 @@ elif CONFIG['HAVE_64BIT_BUILD']:
|
|||
|
||||
# Change the default temp files prefix, to easily distinguish files we created
|
||||
# vs files created by other Sqlite instances in the system.
|
||||
# This has obviously no effect in case of System Sqlite.
|
||||
DEFINES['SQLITE_TEMP_FILE_PREFIX'] = '"mz_etilqs_"'
|
||||
|
||||
# Suppress warnings in third-party code.
|
||||
|
|
|
@ -36,7 +36,6 @@ sqlite3_column_text16
|
|||
sqlite3_column_type
|
||||
sqlite3_column_value
|
||||
sqlite3_commit_hook
|
||||
sqlite3_compileoption_used
|
||||
sqlite3_complete
|
||||
sqlite3_complete16
|
||||
sqlite3_config
|
||||
|
|
Загрузка…
Ссылка в новой задаче