From 4dada595d172ba6bd8dd5be1d961d68f08c82058 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Tue, 5 Nov 2019 01:18:35 +0300 Subject: Compile C++ code with exception handling enabled in NT_MAKEFILE This prevents "noexcept used with no exception handling mode specified" MS VC warning. * NT_MAKEFILE (CXXFLAGS_SPECIFIC): New variable (set to "/EHsc"). * NT_MAKEFILE (.cpp.obj): Pass $CXXFLAGS_SPECIFIC to compiler. --- NT_MAKEFILE | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'NT_MAKEFILE') diff --git a/NT_MAKEFILE b/NT_MAKEFILE index 1ca2b620..628ca5ed 100644 --- a/NT_MAKEFILE +++ b/NT_MAKEFILE @@ -77,6 +77,8 @@ CFLAGS_SPECIFIC=$(CFLAGS_DEBUG) $(CFLAGS_GCDLL) $(CFLAGS_MT) CFLAGS_DEFAULT=-DALL_INTERIOR_POINTERS -DENABLE_DISCLAIM -DGC_ATOMIC_UNCOLLECTABLE -DGC_GCJ_SUPPORT -DJAVA_FINALIZATION -DNO_EXECUTE_PERMISSION -DUSE_MUNMAP +CXXFLAGS_SPECIFIC=/EHsc + # Make sure that .cc is not viewed as a suffix. It is for VC++2005, but # not earlier versions. We can deal with either, but not inconsistency. .SUFFIXES: @@ -109,7 +111,7 @@ check: gctest.exe test_cpp.exe cordtest.exe de.exe # of safe uses of strncpy. It would be nice to leave the rest enabled. .cpp.obj: - $(cc) $(cdebug) $(cflags) $(CFLAGS_SPECIFIC) -Iinclude $(CFLAGS_DEFAULT) -D_CRT_SECURE_NO_DEPRECATE $*.cpp /Fo$*.obj + $(cc) $(cdebug) $(cflags) $(CFLAGS_SPECIFIC) -Iinclude $(CFLAGS_DEFAULT) $(CXXFLAGS_SPECIFIC) -D_CRT_SECURE_NO_DEPRECATE $*.cpp /Fo$*.obj $(OBJS) tests\test.obj: include\private\gc_priv.h include\private\gc_hdrs.h include\gc.h include\private\gcconfig.h include\private\gc_locks.h include\private\gc_pmark.h include\gc_mark.h include\gc_disclaim.h include\private\msvc_dbg.h -- cgit v1.2.1