Re: [xml] Patch to guard #define WIN32_LEAN_AND_MEAN



On 09/11/2017 06:33, Joel Hockey wrote:
The error I get is because we already have WIN32_LEAN_AND_MEAN defined.

This seems to be the result of Chromium defining the macro on the command line and building with -Werror. This is an untypical setup and I'd suggest to fix it in Chromium. I think it should work to add the following lines to libxml2's BUILD.gn:

    if (is_win) {
      # libxml2 already defines WIN32_LEAN_AND_MEAN.
      configs -= [ "//build/config/win:lean_and_mean" ]
    }

BTW, looking at the warnings section in BUILD.gn,


https://chromium.googlesource.com/chromium/src/+/master/third_party/libxml/BUILD.gn#27

the clang warnings should now be fixed in libxml2. The only exceptions are -Wno-unused-function in the Trio code and -Wpedantic which Chromium doesn't seem to use.

For the MSVC build, we currently use "/W3 /wd4244 /wd4267".

Nick


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]