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 # CYGWIN
endif # COMSPEC endif # COMSPEC
ifndef CXX
CXX=g++
endif
ifeq ($(CXX), clang++)
CPPCHK_GLIBCXX_DEBUG=
endif
ifndef CXXFLAGS 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 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 endif
@ -85,10 +92,6 @@ ifeq ($(HAVE_RULES),yes)
endif endif
endif endif
ifndef CXX
CXX=g++
endif
ifndef PREFIX ifndef PREFIX
PREFIX=/usr PREFIX=/usr
endif endif

View File

@ -313,6 +313,12 @@ int main(int argc, char **argv)
<< "endif # COMSPEC\n" << "endif # COMSPEC\n"
<< "\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.. // Makefile settings..
if (release) { if (release) {
makeConditionalVariable(fout, "CXXFLAGS", "-O2 -include lib/cxx11emu.h -DNDEBUG -Wall -Wno-sign-compare"); 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"
<< "endif\n\n"; << "endif\n\n";
makeConditionalVariable(fout, "CXX", "g++");
makeConditionalVariable(fout, "PREFIX", "/usr"); makeConditionalVariable(fout, "PREFIX", "/usr");
makeConditionalVariable(fout, "INCLUDE_FOR_LIB", "-Ilib -Iexternals/tinyxml"); makeConditionalVariable(fout, "INCLUDE_FOR_LIB", "-Ilib -Iexternals/tinyxml");
makeConditionalVariable(fout, "INCLUDE_FOR_CLI", "-Ilib -Iexternals/tinyxml"); makeConditionalVariable(fout, "INCLUDE_FOR_CLI", "-Ilib -Iexternals/tinyxml");