From 06e9f7115317ea9684ea707ba203c7ed79ea90b1 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Tue, 28 Jan 2020 06:33:57 +0000 Subject: [PATCH] Enable -Werror on clang-cl builds. Most of our makefiles use -Werror, and it seems silly not to do the same for the Windows clang-cl builds. The w32old build was not warning-clean, for a reason I can't do much about: something in the VS2003 headers gives a lot of warnings about mismatched #pragma pack push/pop between system header files. I don't see anything much I can do about that except to squelch the warning with -Wno-pragma-pack. --- Buildscr | 2 +- mkfiles.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Buildscr b/Buildscr index 2b789d4c..5ab0f145 100644 --- a/Buildscr +++ b/Buildscr @@ -232,7 +232,7 @@ in putty/windows with clangcl_a64 do Platform=arm64 make -f Makefile.clangcl BUI # # There's no installer to go with these, so they must also embed the # help file. -in putty/windows with clangcl32_2003 do Platform=x86 make -f Makefile.clangcl BUILDDIR=buildold/ RCFL=-DEMBED_CHM $(Makeargs) CCTARGET=i386-pc-windows-msvc13.0.0 SUBSYSVER=,4.0 EXTRA_windows=wincrt0.obj EXTRA_console=crt0.obj EXTRA_libs=libcpmt.lib XFLAGS=/arch:IA32 all -j$(nproc) +in putty/windows with clangcl32_2003 do Platform=x86 make -f Makefile.clangcl BUILDDIR=buildold/ RCFL=-DEMBED_CHM $(Makeargs) CCTARGET=i386-pc-windows-msvc13.0.0 SUBSYSVER=,4.0 EXTRA_windows=wincrt0.obj EXTRA_console=crt0.obj EXTRA_libs=libcpmt.lib XFLAGS="/arch:IA32 -Wno-pragma-pack" all -j$(nproc) # Remove test programs again. in putty/windows do make -f Makefile.clangcl BUILDDIR=build32/ cleantestprogs diff --git a/mkfiles.pl b/mkfiles.pl index 00112a4d..3282f359 100755 --- a/mkfiles.pl +++ b/mkfiles.pl @@ -549,7 +549,7 @@ if (defined $makefiles{'clangcl'}) { (join " ", map {"-I$dirpfx$_"} @srcdirs) . " /D_WINDOWS /D_WIN32_WINDOWS=0x500 /DWINVER=0x500 ". "/D_CRT_SECURE_NO_WARNINGS /D_WINSOCK_DEPRECATED_NO_WARNINGS"). - " \$(PLATFORMCFLAGS)\n". + " -Werror \$(PLATFORMCFLAGS)\n". "LFLAGS = /incremental:no /dynamicbase /nxcompat\n". &splitline("RCPPFLAGS = ".(join " ", map {"-I$dirpfx$_"} @srcdirs). " -DWIN32 -D_WIN32 -DWINVER=0x0400")." \$(RCFL)\n".