summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-03-04 20:57:26 +0100
committerMichael Stahl <mstahl@redhat.com>2015-03-05 15:36:48 +0100
commit743a4bf7f86d957412944fefbe694fe429f82463 (patch)
treef430b7e7c12c1fc6e807caf01516104a2255d520 /solenv
parent19bfe765a50a81f67325c4fd35314ca8a2e4ca0a (diff)
gbuild: stop disabling MSVC warning C4996 on --enable-dbgutil builds
... makes it hard to clean up these problems. But the warnings on almost every std::copy and std::transform are obnoxious, so disable them with _SCL_SECURE_NO_WARNINGS Change-Id: Ieea611175fb16b78ff972d194767d3d192992de5
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/platform/com_MSC_defs.mk16
1 files changed, 6 insertions, 10 deletions
diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk
index c5804a87cf7d..e02b581efc5f 100644
--- a/solenv/gbuild/platform/com_MSC_defs.mk
+++ b/solenv/gbuild/platform/com_MSC_defs.mk
@@ -40,10 +40,14 @@ ifneq ($(origin CXX),default)
gb_CXX := $(CXX)
endif
+# _SCL_SECURE_NO_WARNINGS avoids deprecation warnings for STL algorithms
+# like std::copy, std::transform (when MSVC_USE_DEBUG_RUNTIME is enabled)
+
gb_COMPILERDEFS := \
-D_CRT_NON_CONFORMING_SWPRINTFS \
-D_CRT_NONSTDC_NO_DEPRECATE \
-D_CRT_SECURE_NO_DEPRECATE \
+ -D_SCL_SECURE_NO_WARNINGS \
-D_MT \
-D_DLL \
-DCPPU_ENV=$(gb_CPPU_ENV) \
@@ -63,8 +67,8 @@ gb_RCFLAGS :=
gb_AFLAGS := $(AFLAGS)
-# Do we really need to disable to many warnings? It seems to me that
-# many of these warnings are for custructs that we have been actively
+# Do we really need to disable this many warnings? It seems to me that
+# many of these warnings are for constructs that we have been actively
# cleaning away from the code, to avoid warnings when building with
# gcc or Clang and -Wall -Werror.
@@ -129,9 +133,6 @@ gb_AFLAGS := $(AFLAGS)
# C4913: user defined binary operator ',' exists but no overload could
# convert all operands, default built-in binary operator ',' used
-# C4996: 'function': was declared deprecated
-# Also generated for C++ library functions that "may be unsafe"
-
gb_CFLAGS := \
-Gd \
-GR \
@@ -184,11 +185,6 @@ gb_CXXFLAGS := \
-wd4913 \
-Zc:wchar_t- \
-ifneq ($(MSVC_USE_DEBUG_RUNTIME),)
-gb_CXXFLAGS += \
- -wd4996 \
-
-endif
ifneq ($(ENABLE_LTO),)