From a9d4d9cc99b8f5bf24aad8fb0b11c893565c9ce3 Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 29 Dec 2019 11:02:36 +1100 Subject: Backport: Support Clang on Windows. Backport of changeset 7852:876b77cb9acd. --- gtk/makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gtk/makefile b/gtk/makefile index 8e433edaf..ef557eb95 100644 --- a/gtk/makefile +++ b/gtk/makefile @@ -17,6 +17,18 @@ ifdef CLANG CXX = clang++ CC = clang WARNINGS += -Wno-deprecated-register +ifdef windir +# Turn off some warnings that occur when Clang is being used on Windows where it +# is including Microsoft headers. +# incompatible-ms-struct is because more complex structs are not quite the same as MSVC +WARNINGS += -Wno-incompatible-ms-struct +# language-extension-token is because of __int64 in glib-2.0 glibconfig.h +WARNINGS += -Wno-language-extension-token +# register may be used in glib +# This produces a warning since -Wno-register is not valid for C files but it still works +WARNINGS += -Wno-register +DEFINES += -D_CRT_SECURE_NO_DEPRECATE +endif # Can choose aspect to sanitize: address and undefined can simply change SANITIZE but for # thread also need to create Position Independent Executable -> search online documentation SANITIZE = address -- cgit v1.2.3