Skip to content

Commit 03c78ec

Browse files
maxgolovHiroshi Nagata
authored andcommitted
1 parent 0bbfc50 commit 03c78ec

9 files changed

Lines changed: 137150 additions & 87138 deletions

File tree

sqlite/Makefile.msc

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ API_ARMOR = 0
7373
!IFNDEF NO_WARN
7474
!IF $(USE_FULLWARN)!=0
7575
NO_WARN = -wd4054 -wd4055 -wd4100 -wd4127 -wd4130 -wd4152 -wd4189 -wd4206
76-
NO_WARN = $(NO_WARN) -wd4210 -wd4232 -wd4305 -wd4306 -wd4702 -wd4706
76+
NO_WARN = $(NO_WARN) -wd4210 -wd4232 -wd4244 -wd4305 -wd4306 -wd4702 -wd4706
7777
!ENDIF
7878
!ENDIF
7979

@@ -196,6 +196,7 @@ OSTRACE = 0
196196
DEBUG = 0
197197
!ENDIF
198198

199+
199200
# Enable use of available compiler optimizations? Normally, this should be
200201
# non-zero. Setting this to zero, thus disabling all compiler optimizations,
201202
# can be useful for testing.
@@ -210,6 +211,12 @@ OPTIMIZATIONS = 2
210211
SESSION = 0
211212
!ENDIF
212213

214+
# Set this to non-0 to enable support for the rbu extension.
215+
#
216+
!IFNDEF RBU
217+
RBU = 0
218+
!ENDIF
219+
213220
# Set the source code file to be used by executables and libraries when
214221
# they need the amalgamation.
215222
#
@@ -277,6 +284,13 @@ SQLITE3EXEPDB = /pdb:sqlite3sh.pdb
277284
!IF $(MINIMAL_AMALGAMATION)==0
278285
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS3=1
279286
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RTREE=1
287+
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_GEOPOLY=1
288+
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_JSON1=1
289+
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_STMTVTAB=1
290+
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DBPAGE_VTAB=1
291+
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DBSTAT_VTAB=1
292+
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_BYTECODE_VTAB=1
293+
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DESERIALIZE=1
280294
!ENDIF
281295
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1
282296
!ENDIF
@@ -289,6 +303,13 @@ OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_SESSION=1
289303
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_PREUPDATE_HOOK=1
290304
!ENDIF
291305

306+
# Should the rbu extension be enabled? If so, add compilation options
307+
# to enable it.
308+
#
309+
!IF $(RBU)!=0
310+
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RBU=1
311+
!ENDIF
312+
292313
# These are the "extended" SQLite compilation options used when compiling for
293314
# the Windows 10 platform.
294315
#
@@ -426,9 +447,9 @@ UCRTLIBPATH = $(UCRTLIBPATH:\\=\)
426447
# will run on the platform that is doing the build.
427448
#
428449
!IF $(USE_FULLWARN)!=0
429-
BCC = $(NCC) -nologo -W4 $(CCOPTS) $(BCCOPTS)
450+
BCC = $(NCC) -nologo -W4 -Fd$*.pdb $(CCOPTS) $(BCCOPTS)
430451
!ELSE
431-
BCC = $(NCC) -nologo -W3 $(CCOPTS) $(BCCOPTS)
452+
BCC = $(NCC) -nologo -W3 -Fd$*.pdb $(CCOPTS) $(BCCOPTS)
432453
!ENDIF
433454

434455
# Check if assembly code listings should be generated for the source
@@ -801,7 +822,7 @@ BCC = $(BCC) -Zi
801822
# Command line prefixes for compiling code, compiling resources,
802823
# linking, etc.
803824
#
804-
LTCOMPILE = $(TCC) -Fo$@
825+
LTCOMPILE = $(TCC) -Fo$@ -Fd$*.pdb
805826
LTRCOMPILE = $(RCC) -r
806827
LTLIB = lib.exe
807828
LTLINK = $(TCC) -Fe$@
@@ -819,6 +840,11 @@ LTLIBS = $(LTLIBS) rpcrt4.lib
819840
!IFDEF PLATFORM
820841
LTLINKOPTS = /NOLOGO /MACHINE:$(PLATFORM)
821842
LTLIBOPTS = /NOLOGO /MACHINE:$(PLATFORM)
843+
!ELSEIF "$(VISUALSTUDIOVERSION)"=="12.0" || \
844+
"$(VISUALSTUDIOVERSION)"=="14.0" || \
845+
"$(VISUALSTUDIOVERSION)"=="15.0"
846+
LTLINKOPTS = /NOLOGO /MACHINE:x86
847+
LTLIBOPTS = /NOLOGO /MACHINE:x86
822848
!ELSE
823849
LTLINKOPTS = /NOLOGO
824850
LTLIBOPTS = /NOLOGO
@@ -928,10 +954,10 @@ LIBRESOBJS =
928954
# when the shell is not being dynamically linked.
929955
#
930956
!IF $(DYNAMIC_SHELL)==0 && $(FOR_WIN10)==0
931-
SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_STMTVTAB
932-
SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB
933-
SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_INTROSPECTION_PRAGMAS
934-
SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_RTREE
957+
SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_FTS4=1
958+
SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS=1
959+
SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_OFFSET_SQL_FUNC=1
960+
SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_DESERIALIZE=1
935961
!ENDIF
936962

937963

@@ -966,7 +992,7 @@ Replace.exe:
966992
sqlite3.def: Replace.exe $(LIBOBJ)
967993
echo EXPORTS > sqlite3.def
968994
dumpbin /all $(LIBOBJ) \
969-
| .\Replace.exe "^\s+/EXPORT:_?(sqlite3(?:session|changeset|changegroup)?_[^@,]*)(?:@\d+|,DATA)?$$" $$1 true \
995+
| .\Replace.exe "^\s+/EXPORT:_?(sqlite3(?:session|changeset|changegroup|rebaser|rbu)?_[^@,]*)(?:@\d+|,DATA)?$$" $$1 true \
970996
| sort >> sqlite3.def
971997

972998
$(SQLITE3EXE): shell.c $(SHELL_CORE_DEP) $(LIBRESOBJS) $(SHELL_CORE_SRC) $(SQLITE3H)

sqlite/msvc.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,9 @@
3333
#pragma warning(disable : 4706)
3434
#endif /* defined(_MSC_VER) */
3535

36+
#if defined(_MSC_VER) && !defined(_WIN64)
37+
#undef SQLITE_4_BYTE_ALIGNED_MALLOC
38+
#define SQLITE_4_BYTE_ALIGNED_MALLOC
39+
#endif /* defined(_MSC_VER) && !defined(_WIN64) */
40+
3641
#endif /* SQLITE_MSVC_H */

0 commit comments

Comments
 (0)