]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Enable finer control of optimizations when compiling with the MSVC makefile. Also...
authormistachkin <mistachkin@noemail.net>
Thu, 29 Aug 2013 01:03:38 +0000 (01:03 +0000)
committermistachkin <mistachkin@noemail.net>
Thu, 29 Aug 2013 01:03:38 +0000 (01:03 +0000)
FossilOrigin-Name: 6c709338bc77fbed24a2597eabd88dd8c29b38d7

Makefile.msc
manifest
manifest.uuid

index 23c5b17f086588be0a95c25b57453748ede69b6e..6e32eb512499aa983ea8cd97cdf654773fb27d85 100644 (file)
@@ -94,6 +94,14 @@ WIN32HEAP = 0
 DEBUG = 0
 !ENDIF
 
+# Enable use of available compiler optimizations?  Normally, this should be
+# non-zero.  Setting this to zero, thus disabling all compiler optimizations,
+# can be useful for testing.
+#
+!IFNDEF OPTIMIZATIONS
+OPTIMIZATIONS = 2
+!ENDIF
+
 # Check for the predefined command macro CC.  This should point to the compiler
 # binary for the target platform.  If it is not defined, simply define it to
 # the legacy default value 'cl.exe'.
@@ -343,11 +351,15 @@ TCLSH_CMD = tclsh85
 
 # Compiler options needed for programs that use the readline() library.
 #
+!IFNDEF READLINE_FLAGS
 READLINE_FLAGS = -DHAVE_READLINE=0
+!ENDIF
 
 # The library that programs using readline() must link against.
 #
+!IFNDEF LIBREADLINE
 LIBREADLINE =
+!ENDIF
 
 # Should the database engine be compiled threadsafe
 #
@@ -397,17 +409,30 @@ RCC = $(RCC) $(OPT_FEATURE_FLAGS)
 TCC = $(TCC) $(OPTS)
 RCC = $(RCC) $(OPTS)
 
-# If symbols are enabled, enable PDBs.
-# If debugging is enabled, disable all optimizations and enable PDBs.
+# If compiling for debugging, add some defines.
 !IF $(DEBUG)>0
-TCC = $(TCC) -Od -D_DEBUG
-BCC = $(BCC) -Od -D_DEBUG
+TCC = $(TCC) -D_DEBUG
+BCC = $(BCC) -D_DEBUG
 RCC = $(RCC) -D_DEBUG
-!ELSE
+!ENDIF
+
+# If optimizations are enabled or disabled (either implicitly or
+# explicitly), add the necessary flags.
+!IF $(DEBUG)>0 || $(OPTIMIZATIONS)==0
+TCC = $(TCC) -Od
+BCC = $(BCC) -Od
+!ELSEIF $(OPTIMIZATIONS)>=3
+TCC = $(TCC) -Ox
+BCC = $(BCC) -Ox
+!ELSEIF $(OPTIMIZATIONS)==2
 TCC = $(TCC) -O2
 BCC = $(BCC) -O2
+!ELSEIF $(OPTIMIZATIONS)==1
+TCC = $(TCC) -O1
+BCC = $(BCC) -O1
 !ENDIF
 
+# If symbols are enabled (or compiling for debugging), enable PDBs.
 !IF $(DEBUG)>0 || $(SYMBOLS)!=0
 TCC = $(TCC) -Zi
 BCC = $(BCC) -Zi
@@ -465,7 +490,9 @@ LTLIBS = $(LTLIBS) $(LIBICU)
 !ENDIF
 
 # nawk compatible awk.
+!IFNDEF NAWK
 NAWK = gawk.exe
+!ENDIF
 
 # You should not have to change anything below this line
 ###############################################################################
index 04d21005ef782ebda18600b2e68f1ba35f411198..ed0912abbb8f7de249d61fb9c84ad85409fdc695 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,9 +1,9 @@
-C Re-enable\stest\sfile\swild001.test.
-D 2013-08-28T19:01:07.361
+C Enable\sfiner\scontrol\sof\soptimizations\swhen\scompiling\swith\sthe\sMSVC\smakefile.\s\sAlso,\sseveral\smodularity\senhancements\sto\sthe\sMSVC\smakefile.
+D 2013-08-29T01:03:38.501
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 5e41da95d92656a5004b03d3576e8b226858a28e
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
-F Makefile.msc e9f41f89111627baaabd95cab4988b8d1c3e47c9
+F Makefile.msc a97163524522cd829cb91bcf900d07608e025502
 F Makefile.vxworks db21ed42a01d5740e656b16f92cb5d8d5e5dd315
 F README cd04a36fbc7ea56932a4052d7d0b7f09f27c33d6
 F VERSION a8d1f6839521130dc73c5408cdd24bcfd791df34
@@ -1108,7 +1108,7 @@ F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
 F tool/wherecosttest.c f407dc4c79786982a475261866a161cd007947ae
 F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac
-P 12d0a8859de0a9d823997cfeccc77bd572cb6d13
-R fdbadc0d00e9a87112ecfe73cb5842df
-U dan
-Z 0f1dd9ce1608f2cfacffe15f693d1885
+P 4f182ddc36944fa54f1a34c1f0527db0ebb39c96
+R d44711613e434eea3b5489989b8c56f0
+U mistachkin
+Z 6c7751f0648dc6c9f1495284f8906a9f
index 759b43a61066d0e27859e2e52b721cb00c5c4339..7f638abd90b0760a5e822394a042c7939efcb715 100644 (file)
@@ -1 +1 @@
-4f182ddc36944fa54f1a34c1f0527db0ebb39c96
\ No newline at end of file
+6c709338bc77fbed24a2597eabd88dd8c29b38d7
\ No newline at end of file