aboutsummaryrefslogtreecommitdiffstats
path: root/build/ymake_conf.py
diff options
context:
space:
mode:
authorarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-03-20 01:01:05 +0300
committerarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-03-20 01:01:05 +0300
commitfeecfe4e731d0335905f0d577722208ad3f4b215 (patch)
treefd90f6d764b13efcf9798bc65a34b2e3173f8468 /build/ymake_conf.py
parent58a66857163454665d57848746acbb3ac8c83cad (diff)
downloadydb-feecfe4e731d0335905f0d577722208ad3f4b215.tar.gz
intermediate changes
ref:33e05f1345d84d54b16f3089e6086c2c303dabff
Diffstat (limited to 'build/ymake_conf.py')
-rwxr-xr-xbuild/ymake_conf.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/build/ymake_conf.py b/build/ymake_conf.py
index aa02ad22db..7b80b39c98 100755
--- a/build/ymake_conf.py
+++ b/build/ymake_conf.py
@@ -2388,13 +2388,21 @@ class MSVCCompiler(MSVC, Compiler):
'/D_WINDOWS',
'/D_CRT_SECURE_NO_WARNINGS',
'/D_CRT_NONSTDC_NO_WARNINGS',
+ # Math constants (such as M_PI, M_E, M_SQRT2) are not defined in standard C / C++
+ # In order to get them defined by Windows ucrt library,
+ # you must first define _USE_MATH_DEFINES before #including <cmath> or math.h>.
+ # (NB: glibc defines these macros whenever _XOPEN_SOURCE is defined)
'/D_USE_MATH_DEFINES',
'/D__STDC_CONSTANT_MACROS',
'/D__STDC_FORMAT_MACROS',
'/D_USING_V110_SDK71_',
'/D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES',
- '/DNOMINMAX',
+ # Below defines are covered at
+ # https://docs.microsoft.com/en-us/windows/win32/winprog/using-the-windows-headers#faster-builds-with-smaller-header-files
+ # Exclude APIs such as Cryptography, DDE, RPC, Shell, and Windows Sockets (while including <windows.h>)
'/DWIN32_LEAN_AND_MEAN',
+ # Define NOMINMAX to avoid min() and max() macros definition (while including <windows.h>)
+ '/DNOMINMAX',
]
cxx_defines = [