aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-03-31 12:20:00 +1100
committerNeil <nyamatongwe@gmail.com>2018-03-31 12:20:00 +1100
commitadac9981cfccfba12a4b866afcce3d5606c6c54d (patch)
tree344ae0fba6909dc9060f31b0421b7c4adf3663a0
parent1a6cbde3df0f0cb39153337c8260a8cdbb49a931 (diff)
downloadscintilla-mirror-adac9981cfccfba12a4b866afcce3d5606c6c54d.tar.gz
Backport: Make clang 6.0 build without warnings. Requires clang to be on the path now.
Backport of changeset 6665:b3db8fb581bb.
-rw-r--r--win32/makefile10
1 files changed, 6 insertions, 4 deletions
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