Skip to content

Commit

Permalink
[sqlite] Pull SQLite build defines into library target.
Browse files Browse the repository at this point in the history
Move some defines from the 'sqlite' target (which doesn't always build
SQLite core) to 'chromium_sqlite' (which is the build of SQLite core).

BUG=none

Review URL: https://codereview.chromium.org/1745213002

Cr-Commit-Position: refs/heads/master@{#378363}
  • Loading branch information
dshess authored and Commit bot committed Mar 1, 2016
1 parent 41baf71 commit 59b5b4b
Showing 1 changed file with 34 additions and 34 deletions.
68 changes: 34 additions & 34 deletions third_party/sqlite/sqlite.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -56,40 +56,6 @@
{
'target_name': 'sqlite',
'conditions': [
[ 'chromeos==1' , {
'defines': [
# Despite obvious warnings about not using this flag in deployment,
# we are turning off sync in ChromeOS and relying on the underlying
# journaling filesystem to do error recovery properly. It's much
# faster.
'SQLITE_NO_SYNC',
],
}],
['os_posix == 1', {
'defines': [
# Allow xSleep() call on Unix to use usleep() rather than sleep().
# Microsecond precision is better than second precision. Should
# only affect contended databases via the busy callback. Browser
# profile databases are mostly exclusive, but renderer databases may
# allow for contention.
'HAVE_USLEEP=1',
# Use pread/pwrite directly rather than emulating them.
'USE_PREAD=1',
],
}],
['OS == "linux" or OS == "android"', {
'defines': [
# Linux provides fdatasync(), a faster equivalent of fsync().
'fdatasync=fdatasync',
],
}],
# Pull in config.h on Linux. This allows use of preprocessor macros
# which are not available to the build config.
['OS == "linux"', {
'defines': [
'_HAVE_SQLITE_CONFIG_H',
],
}],
['use_system_sqlite', {
'type': 'none',
'direct_dependent_settings': {
Expand Down Expand Up @@ -171,6 +137,40 @@
['OS != "win" and component == "shared_library"', {
'defines': ['SQLITE_API=__attribute__((visibility("default")))'],
}],
[ 'chromeos==1' , {
'defines': [
# Despite obvious warnings about not using this flag in
# deployment, we are turning off sync in ChromeOS and relying on
# the underlying journaling filesystem to do error recovery
# properly. It's much faster.
'SQLITE_NO_SYNC',
],
}],
['os_posix == 1', {
'defines': [
# Allow xSleep() call on Unix to use usleep() rather than
# sleep(). Microsecond precision is better than second
# precision. Should only affect contended databases via the
# busy callback. Browser profile databases are mostly
# exclusive, but renderer databases may allow for contention.
'HAVE_USLEEP=1',
# Use pread/pwrite directly rather than emulating them.
'USE_PREAD=1',
],
}],
# Pull in config.h on Linux. This allows use of preprocessor macros
# which are not available to the build config.
['OS == "linux"', {
'defines': [
'_HAVE_SQLITE_CONFIG_H',
],
}],
['OS == "linux" or OS == "android"', {
'defines': [
# Linux provides fdatasync(), a faster equivalent of fsync().
'fdatasync=fdatasync',
],
}],
['OS=="linux"', {
'link_settings': {
'libraries': [
Expand Down

0 comments on commit 59b5b4b

Please sign in to comment.