forked from swiftlyfalling/SQLiteLib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SQLiteLib.xcconfig
executable file
·97 lines (85 loc) · 4.44 KB
/
SQLiteLib.xcconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
//
// NOTE: DO NOT EDIT THIS FILE!
// To specify additional custom SQLite compilation options, edit "SQLiteLib-USER.xcconfig"
//
CUSTOM_SQLLIBRARY_CFLAGS = // do not modify - use "SQLiteLib-USER.xcconfig"
#include "SQLiteLib-USER.xcconfig"
// SQLiteLib targets OS X 10.9
MACOSX_DEPLOYMENT_TARGET = 10.9
// SQLiteLib targets iOS 8.0
IPHONEOS_DEPLOYMENT_TARGET = 8.0
// Supported platforms
SUPPORTED_PLATFORMS = iphonesimulator macosx iphoneos appletvsimulator appletvos watchsimulator watchos
// Compilation options used by stock sqlite3 shipped with Apple operating systems
//
// Mac OSX 10.11.5:
// ENABLE_API_ARMOR
// ENABLE_FTS3
// ENABLE_FTS3_PARENTHESIS
// ENABLE_LOCKING_STYLE=1
// ENABLE_RTREE
// ENABLE_UPDATE_DELETE_LIMIT
// OMIT_AUTORESET
// OMIT_BUILTIN_TEST
// OMIT_LOAD_EXTENSION
// SYSTEM_MALLOC
// THREADSAFE=2
// iOS 9.3.2:
// ENABLE_API_ARMOR
// ENABLE_FTS3
// ENABLE_FTS3_PARENTHESIS
// ENABLE_LOCKING_STYLE=1
// ENABLE_RTREE
// ENABLE_UPDATE_DELETE_LIMIT
// MAX_MMAP_SIZE=0
// OMIT_AUTORESET
// OMIT_BUILTIN_TEST
// OMIT_LOAD_EXTENSION
// SYSTEM_MALLOC
// THREADSAFE=2
// IMPORTANT:
// The system SQLite library is compiled with SQLITE_ENABLE_LOCKING_STYLE=1 on both OSX 10.11 & iOS 9.0.
// However, the SQLite code (verified in: 3.13.0) uses a deprecated function on iOS (gethostuuid()).
//
// D. Richard Hipp (SQLite architect), suggests working around this on iOS using -DSQLITE_ENABLE_LOCKING_STYLE=0
// "The SQLITE_ENABLE_LOCKING_STYLE thing is an apple-only extension that
// boosts performance when SQLite is used on a network filesystem. This
// is important on MacOS because some users think it is a good idea to
// put their home directory on a network filesystem.
//
// I'm guessing this is not really a factor on iOS."
// Source: https://groups.google.com/forum/#!topic/sqlite-dev/7yjGulq3LmY
// Via: https://github.com/clemensg/sqlite3pod/issues/1
//
// Thus, SQLITE_ENABLE_LOCKING_STYLE=1 is used on OSX,
// and SQLITE_ENABLE_LOCKING_STYLE=0 on iOS/tvOS/watchOS.
//
// (Note: This doesn't get rid of the warning that "gethostuuid() is disabled" (as of 3.13.0). Uncomment the lines below to do so.)
//
// ↓ UNCOMMENT THE LINES BELOW to remove "gethostuuid() is disabled" warning on iOS/tvOS/watchOS.
WARNING_CFLAGS[sdk=iphoneos*] = -Wno-#warnings
WARNING_CFLAGS[sdk=iphonesimulator*] = -Wno-#warnings
WARNING_CFLAGS[sdk=appletvos*] = -Wno-#warnings
WARNING_CFLAGS[sdk=appletvsimulator*] = -Wno-#warnings
WARNING_CFLAGS[sdk=watchos*] = -Wno-#warnings
WARNING_CFLAGS[sdk=watchsimulator*] = -Wno-#warnings
// ↑ UNCOMMENT THE LINES ABOVE to remove "gethostuuid() is disabled" warning on iOS/tvOS/watchOS.
// The common set of compilation options (on OSX and iOS).
// NOTE: To add more compilation options, see SQLiteLib-USER.xcconfig.
SQLLIBRARY_BASE_CFLAGS = -DSQLITE_ENABLE_API_ARMOR -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT -DSQLITE_OMIT_AUTORESET -DSQLITE_OMIT_BUILTIN_TEST -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_SYSTEM_MALLOC -DSQLITE_THREADSAFE=2 -DSQLITE_OS_UNIX=1 $(CUSTOM_SQLLIBRARY_CFLAGS)
SQLLIBRARY_OSX_ADDITIONAL_CFLAGS = -DSQLITE_ENABLE_LOCKING_STYLE=1
SQLLIBRARY_IOS_ADDITIONAL_CFLAGS = -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_MAX_MMAP_SIZE=0
SQLLIBRARY_RELEASE_CFLAGS = -DNDEBUG
SQLLIBRARY_ARMV6_CFLAGS = -mno-thumb
SQLLIBRARY_CFLAGS = $(SQLLIBRARY_BASE_CFLAGS)
SQLLIBRARY_CFLAGS[sdk=iphoneos*] = $(SQLLIBRARY_BASE_CFLAGS) $(SQLLIBRARY_IOS_ADDITIONAL_CFLAGS)
SQLLIBRARY_CFLAGS[sdk=iphonesimulator*] = $(SQLLIBRARY_BASE_CFLAGS) $(SQLLIBRARY_IOS_ADDITIONAL_CFLAGS)
SQLLIBRARY_CFLAGS[sdk=appletvos*] = $(SQLLIBRARY_BASE_CFLAGS) $(SQLLIBRARY_IOS_ADDITIONAL_CFLAGS)
SQLLIBRARY_CFLAGS[sdk=appletvsimulator*] = $(SQLLIBRARY_BASE_CFLAGS) $(SQLLIBRARY_IOS_ADDITIONAL_CFLAGS)
SQLLIBRARY_CFLAGS[sdk=watchos*] = $(SQLLIBRARY_BASE_CFLAGS) $(SQLLIBRARY_IOS_ADDITIONAL_CFLAGS)
SQLLIBRARY_CFLAGS[sdk=watchsimulator*] = $(SQLLIBRARY_BASE_CFLAGS) $(SQLLIBRARY_IOS_ADDITIONAL_CFLAGS)
SQLLIBRARY_CFLAGS[sdk=macosx*] = $(SQLLIBRARY_BASE_CFLAGS) $(SQLLIBRARY_OSX_ADDITIONAL_CFLAGS)
OTHER_CFLAGS = $(SQLLIBRARY_CFLAGS)
OTHER_CFLAGS[arch=armv6] = $(SQLLIBRARY_ARMV6_CFLAGS) $(SQLLIBRARY_CFLAGS)
OTHER_CFLAGS[config=Release] = $(SQLLIBRARY_CFLAGS) $(SQLLIBRARY_RELEASE_CFLAGS)
OTHER_CFLAGS[config=Release][arch=armv6] = $(SQLLIBRARY_ARMV6_CFLAGS) $(SQLLIBRARY_CFLAGS) $(SQLLIBRARY_RELEASE_CFLAGS)