<div dir="ltr">Seems like --with-cc=clang flag is where I can define clang compiler. Is it safe to use with --with-cc-opt='-std=c11 ...? I think clang uses C11 anyway.<br><div class="gmail_extra"><br><div class="gmail_quote">2016-07-08 14:44 GMT+02:00 Lantos István <span dir="ltr"><<a href="mailto:kerozin.joe@gmail.com" target="_blank">kerozin.joe@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>The default --with-cc-opt flags for Nginx are these:<br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><b>--with-cc-opt='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2'</b><br></blockquote><br></div>However I added more optimizations, which are against the standard:<br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><b>--with-cc-opt='-g -Ofast -march=native -ffast-math -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2'</b><br></blockquote><br></div>So far I don't experience any bug, but I do have a higher benchmark: 380-450 req/s compared to the original 290-310 req/s with cached Node/Express app on my laptop.<br><br></div>Is it safe to use -O3 or -Ofast flags with Nginx?<br><br></div>Is it possible to build Nginx with clang? If so, should I symlink it to gcc (I use Docker, this way gcc executable is trashed) or is there a way to define the compiler with a flag?<br></div>
</blockquote></div><br></div></div>