aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-03-25 00:59:11 +0300
committerarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-03-25 00:59:11 +0300
commit19152869aaa383d82950ce6136494bb3c89b95f0 (patch)
treebc9e2803bedf704c97d80ccfc8a7bb9d25603c38
parent3d072ebbe1c2292e8eb35427050bf960f3f1a8d9 (diff)
downloadydb-19152869aaa383d82950ce6136494bb3c89b95f0.tar.gz
intermediate changes
ref:58a601d2698ff58961ac0c1c794bf769aed64cee
-rwxr-xr-xbuild/ymake_conf.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/build/ymake_conf.py b/build/ymake_conf.py
index 9518987e59..21262379a1 100755
--- a/build/ymake_conf.py
+++ b/build/ymake_conf.py
@@ -2289,8 +2289,14 @@ class MSVCToolchainOptions(ToolchainOptions):
class MSVC(object):
# noinspection PyPep8Naming
- class WIN32_WINNT(object):
- Macro = '_WIN32_WINNT'
+ class WindowsVersion(object):
+ """
+ Predefined values for _WIN32_WINNT macro.
+ This macro specifies minimal Windows version required by the binary being build.
+
+ A complete list of the values supported by the Windows SDK can be found at
+ https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt
+ """
Windows7 = '0x0601'
Windows8 = '0x0602'
@@ -2346,8 +2352,6 @@ class MSVCCompiler(MSVC, Compiler):
target = self.build.target
- win32_winnt = self.WIN32_WINNT.Windows7
-
warns_enabled = [
4018, # 'expression' : signed/unsigned mismatch
4265, # 'class' : class has virtual functions, but destructor is not virtual
@@ -2505,8 +2509,9 @@ class MSVCCompiler(MSVC, Compiler):
emit('OBJ_CROSS_SUF', '$OBJ_SUF')
emit('OBJECT_SUF', '$OBJ_SUF.obj')
- emit('WIN32_WINNT', '{value}'.format(value=win32_winnt))
- defines.append('/D{name}=$WIN32_WINNT'.format(name=self.WIN32_WINNT.Macro))
+
+ win_version_min = self.WindowsVersion.Windows7
+ defines.append('/D_WIN32_WINNT={0}'.format(win_version_min))
if winapi_unicode:
defines += ['/DUNICODE', '/D_UNICODE']