Add WIN32_LEAN_AND_MEAN during build on Windows (0% build time speed up).

GitOrigin-RevId: ebe9742fa94187434be37339862f11b750db44ac
This commit is contained in:
levlam 2020-03-19 02:33:53 +03:00
parent 0578d58d93
commit 9d1e3ed661
2 changed files with 6 additions and 1 deletions

View File

@ -189,7 +189,7 @@ elseif (INTEL)
endif()
if (WIN32)
add_definitions(-DNTDDI_VERSION=0x06020000 -DWINVER=0x0602 -D_WIN32_WINNT=0x0602 -DNOMINMAX -DUNICODE -D_UNICODE)
add_definitions(-DNTDDI_VERSION=0x06020000 -DWINVER=0x0602 -D_WIN32_WINNT=0x0602 -DNOMINMAX -DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN)
endif()
if (CYGWIN)
add_definitions(-D_DEFAULT_SOURCE=1 -DFD_SETSIZE=4096)

View File

@ -11,6 +11,7 @@
#include "td/utils/port/wstring_convert.h"
#endif
#include "td/utils/common.h"
#include "td/utils/logging.h"
#include "td/utils/misc.h"
#include "td/utils/port/detail/PollableFd.h"
@ -32,6 +33,10 @@
#include <unistd.h>
#endif
#if TD_PORT_WINDOWS && defined(WIN32_LEAN_AND_MEAN)
#include <winioctl.h>
#endif
namespace td {
namespace {