Re: [PATCH] win32: add "symbols" flag to configure.js
Michael Stahl <[email protected]> Fri, 10 Apr 2020 19:32:46 +0200
| Newsgroups | gmane.comp.gnome.lib.xml.general |
|---|---|
| Message-ID | <[email protected]> |
On 10.03.20 12:16, Nick Wellnhofer wrote: > On 08/03/2020 17:40, Michael Stahl wrote: >> hi, we want an easier way to get PDB files for MSVC release builds for >> crashreporting purpose... > > There's also this GitLab issue: > https://gitlab.gnome.org/GNOME/libxml2/issues/140 > > Maybe we should simply add a feature to provide custom compiler and > linker flags. > > Nick okay i've played around with that now, result is attached... _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] https://mail.gnome.org/mailman/listinfo/xml
0001-win32-allow-passing-FLAGS-on-command-line.patch
(text/x-patch, 1.2 KB)
From 5222bfc6a20558166028a7a51bba5233eb4ded41 Mon Sep 17 00:00:00 2001 From: Michael Stahl <[email protected]> Date: Fri, 10 Apr 2020 19:22:07 +0200 Subject: [PATCH] win32: allow passing *FLAGS on command line nmake is a primitive tool, so this is a primitive implementation: append CFLAGS_ADD etc. variables. Command line variables should be appended to allow overriding flags set in the makefile. It doesn't work to pass in CFLAGS like in make because that always overrides the assignments in the makefile. It doesn't work to pass in CFLAGS, then CFLAGS_ADD=$(CFLAGS) !UNDEF CFLAGS ... CFLAGS=$(CFLAGS) $(CFLAGS_ADD) because that's a cyclical definition in nmake. --- win32/Makefile.msvc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/win32/Makefile.msvc b/win32/Makefile.msvc index f6a0182d..76b7e1c5 100644 --- a/win32/Makefile.msvc +++ b/win32/Makefile.msvc @@ -106,6 +106,11 @@ CFLAGS = $(CFLAGS) /D "NDEBUG" /O2 LDFLAGS = $(LDFLAGS) !endif +# append CFLAGS etc. passed on command line +CPPFLAGS = $(CPPFLAGS) $(CPPFLAGS_ADD) +CFLAGS = $(CFLAGS) $(CFLAGS_ADD) +LDFLAGS = $(LDFLAGS) $(LDFLAGS_ADD) + # Libxml object files. XML_OBJS = $(XML_INTDIR)\buf.obj\ $(XML_INTDIR)\c14n.obj\ -- 2.25.2