google / ngx_brotli

NGINX module for Brotli compression
BSD 2-Clause "Simplified" License
2.1k stars 216 forks source link

Fix msvc build (ngx_brotli module for windows) #145

Closed sebres closed 1 year ago

sebres commented 1 year ago

Suggested PR fixes build of ngx_brotli module for windows with msvc compiler & toolchain.

Cons: it changes CFLAGS for whole nginx Makefile, so it'd suppress the warnings and disables precompiled header in entire build process of nginx (not ngx_brotli module only) no matter the module added as dynamic or static. I did not find the way how using auto/module one could set it for brotli-deps files only (if it is possible at all). Another possibility would be to build brotli-deps as a static library in a separate process and link it statically to ngx_brotli module hereafter.

This PR fixes it minimal invasive, similar the tweak with CFLAGS="$CFLAGS -Wno-deprecated-declarations" which has alike effect (just ignores deprecated declarations) for entire build process of nginx. Anyway it works after all.

eustas commented 1 year ago

Thanks