Force c++14 when running tests on Windows.
authorZachary Turner <zturner@google.com>
Tue, 13 Sep 2016 23:45:11 +0000 (23:45 +0000)
committerZachary Turner <zturner@google.com>
Tue, 13 Sep 2016 23:45:11 +0000 (23:45 +0000)
VS 2015 and higher begin making use of c++14 in their standard
library headers.  As such, -std=c++11 makes it so you can't compile
trivial programs.  Bump this to -std=c++14 when this situation is
detected.

llvm-svn: 281420

lldb/packages/Python/lldbsuite/test/make/Makefile.rules

index 3726826..910dc67 100644 (file)
@@ -303,6 +303,7 @@ ifeq "$(OS)" "Windows_NT"
                CXXFLAGS += -D_HAS_EXCEPTIONS=0
                ifeq "$(VisualStudioVersion)" "14.0"
                        CXXFLAGS += -fms-compatibility-version=19.0
+                       override CXXFLAGS := $(subst -std=c++11,-std=c++14,$(CXXFLAGS))
                endif
                # The MSVC linker doesn't understand long section names
                # generated by the clang compiler.