/ Check-in [6c709338]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Enable finer control of optimizations when compiling with the MSVC makefile. Also, several modularity enhancements to the MSVC makefile.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6c709338bc77fbed24a2597eabd88dd8c29b38d7
User & Date: mistachkin 2013-08-29 01:03:38
Context
2013-08-29
01:09
Small enhancements to unit testing infrastructure. check-in: 9229aeb3 user: mistachkin tags: trunk
01:03
Enable finer control of optimizations when compiling with the MSVC makefile. Also, several modularity enhancements to the MSVC makefile. check-in: 6c709338 user: mistachkin tags: trunk
2013-08-28
19:01
Re-enable test file wild001.test. check-in: 4f182ddc user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Makefile.msc.

    89     89   # 3 == SQLITE_WIN32_MALLOC_VALIDATE: Validate the Win32 native heap per call.
    90     90   # 4 == SQLITE_DEBUG_OS_TRACE: Enables output from the OSTRACE() macros.
    91     91   # 5 == SQLITE_ENABLE_IOTRACE: Enables output from the IOTRACE() macros.
    92     92   #
    93     93   !IFNDEF DEBUG
    94     94   DEBUG = 0
    95     95   !ENDIF
           96  +
           97  +# Enable use of available compiler optimizations?  Normally, this should be
           98  +# non-zero.  Setting this to zero, thus disabling all compiler optimizations,
           99  +# can be useful for testing.
          100  +#
          101  +!IFNDEF OPTIMIZATIONS
          102  +OPTIMIZATIONS = 2
          103  +!ENDIF
    96    104   
    97    105   # Check for the predefined command macro CC.  This should point to the compiler
    98    106   # binary for the target platform.  If it is not defined, simply define it to
    99    107   # the legacy default value 'cl.exe'.
   100    108   #
   101    109   !IFNDEF CC
   102    110   CC = cl.exe
................................................................................
   339    347   #
   340    348   !IFNDEF TCLSH_CMD
   341    349   TCLSH_CMD = tclsh85
   342    350   !ENDIF
   343    351   
   344    352   # Compiler options needed for programs that use the readline() library.
   345    353   #
          354  +!IFNDEF READLINE_FLAGS
   346    355   READLINE_FLAGS = -DHAVE_READLINE=0
          356  +!ENDIF
   347    357   
   348    358   # The library that programs using readline() must link against.
   349    359   #
          360  +!IFNDEF LIBREADLINE
   350    361   LIBREADLINE =
          362  +!ENDIF
   351    363   
   352    364   # Should the database engine be compiled threadsafe
   353    365   #
   354    366   TCC = $(TCC) -DSQLITE_THREADSAFE=1
   355    367   RCC = $(RCC) -DSQLITE_THREADSAFE=1
   356    368   
   357    369   # Do threads override each others locks by default (1), or do we test (-1)
................................................................................
   393    405   RCC = $(RCC) $(OPT_FEATURE_FLAGS)
   394    406   
   395    407   # Add in any optional parameters specified on the make commane line
   396    408   # ie.  make "OPTS=-DSQLITE_ENABLE_FOO=1 -DSQLITE_OMIT_FOO=1".
   397    409   TCC = $(TCC) $(OPTS)
   398    410   RCC = $(RCC) $(OPTS)
   399    411   
   400         -# If symbols are enabled, enable PDBs.
   401         -# If debugging is enabled, disable all optimizations and enable PDBs.
          412  +# If compiling for debugging, add some defines.
   402    413   !IF $(DEBUG)>0
   403         -TCC = $(TCC) -Od -D_DEBUG
   404         -BCC = $(BCC) -Od -D_DEBUG
          414  +TCC = $(TCC) -D_DEBUG
          415  +BCC = $(BCC) -D_DEBUG
   405    416   RCC = $(RCC) -D_DEBUG
   406         -!ELSE
          417  +!ENDIF
          418  +
          419  +# If optimizations are enabled or disabled (either implicitly or
          420  +# explicitly), add the necessary flags.
          421  +!IF $(DEBUG)>0 || $(OPTIMIZATIONS)==0
          422  +TCC = $(TCC) -Od
          423  +BCC = $(BCC) -Od
          424  +!ELSEIF $(OPTIMIZATIONS)>=3
          425  +TCC = $(TCC) -Ox
          426  +BCC = $(BCC) -Ox
          427  +!ELSEIF $(OPTIMIZATIONS)==2
   407    428   TCC = $(TCC) -O2
   408    429   BCC = $(BCC) -O2
          430  +!ELSEIF $(OPTIMIZATIONS)==1
          431  +TCC = $(TCC) -O1
          432  +BCC = $(BCC) -O1
   409    433   !ENDIF
   410    434   
          435  +# If symbols are enabled (or compiling for debugging), enable PDBs.
   411    436   !IF $(DEBUG)>0 || $(SYMBOLS)!=0
   412    437   TCC = $(TCC) -Zi
   413    438   BCC = $(BCC) -Zi
   414    439   !ENDIF
   415    440   
   416    441   # If ICU support is enabled, add the compiler options for it.
   417    442   !IF $(USE_ICU)!=0
................................................................................
   461    486   # If ICU support is enabled, add the linker options for it.
   462    487   !IF $(USE_ICU)!=0
   463    488   LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:$(ICULIBDIR)
   464    489   LTLIBS = $(LTLIBS) $(LIBICU)
   465    490   !ENDIF
   466    491   
   467    492   # nawk compatible awk.
          493  +!IFNDEF NAWK
   468    494   NAWK = gawk.exe
          495  +!ENDIF
   469    496   
   470    497   # You should not have to change anything below this line
   471    498   ###############################################################################
   472    499   
   473    500   # Object files for the SQLite library (non-amalgamation).
   474    501   #
   475    502   LIBOBJS0 = vdbe.lo parse.lo alter.lo analyze.lo attach.lo auth.lo \