@@ -28,14 +28,18 @@ CPLUS = cl /nologo
2828LINK_FLAGS = /link /nologo
2929LIB_LINK_FLAGS = /link /nologo /DLL /MAP /DEBUG /fixed :no /INCREMENTAL :NO /DYNAMICBASE /NXCOMPAT
3030
31+ ifneq (, $(stdver ))
32+ CXX_STD_FLAGS = /std :$(stdver ) /D_TBB_CPP0X
33+ endif
34+
3135ifeq ($(arch ), ia32 )
32- LIB_LINK_FLAGS += /SAFESEH
36+ LIB_LINK_FLAGS += /SAFESEH
3337endif
3438
3539ifeq ($(runtime ), vc_mt )
36- MS_CRT_KEY = /MT $(if $(findstring debug , $(cfg )), d )
40+ MS_CRT_KEY = /MT $(if $(findstring debug , $(cfg )), d )
3741else
38- MS_CRT_KEY = /MD $(if $(findstring debug , $(cfg )), d )
42+ MS_CRT_KEY = /MD $(if $(findstring debug , $(cfg )), d )
3943endif
4044EH_FLAGS = /EHsc /GR
4145
@@ -67,6 +71,7 @@ DEFINE_KEY = /D
6771OUTPUT_KEY = /Fe
6872OUTPUTOBJ_KEY = /Fo
6973WARNING_AS_ERROR_KEY = /WX
74+ BIGOBJ_KEY = /bigobj
7075
7176ifeq ($(runtime ), vc7 .1 )
7277 WARNING_KEY = /W3
@@ -91,9 +96,15 @@ ifeq (ok,$(call detect_js,/minversion cl 17))
9196 CPLUS_FLAGS += /volatile :iso
9297endif
9398
99+ # Since VS2013, VC++ uses the same .pdb file for different sources so we need
100+ # to add /FS (Force Synchronous PDB Writes)
101+ ifeq (ok , $(call detect_js , /minversion cl 18 ))
102+ CPLUS_FLAGS += /FS
103+ endif
104+
94105CPLUS_FLAGS += /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE \
95106 /D_WIN32_WINNT = $(_WIN32_WINNT )
96- C_FLAGS = $(CPLUS_FLAGS )
107+ C_FLAGS = $(subst $( EH_FLAGS ) ,, $( CPLUS_FLAGS ) )
97108
98109# ------------------------------------------------------------------------------
99110# End of setting compiler flags.
@@ -127,11 +138,7 @@ endif
127138# ------------------------------------------------------------------------------
128139# Setting tbbmalloc data.
129140# ------------------------------------------------------------------------------
130- ifneq ($(target_ui ), win8ui )
131- M_CPLUS_FLAGS = $(subst $(EH_FLAGS ), /EHs -, $(CPLUS_FLAGS ))
132- else
133141M_CPLUS_FLAGS = $(CPLUS_FLAGS )
134- endif
135142# ------------------------------------------------------------------------------
136143# End of setting tbbmalloc data.
137144# ------------------------------------------------------------------------------
0 commit comments