dmake: don't compile clang build with -D_GLIBCXX_DEBUG since it breaks the build.

This commit is contained in:
Matthias Krüger 2015-10-05 04:51:06 +02:00
parent f35c24d4af
commit 73b088a6dd
2 changed files with 13 additions and 5 deletions

View File

@ -72,6 +72,13 @@ ifdef COMSPEC
endif # CYGWIN
endif # COMSPEC
ifndef CXX
CXX=g++
endif
ifeq ($(CXX), clang++)
CPPCHK_GLIBCXX_DEBUG=
endif
ifndef CXXFLAGS
CXXFLAGS=-include lib/cxx11emu.h -pedantic -Wall -Wextra -Wabi -Wcast-qual -Wfloat-equal -Winline -Wmissing-declarations -Wmissing-format-attribute -Wno-long-long -Wpacked -Wredundant-decls -Wshadow -Wsign-promo -Wno-missing-field-initializers -Wno-missing-braces -Wno-sign-compare $(CPPCHK_GLIBCXX_DEBUG) -g
endif
@ -85,10 +92,6 @@ ifeq ($(HAVE_RULES),yes)
endif
endif
ifndef CXX
CXX=g++
endif
ifndef PREFIX
PREFIX=/usr
endif

View File

@ -313,6 +313,12 @@ int main(int argc, char **argv)
<< "endif # COMSPEC\n"
<< "\n";
// skip "-D_GLIBCXX_DEBUG" if clang, since it breaks the build
makeConditionalVariable(fout, "CXX", "g++");
fout << "ifeq ($(CXX), clang++)\n"
<< " CPPCHK_GLIBCXX_DEBUG=\n"
<< "endif\n";
// Makefile settings..
if (release) {
makeConditionalVariable(fout, "CXXFLAGS", "-O2 -include lib/cxx11emu.h -DNDEBUG -Wall -Wno-sign-compare");
@ -358,7 +364,6 @@ int main(int argc, char **argv)
<< " endif\n"
<< "endif\n\n";
makeConditionalVariable(fout, "CXX", "g++");
makeConditionalVariable(fout, "PREFIX", "/usr");
makeConditionalVariable(fout, "INCLUDE_FOR_LIB", "-Ilib -Iexternals/tinyxml");
makeConditionalVariable(fout, "INCLUDE_FOR_CLI", "-Ilib -Iexternals/tinyxml");