From adac9981cfccfba12a4b866afcce3d5606c6c54d Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 31 Mar 2018 12:20:00 +1100 Subject: Backport: Make clang 6.0 build without warnings. Requires clang to be on the path now. Backport of changeset 6665:b3db8fb581bb. --- win32/makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'win32') diff --git a/win32/makefile b/win32/makefile index 597fc257f..0ec1f94f1 100644 --- a/win32/makefile +++ b/win32/makefile @@ -13,9 +13,11 @@ LEXCOMPONENT = $(DIR_BIN)/SciLexer.dll LIBSCI = $(DIR_BIN)/libscintilla.a ifdef CLANG -# Common location for 32-bit clang on Windows -CXX = "C:\Program Files (x86)\LLVM\bin\clang++" -CXXSTD = c++14 +CXX = clang++ +# Clang doesn't like omitting braces in array initialization but they just add noise, +# __uuidof is a Microsoft extension but makes COM code neater, +# public visibility avoids warnings like 'locally defined symbol __std_terminate imported' +CLANG_OPTS = -Wno-missing-braces -Wno-language-extension-token -Xclang -flto-visibility-public-std else # MinGW GCC LDMINGW = -Wl,--enable-runtime-pseudo-reloc-v2 -Wl,--add-stdcall-alias @@ -47,7 +49,7 @@ ifneq "$(shell $(CXX) -c CheckD2D.cxx 2>&1)" "" D2DFLAGS=-DDISABLE_D2D endif -CXXBASEFLAGS=--std=$(CXXSTD) -Wall -pedantic $(INCLUDEDIRS) $(D2DFLAGS) -D_CRT_SECURE_NO_DEPRECATE=1 +CXXBASEFLAGS=--std=$(CXXSTD) -Wall -pedantic $(INCLUDEDIRS) $(D2DFLAGS) -D_CRT_SECURE_NO_DEPRECATE=1 $(CLANG_OPTS) ifdef NO_CXX11_REGEX REFLAGS=-DNO_CXX11_REGEX -- cgit v1.2.3