aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorNikita Slyusarev <nslus@yandex-team.com>2022-02-10 16:46:52 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:52 +0300
commitcd77cecfc03a3eaf87816af28a33067c4f0cdb59 (patch)
tree1308e0bae862d52e0020d881fe758080437fe389 /build
parentcdae02d225fb5b3afbb28990e79a7ac6c9125327 (diff)
downloadydb-cd77cecfc03a3eaf87816af28a33067c4f0cdb59.tar.gz
Restoring authorship annotation for Nikita Slyusarev <nslus@yandex-team.com>. Commit 1 of 2.
Diffstat (limited to 'build')
-rw-r--r--build/plugins/_common.py12
-rw-r--r--build/rules/autocheck.blacklist4
-rw-r--r--build/rules/local.blacklist2
-rw-r--r--build/rules/py2_deprecation/ya.make2
-rw-r--r--build/scripts/fix_msvc_output.py58
-rw-r--r--build/scripts/link_dyn_lib.py38
-rw-r--r--build/scripts/run_msvc_wine.py46
-rw-r--r--build/scripts/stdout2stderr.py12
-rw-r--r--build/ya.conf.json26
-rw-r--r--build/ya.make8
-rw-r--r--build/ymake.core.conf34
-rwxr-xr-xbuild/ymake_conf.py148
12 files changed, 195 insertions, 195 deletions
diff --git a/build/plugins/_common.py b/build/plugins/_common.py
index 2f831a94db..d74e2387de 100644
--- a/build/plugins/_common.py
+++ b/build/plugins/_common.py
@@ -52,8 +52,8 @@ def stripext(fname):
def tobuilddir(fname):
- if not fname:
- return '$B'
+ if not fname:
+ return '$B'
if fname.startswith('$S'):
return fname.replace('$S', '$B', 1)
else:
@@ -113,14 +113,14 @@ def resolve_to_abs_path(path, source_root, build_root):
if path.startswith('$B') and build_root is not None:
return path.replace('$B', build_root, 1)
return path
-
-
+
+
def resolve_to_ymake_path(path):
return resolve_to_abs_path(path, '${ARCADIA_ROOT}', '${ARCADIA_BUILD_ROOT}')
-def join_intl_paths(*args):
- return '/'.join(args)
+def join_intl_paths(*args):
+ return '/'.join(args)
def get(fun, num):
diff --git a/build/rules/autocheck.blacklist b/build/rules/autocheck.blacklist
index 8711560ed3..07282ba68d 100644
--- a/build/rules/autocheck.blacklist
+++ b/build/rules/autocheck.blacklist
@@ -9,7 +9,7 @@ data-ui/unity
direct/frontend/services
direct/frontend/packages
drive/pyback
-fintech/frontend
+fintech/frontend
frontend
games/frontend
junk
@@ -19,7 +19,7 @@ maps/front
mobile
music/frontend
serp/hermione
-zen/frontend
+zen/frontend
taxi/lavka/frontend
velocity/error-booster/error-booster-queue
velocity/error-booster/market
diff --git a/build/rules/local.blacklist b/build/rules/local.blacklist
index 46d8cff894..0612cdeb60 100644
--- a/build/rules/local.blacklist
+++ b/build/rules/local.blacklist
@@ -1,3 +1,3 @@
# Local blacklist
# The list of top level directories excluded from local build
-mobile
+mobile
diff --git a/build/rules/py2_deprecation/ya.make b/build/rules/py2_deprecation/ya.make
index f488d5e97b..14295798da 100644
--- a/build/rules/py2_deprecation/ya.make
+++ b/build/rules/py2_deprecation/ya.make
@@ -1,6 +1,6 @@
OWNER(g:ymake)
RESOURCES_LIBRARY()
-MESSAGE(WARNING You are using deprecated Python2-only code. Please consider rewriting to Python 3. To list all such errors use `ya make -DFAIL_PY2`.)
+MESSAGE(WARNING You are using deprecated Python2-only code. Please consider rewriting to Python 3. To list all such errors use `ya make -DFAIL_PY2`.)
END()
diff --git a/build/scripts/fix_msvc_output.py b/build/scripts/fix_msvc_output.py
index b2e7d38307..4fda5b6321 100644
--- a/build/scripts/fix_msvc_output.py
+++ b/build/scripts/fix_msvc_output.py
@@ -1,13 +1,13 @@
-import subprocess
-import sys
-
+import subprocess
+import sys
+
import process_command_files as pcf
import process_whole_archive_option as pwa
-
-def out2err(cmd):
- return subprocess.Popen(cmd, stdout=sys.stderr).wait()
-
-
+
+def out2err(cmd):
+ return subprocess.Popen(cmd, stdout=sys.stderr).wait()
+
+
def decoding_needed(strval):
if sys.version_info >= (3, 0, 0):
return isinstance(strval, bytes)
@@ -15,28 +15,28 @@ def decoding_needed(strval):
return False
-def out2err_cut_first_line(cmd):
- p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
- first_line = True
- while True:
- line = p.stdout.readline()
+def out2err_cut_first_line(cmd):
+ p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
+ first_line = True
+ while True:
+ line = p.stdout.readline()
line = line.decode('utf-8') if decoding_needed(line) else line
- if not line:
- break
- if first_line:
- sys.stdout.write(line)
- first_line = False
- else:
- sys.stderr.write(line)
- return p.wait()
-
-
-if __name__ == '__main__':
+ if not line:
+ break
+ if first_line:
+ sys.stdout.write(line)
+ first_line = False
+ else:
+ sys.stderr.write(line)
+ return p.wait()
+
+
+if __name__ == '__main__':
mode = sys.argv[1]
args, wa_peers, wa_libs = pwa.get_whole_archive_peers_and_libs(pcf.skip_markers(sys.argv[2:]))
cmd = pwa.ProcessWholeArchiveOption('WINDOWS', wa_peers, wa_libs).construct_cmd(args)
- run = out2err
- if mode in ('cl', 'ml'):
- # First line of cl.exe and ml64.exe stdout is useless: it prints input file
- run = out2err_cut_first_line
- sys.exit(run(cmd))
+ run = out2err
+ if mode in ('cl', 'ml'):
+ # First line of cl.exe and ml64.exe stdout is useless: it prints input file
+ run = out2err_cut_first_line
+ sys.exit(run(cmd))
diff --git a/build/scripts/link_dyn_lib.py b/build/scripts/link_dyn_lib.py
index 23487f5c1e..1b48e6a204 100644
--- a/build/scripts/link_dyn_lib.py
+++ b/build/scripts/link_dyn_lib.py
@@ -112,31 +112,31 @@ def fix_gnu_param(arch, ex):
return ret
-def fix_windows_param(ex):
- with tempfile.NamedTemporaryFile(delete=False) as def_file:
- exports = []
- for item in ex:
- if item.get('lang') == 'C':
- exports.append(item.get('sym'))
- def_file.write('EXPORTS\n')
- for export in exports:
- def_file.write(' {}\n'.format(export))
- return ['/DEF:{}'.format(def_file.name)]
-
-
+def fix_windows_param(ex):
+ with tempfile.NamedTemporaryFile(delete=False) as def_file:
+ exports = []
+ for item in ex:
+ if item.get('lang') == 'C':
+ exports.append(item.get('sym'))
+ def_file.write('EXPORTS\n')
+ for export in exports:
+ def_file.write(' {}\n'.format(export))
+ return ['/DEF:{}'.format(def_file.name)]
+
+
musl_libs = '-lc', '-lcrypt', '-ldl', '-lm', '-lpthread', '-lrt', '-lutil'
def fix_cmd(arch, musl, c):
- if arch == 'WINDOWS':
- prefix = '/DEF:'
- f = fix_windows_param
+ if arch == 'WINDOWS':
+ prefix = '/DEF:'
+ f = fix_windows_param
else:
- prefix = '-Wl,--version-script='
+ prefix = '-Wl,--version-script='
if arch in ('DARWIN', 'IOS'):
- f = fix_darwin_param
- else:
- f = lambda x: fix_gnu_param(arch, x)
+ f = fix_darwin_param
+ else:
+ f = lambda x: fix_gnu_param(arch, x)
def do_fix(p):
if musl and p in musl_libs:
diff --git a/build/scripts/run_msvc_wine.py b/build/scripts/run_msvc_wine.py
index 439d1f8831..0d41fde8b2 100644
--- a/build/scripts/run_msvc_wine.py
+++ b/build/scripts/run_msvc_wine.py
@@ -16,14 +16,14 @@ procs = []
build_kekeke = 45
-def stringize(s):
- return s.encode('utf-8') if isinstance(s, unicode) else s
-
-
+def stringize(s):
+ return s.encode('utf-8') if isinstance(s, unicode) else s
+
+
def run_subprocess(*args, **kwargs):
- if 'env' in kwargs:
- kwargs['env'] = {stringize(k): stringize(v) for k, v in kwargs['env'].iteritems()}
-
+ if 'env' in kwargs:
+ kwargs['env'] = {stringize(k): stringize(v) for k, v in kwargs['env'].iteritems()}
+
p = subprocess.Popen(*args, **kwargs)
procs.append(p)
@@ -310,7 +310,7 @@ def colorize_line(l):
parts.extend(colorize_strings(l))
return ''.join(parts)
- except Exception:
+ except Exception:
return lll
@@ -361,11 +361,11 @@ def make_full_path_arg(arg, bld_root, short_root):
def fix_path(p):
topdirs = ['/%s/' % d for d in os.listdir('/')]
- def abs_path_start(path, pos):
- if pos < 0:
- return False
- return pos == 0 or path[pos - 1] == ':'
-
+ def abs_path_start(path, pos):
+ if pos < 0:
+ return False
+ return pos == 0 or path[pos - 1] == ':'
+
pp = None
for pr in topdirs:
pp2 = p.find(pr)
@@ -443,7 +443,7 @@ def run_main():
env['WINEDLLOVERRIDES'] = 'msvcr{}=n'.format(version)
env['WINEDEBUG'] = 'fixme-all'
- env['INCLUDE'] = ';'.join(fix_path(p) for p in incl_paths)
+ env['INCLUDE'] = ';'.join(fix_path(p) for p in incl_paths)
env['VSINSTALLDIR'] = fix_path(tc_dir)
env['VCINSTALLDIR'] = fix_path(tc_dir + '/VC')
env['WindowsSdkDir'] = fix_path(tc_dir)
@@ -475,20 +475,20 @@ def run_main():
out, _ = p.communicate()
return p.wait(), out
- def print_err_log(log):
- if not log:
- return
- if mode == 'cxx':
- log = colorize(log)
- print >>sys.stderr, log
-
+ def print_err_log(log):
+ if not log:
+ return
+ if mode == 'cxx':
+ log = colorize(log)
+ print >>sys.stderr, log
+
tout = 200
while True:
rc, out = run_process(0, tout)
if rc in (-signal.SIGALRM, signal.SIGALRM):
- print_err_log(out)
+ print_err_log(out)
print >>sys.stderr, '##append_tag##time out'
elif out and ' stack overflow ' in out:
print >>sys.stderr, '##append_tag##stack overflow'
@@ -503,7 +503,7 @@ def run_main():
print >>sys.stderr, e
else:
- print_err_log(out)
+ print_err_log(out)
# non-zero return code - bad, return it immediately
if rc:
diff --git a/build/scripts/stdout2stderr.py b/build/scripts/stdout2stderr.py
index d7861fdda3..5220b36002 100644
--- a/build/scripts/stdout2stderr.py
+++ b/build/scripts/stdout2stderr.py
@@ -1,6 +1,6 @@
-import subprocess
-import sys
-
-if __name__ == '__main__':
- assert len(sys.argv) > 1
- sys.exit(subprocess.Popen(sys.argv[1:], stdout=sys.stderr).wait())
+import subprocess
+import sys
+
+if __name__ == '__main__':
+ assert len(sys.argv) > 1
+ sys.exit(subprocess.Popen(sys.argv[1:], stdout=sys.stderr).wait())
diff --git a/build/ya.conf.json b/build/ya.conf.json
index 5f7cc875d6..a54f90ca40 100644
--- a/build/ya.conf.json
+++ b/build/ya.conf.json
@@ -1137,14 +1137,14 @@
}
]
},
- "yo": {
- "tools": {
+ "yo": {
+ "tools": {
"yo": {
"bottle": "yo",
"executable": "yo"
}
- },
- "platforms": [
+ },
+ "platforms": [
{
"host": {
"os": "LINUX"
@@ -1157,8 +1157,8 @@
},
"default": true
}
- ]
- },
+ ]
+ },
"mockgen": {
"tools": {
"mockgen": {
@@ -5819,17 +5819,17 @@
]
}
},
- "yo": {
- "formula": {
+ "yo": {
+ "formula": {
"sandbox_id": 1183539336,
- "match": "yo"
- },
- "executable": {
+ "match": "yo"
+ },
+ "executable": {
"yo": [
"yo"
]
- }
- },
+ }
+ },
"mockgen": {
"formula": {
"sandbox_id": [
diff --git a/build/ya.make b/build/ya.make
index 407b8f13e0..f7ea6697c4 100644
--- a/build/ya.make
+++ b/build/ya.make
@@ -2,9 +2,9 @@ OWNER(
g:ymake
somov
)
-
-NEED_CHECK()
-
+
+NEED_CHECK()
+
PY2_LIBRARY()
PY_SRCS(
@@ -33,6 +33,6 @@ RECURSE(
prebuilt
scripts
tests
- tests_slow
+ tests_slow
yandex_specific/config
)
diff --git a/build/ymake.core.conf b/build/ymake.core.conf
index 081833998b..2ac32fa79d 100644
--- a/build/ymake.core.conf
+++ b/build/ymake.core.conf
@@ -599,10 +599,10 @@ macro OPTIMIZE_PY_PROTOS() {
### Disable Python proto optimization using embedding corresponding C++ code into binary.
### Python protobuf runtime will use C++ implementation instead of Python one if former is available.
### This is default mode only for some system libraries.
-macro NO_OPTIMIZE_PY_PROTOS() {
- SET(OPTIMIZE_PY_PROTOS_FLAG no)
-}
-
+macro NO_OPTIMIZE_PY_PROTOS() {
+ SET(OPTIMIZE_PY_PROTOS_FLAG no)
+}
+
# tag:proto tag:python-specific
macro _PROTO_PLUGIN_ARGS_BASE(Name, Tool, OutParm...) {
.CMD=--plugin=protoc-gen-${Name}=\${tool:"$Tool"} --${Name}_out=$OutParm$ARCADIA_BUILD_ROOT/\$PROTO_NAMESPACE
@@ -985,19 +985,19 @@ macro _JAVA_EVLOG_CMD(File) {
}
# tag:sanitize
-RUN_NO_SANITIZE=$YMAKE_PYTHON ${input:"build/scripts/run_tool.py"} --
+RUN_NO_SANITIZE=$YMAKE_PYTHON ${input:"build/scripts/run_tool.py"} --
# tag:sanitize
when ($IS_CROSS_SANITIZE) {
RUN_NO_SANITIZE=
}
-YIELD=$YMAKE_PYTHON ${input:"build/scripts/yield_line.py"} -- ${BINDIR}/__args
-XARGS=$YMAKE_PYTHON ${input:"build/scripts/xargs.py"} -- ${BINDIR}/__args
+YIELD=$YMAKE_PYTHON ${input:"build/scripts/yield_line.py"} -- ${BINDIR}/__args
+XARGS=$YMAKE_PYTHON ${input:"build/scripts/xargs.py"} -- ${BINDIR}/__args
-RESPFILE_CMD=$YMAKE_PYTHON ${input:"build/scripts/writer.py"}
+RESPFILE_CMD=$YMAKE_PYTHON ${input:"build/scripts/writer.py"}
-FS_TOOLS=$YMAKE_PYTHON ${input:"build/scripts/fs_tools.py"}
+FS_TOOLS=$YMAKE_PYTHON ${input:"build/scripts/fs_tools.py"}
COPY_CMD=$FS_TOOLS copy
LINK_OR_COPY_CMD=$FS_TOOLS link_or_copy
@@ -1005,11 +1005,11 @@ REMOVE_FILE=$FS_TOOLS remove
MOVE_FILE=$FS_TOOLS rename
# tag:allocator tag:windows-specific
-MSVC_DYNAMICBASE=/DYNAMICBASE
+MSVC_DYNAMICBASE=/DYNAMICBASE
when ($ALLOCATOR == "LF") {
MSVC_DYNAMICBASE=/DYNAMICBASE:NO
}
-
+
# tag:sanitize
SANITIZER_CFLAGS=
@@ -6903,11 +6903,11 @@ macro NEED_CHECK(Flags...) {
### @usage: NO_NEED_CHECK()
###
-### Commits to the project marked with this macro will not be affected by higher-level NEED_CHECK macro.
-macro NO_NEED_CHECK(Flags...) {
- ENABLE(UNUSED_MACRO)
-}
-
+### Commits to the project marked with this macro will not be affected by higher-level NEED_CHECK macro.
+macro NO_NEED_CHECK(Flags...) {
+ ENABLE(UNUSED_MACRO)
+}
+
# tag:deprecated
### @usage: NEED_REVIEW() # deprecated
###
@@ -7261,7 +7261,7 @@ TOUCH_UNIT=$YMAKE_PYTHON ${input:"build/scripts/touch.py"} ${kv;hide:"p UN"} ${k
TOUCH_PACKAGE=$YMAKE_PYTHON ${input:"build/scripts/touch.py"} ${kv;hide:"pc light-red"} $TARGET && $YMAKE_PYTHON ${input:"build/scripts/copy_to_dir.py"} --dest-dir $BINDIR --build-root $ARCADIA_BUILD_ROOT $PACKED_PACKAGE_ARGS $SRCS_GLOBAL $PEERS
_P_PK=${kv;hide:"p PK"}
TOUCH_PACKAGE_MF=$GENERATE_MF && $TOUCH_PACKAGE $_P_PK
-TOUCH_JAVA_UNIT=$YMAKE_PYTHON ${input:"build/scripts/touch.py"} ${kv;hide:"java $CURDIR"} $TARGET
+TOUCH_JAVA_UNIT=$YMAKE_PYTHON ${input:"build/scripts/touch.py"} ${kv;hide:"java $CURDIR"} $TARGET
NO_CHECK_IMPORTS_FOR_VALUE=None
### @usage: NO_CHECK_IMPORTS([patterns])
diff --git a/build/ymake_conf.py b/build/ymake_conf.py
index 30219eb85e..1cd05c8a7d 100755
--- a/build/ymake_conf.py
+++ b/build/ymake_conf.py
@@ -232,8 +232,8 @@ def which(prog):
return p
return None
-
-
+
+
def get_stdout(command):
stdout, code = get_stdout_and_code(command)
return stdout if code == 0 else None
@@ -719,10 +719,10 @@ class YMake(object):
def print_core_conf(self):
emit('YMAKE_YNDEXER_IGNORE_BUILD_ROOT', 'yes')
print('@import "${CONF_ROOT}/ymake.core.conf"')
-
+
def print_settings(self):
emit_with_ignore_comment('ARCADIA_ROOT', self.arcadia.root)
-
+
@staticmethod
def _find_conf(conf_file):
script_dir = os.path.dirname(__file__)
@@ -2297,7 +2297,7 @@ class MSVC(object):
self.build = build
self.tc = tc
-
+
class MSVCToolchain(MSVC, Toolchain):
def __init__(self, tc, build):
@@ -2333,46 +2333,46 @@ class MSVCCompiler(MSVC, Compiler):
def __init__(self, tc, build):
Compiler.__init__(self, tc, 'MSVC')
MSVC.__init__(self, tc, build)
-
+
def print_compiler(self):
super(MSVCCompiler, self).print_compiler()
-
+
target = self.build.target
win32_winnt = self.WIN32_WINNT.Windows7
- warns_enabled = [
+ warns_enabled = [
4018, # 'expression' : signed/unsigned mismatch
4265, # 'class' : class has virtual functions, but destructor is not virtual
4296, # 'operator' : expression is always false
4431, # missing type specifier - int assumed
- ]
+ ]
warns_as_error = [
4013, # 'function' undefined; assuming extern returning int
]
- warns_disabled = [
- 4127, # conditional expression is constant
- 4200, # nonstandard extension used : zero-sized array in struct/union
- 4201, # nonstandard extension used : nameless struct/union
- 4351, # elements of array will be default initialized
- 4355, # 'this' : used in base member initializer list
+ warns_disabled = [
+ 4127, # conditional expression is constant
+ 4200, # nonstandard extension used : zero-sized array in struct/union
+ 4201, # nonstandard extension used : nameless struct/union
+ 4351, # elements of array will be default initialized
+ 4355, # 'this' : used in base member initializer list
4503, # decorated name length exceeded, name was truncated
- 4510, # default constructor could not be generated
- 4511, # copy constructor could not be generated
- 4512, # assignment operator could not be generated
- 4554, # check operator precedence for possible error; use parentheses to clarify precedence
- 4610, # 'object' can never be instantiated - user defined constructor required
- 4706, # assignment within conditional expression
- 4800, # forcing value to bool 'true' or 'false' (performance warning)
- 4996, # The POSIX name for this item is deprecated
- 4714, # function marked as __forceinline not inlined
- 4197, # 'TAtomic' : top-level volatile in cast is ignored
- 4245, # 'initializing' : conversion from 'int' to 'ui32', signed/unsigned mismatch
+ 4510, # default constructor could not be generated
+ 4511, # copy constructor could not be generated
+ 4512, # assignment operator could not be generated
+ 4554, # check operator precedence for possible error; use parentheses to clarify precedence
+ 4610, # 'object' can never be instantiated - user defined constructor required
+ 4706, # assignment within conditional expression
+ 4800, # forcing value to bool 'true' or 'false' (performance warning)
+ 4996, # The POSIX name for this item is deprecated
+ 4714, # function marked as __forceinline not inlined
+ 4197, # 'TAtomic' : top-level volatile in cast is ignored
+ 4245, # 'initializing' : conversion from 'int' to 'ui32', signed/unsigned mismatch
4324, # 'ystd::function<void (uint8_t *)>': structure was padded due to alignment specifier
5033, # 'register' is no longer a supported storage class
- ]
-
- defines = [
+ ]
+
+ defines = [
'/DARCADIA_ROOT=${ARCADIA_ROOT}',
'/DARCADIA_BUILD_ROOT=${ARCADIA_BUILD_ROOT}',
'/DFAKEID=$CPP_FAKEID',
@@ -2388,8 +2388,8 @@ class MSVCCompiler(MSVC, Compiler):
'/D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES',
'/DNOMINMAX',
'/DWIN32_LEAN_AND_MEAN',
- ]
-
+ ]
+
cxx_defines = [
# Use builtin offsetof implementation
# instead of a crutcy macro defined in ucrt/stddef.h.
@@ -2420,12 +2420,12 @@ class MSVCCompiler(MSVC, Compiler):
'/permissive-'
]
flags += self.tc.arch_opt
-
+
c_warnings = ['/we{}'.format(code) for code in warns_as_error]
c_warnings += ['/w1{}'.format(code) for code in warns_enabled]
c_warnings += ['/wd{}'.format(code) for code in warns_disabled]
cxx_warnings = []
-
+
flags_debug = ['/Ob0', '/Od', '/D_DEBUG']
flags_release = ['/Ox', '/Ob2', '/Oi', '/DNDEBUG']
@@ -2435,7 +2435,7 @@ class MSVCCompiler(MSVC, Compiler):
# https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
"/Zc:__cplusplus"
]
-
+
if self.tc.use_clang:
flags += [
# Allow <windows.h> to be included via <Windows.h> in case-sensitive file-systems.
@@ -2511,7 +2511,7 @@ class MSVCCompiler(MSVC, Compiler):
masm_io = '-o ${output;suf=${OBJECT_SUF}:SRC} ${input;msvs_source:SRC}'
else:
masm_io = '/nologo /c /Fo${output;suf=${OBJECT_SUF}:SRC} ${input;msvs_source:SRC}'
-
+
emit('OBJ_CROSS_SUF', '$OBJ_SUF')
emit('OBJECT_SUF', '$OBJ_SUF.obj')
emit('WIN32_WINNT', '{value}'.format(value=win32_winnt))
@@ -2546,9 +2546,9 @@ class MSVCCompiler(MSVC, Compiler):
if not self.tc.use_clang:
flags_msvs_only += ['/FD', '/MP']
debug_info_flags = '/Zi /FS'
- else:
+ else:
debug_info_flags = '/Z7'
-
+
if self.tc.use_clang:
emit('CLANG_CL', 'yes')
if self.tc.ide_msvs:
@@ -2573,11 +2573,11 @@ class MSVCCompiler(MSVC, Compiler):
emit('CFLAGS_PER_TYPE', '$CFLAGS_DEBUG')
if self.build.is_ide:
emit('CFLAGS_PER_TYPE', '@[debug|$CFLAGS_DEBUG]@[release|$CFLAGS_RELEASE]')
-
+
append('CFLAGS', flags, flags_msvs_only, '$CFLAGS_PER_TYPE', '$DEBUG_INFO_FLAGS', '$C_WARNING_OPTS', '$C_DEFINES', '$USER_CFLAGS', '$USER_CFLAGS_GLOBAL')
append('CXXFLAGS', '$CFLAGS', '/std:' + self.tc.cxx_std, cxx_flags, cxx_defines, '$CXX_WARNING_OPTS', '$USER_CXXFLAGS', '$USER_CXXFLAGS_GLOBAL')
append('CONLYFLAGS', flags_c_only, '$USER_CONLYFLAGS', '$USER_CONLYFLAGS_GLOBAL')
-
+
append('BC_CFLAGS', '$CFLAGS')
append('BC_CXXFLAGS', '$BC_CFLAGS', '$CXXFLAGS')
@@ -2603,14 +2603,14 @@ class MSVCCompiler(MSVC, Compiler):
emit('SFDL_FLAG', ['/E', '/C', '/P', '/TP', '/Fi$SFDL_TMP_OUT'])
emit('WERROR_FLAG', '/WX')
emit('WERROR_MODE', self.tc.werror_mode)
-
+
if not self.tc.under_wine:
emit('CL_WRAPPER', '${YMAKE_PYTHON}', '${input:"build/scripts/fix_msvc_output.py"}', 'cl')
emit('ML_WRAPPER', '${YMAKE_PYTHON}', '${input:"build/scripts/fix_msvc_output.py"}', 'ml')
- else:
+ else:
emit('CL_WRAPPER')
emit('ML_WRAPPER')
-
+
emit('_SRC_C_NODEPS_CMD',
'${TOOLCHAIN_ENV} ${CL_WRAPPER} ${C_COMPILER} /c /Fo${OUTFILE} ${SRC} ${EXTRA_C_FLAGS} ${pre=/I :INC} '
'${CFLAGS} ${requirements;hide:CC_REQUIREMENTS} ${hide;kv:"soe"} ${hide;kv:"p CC"} ${hide;kv:"pc yellow"}'
@@ -2651,32 +2651,32 @@ class MSVCLinker(MSVC, Linker):
(target.is_armv7, 'arm'),
))
- libpaths = []
+ libpaths = []
if not self.tc.ide_msvs:
if self.tc.kit_libs:
libpaths.extend([os.path.join(self.tc.kit_libs, name, arch) for name in ('um', 'ucrt')])
libpaths.append(os.path.join(self.tc.vc_root, 'lib', arch))
- ignored_errors = [
- 4221
- ]
+ ignored_errors = [
+ 4221
+ ]
flag_machine = '/MACHINE:{}'.format(arch.upper())
- flags_ignore = ['/IGNORE:{}'.format(code) for code in ignored_errors]
-
- flags_common = ['/NOLOGO', '/ERRORREPORT:PROMPT', '/SUBSYSTEM:CONSOLE', '/TLBID:1', '$MSVC_DYNAMICBASE', '/NXCOMPAT']
- flags_common += flags_ignore
+ flags_ignore = ['/IGNORE:{}'.format(code) for code in ignored_errors]
+
+ flags_common = ['/NOLOGO', '/ERRORREPORT:PROMPT', '/SUBSYSTEM:CONSOLE', '/TLBID:1', '$MSVC_DYNAMICBASE', '/NXCOMPAT']
+ flags_common += flags_ignore
flags_common += [flag_machine]
-
- flags_debug_only = []
- flags_release_only = []
-
+
+ flags_debug_only = []
+ flags_release_only = []
+
if self.tc.ide_msvs:
- flags_common += ['/INCREMENTAL']
- else:
- flags_common += ['/INCREMENTAL:NO']
-
+ flags_common += ['/INCREMENTAL']
+ else:
+ flags_common += ['/INCREMENTAL:NO']
+
if self.tc.use_clang:
flags_debug_only.append('/STACK:4194304')
@@ -2687,14 +2687,14 @@ class MSVCLinker(MSVC, Linker):
else:
# No FASTLINK for ya make, because resulting PDB would require .obj files (build_root's) to persist
flags_common.append('/DEBUG')
-
+
if not self.tc.ide_msvs:
- flags_common += ['/LIBPATH:"{}"'.format(path) for path in libpaths]
-
+ flags_common += ['/LIBPATH:"{}"'.format(path) for path in libpaths]
+
link_flags_debug = flags_common + flags_debug_only
link_flags_release = flags_common + flags_release_only
link_flags_lib = flags_ignore + [flag_machine]
-
+
stdlibs = [
'advapi32.lib',
'comdlg32.lib',
@@ -2702,10 +2702,10 @@ class MSVCLinker(MSVC, Linker):
'dnsapi.lib',
'gdi32.lib',
'iphlpapi.lib',
- 'kernel32.lib',
+ 'kernel32.lib',
'mswsock.lib',
- 'ole32.lib',
- 'oleaut32.lib',
+ 'ole32.lib',
+ 'oleaut32.lib',
'psapi.lib',
'rpcrt4.lib',
'secur32.lib',
@@ -2713,13 +2713,13 @@ class MSVCLinker(MSVC, Linker):
'shlwapi.lib',
'user32.lib',
'userenv.lib',
- 'uuid.lib',
+ 'uuid.lib',
'version.lib',
'winmm.lib',
'winspool.lib',
'ws2_32.lib',
- ]
-
+ ]
+
emit('LINK_LIB_CMD', linker_lib)
emit('LINK_EXE_CMD', linker)
emit('LINK_LIB_FLAGS', link_flags_lib)
@@ -2729,16 +2729,16 @@ class MSVCLinker(MSVC, Linker):
emit('LDFLAGS_GLOBAL', '')
emit('LDFLAGS', '')
emit('OBJADDE', '')
-
+
if self.build.is_release:
emit('LINK_EXE_FLAGS_PER_TYPE', '$LINK_EXE_FLAGS_RELEASE')
if self.build.is_debug:
emit('LINK_EXE_FLAGS_PER_TYPE', '$LINK_EXE_FLAGS_DEBUG')
if self.build.is_ide and self.tc.ide_msvs:
emit('LINK_EXE_FLAGS_PER_TYPE', '@[debug|$LINK_EXE_FLAGS_DEBUG]@[release|$LINK_EXE_FLAGS_RELEASE]')
-
+
emit('LINK_EXE_FLAGS', '$LINK_EXE_FLAGS_PER_TYPE')
-
+
emit('LINK_IMPLIB_VALUE')
emit('LINK_IMPLIB', '/IMPLIB:${output;noext;rootrel;pre=$MODULE_PREFIX:REALPRJNAME.lib}')
if is_negative_str(preset('NO_DEBUGINFO', 'no')):
@@ -2749,10 +2749,10 @@ class MSVCLinker(MSVC, Linker):
if not self.tc.under_wine:
emit('LIB_WRAPPER', '${YMAKE_PYTHON}', '${input:"build/scripts/fix_msvc_output.py"}', 'lib')
emit('LINK_WRAPPER', '${YMAKE_PYTHON}', '${input:"build/scripts/fix_msvc_output.py"}', 'link')
- else:
+ else:
emit('LIB_WRAPPER')
emit('LINK_WRAPPER')
-
+
emit('LINK_WRAPPER_DYNLIB', '${YMAKE_PYTHON}', '${input:"build/scripts/link_dyn_lib.py"}', '--arch', 'WINDOWS', '--target', '$TARGET')
emit_big('''
EXPORTS_VALUE=
@@ -2760,7 +2760,7 @@ class MSVCLinker(MSVC, Linker):
LINK_IMPLIB_VALUE=$LINK_IMPLIB
EXPORTS_VALUE=/DEF:${input:EXPORTS_FILE}
}''')
-
+
emit("GENERATE_MF_CMD", '$YMAKE_PYTHON ${input:"build/scripts/generate_mf.py"}',
'--build-root $ARCADIA_BUILD_ROOT --module-name $REALPRJNAME -o ${output;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX.mf:REALPRJNAME}',
'-t $MODULE_TYPE --ya-start-command-file -Ya,lics $LICENSE_NAMES -Ya,peers ${rootrel:PEERS} -Ya,credits ${input:CREDITS_TEXTS_FILE} $CREDITS_FLAGS --ya-end-command-file',