From 50b9448450b924d71b6637daa5de3351d283effb Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 6 Dec 2018 18:41:30 +0000 Subject: [PATCH] Makefile.clangcl: move $(CCTARGET) out of $(CC). Now $(CC) is defined to be nothing but the name of the clang-cl binary itself, which makes it easier to drop in a different one for a special purpose. (I tried to use this for static analysis recently - unsuccessfully, as yet, but I think this change will make anything else along the same lines easier as well.) --- mkfiles.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkfiles.pl b/mkfiles.pl index 8e23b640..2d497e54 100755 --- a/mkfiles.pl +++ b/mkfiles.pl @@ -537,13 +537,13 @@ if (defined $makefiles{'clangcl'}) { "CCTARGET = i386-pc-windows-msvc18.0.0\n". "PLATFORMCFLAGS =\n". "endif\n". - "CC = \$(CCCMD) --target=\$(CCTARGET)\n". + "CC = \$(CCCMD)\n". "RC = \$(RCCMD) /c 1252 \n". "RCPREPROC = \$(CCCMD) /P /TC\n". "LD = lld-link\n". "\n". "# C compilation flags\n". - &splitline("CFLAGS = /nologo /W3 /O1 " . + &splitline("CFLAGS = --target=\$(CCTARGET) /nologo /W3 /O1 " . (join " ", map {"-I$dirpfx$_"} @srcdirs) . " /D_WINDOWS /D_WIN32_WINDOWS=0x500 /DWINVER=0x500 ". "/D_CRT_SECURE_NO_WARNINGS /D_WINSOCK_DEPRECATED_NO_WARNINGS").