aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authortekireeva <tekireeva@yandex-team.ru>2022-02-10 16:51:38 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:51:38 +0300
commit569c3cefb9e9785ef25d8a067c01ea66ffa8deef (patch)
treeab7fbbf3253d4c0e2793218f09378908beb025fb /build
parente9d6dd2e511aaaec9e6182b7ae9327dce82a051d (diff)
downloadydb-569c3cefb9e9785ef25d8a067c01ea66ffa8deef.tar.gz
Restoring authorship annotation for <tekireeva@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'build')
-rw-r--r--build/plugins/pybuild.py54
-rw-r--r--build/plugins/res.py10
-rw-r--r--build/plugins/rodata.py2
-rw-r--r--build/plugins/swig.py4
-rw-r--r--build/scripts/fix_msvc_output.py10
-rw-r--r--build/scripts/fs_tools.py8
-rw-r--r--build/scripts/gen_join_srcs.py8
-rw-r--r--build/scripts/go_tool.py16
-rw-r--r--build/scripts/link_dyn_lib.py12
-rw-r--r--build/scripts/link_exe.py22
-rw-r--r--build/scripts/link_fat_obj.py10
-rw-r--r--build/scripts/process_command_files.py66
-rw-r--r--build/scripts/process_whole_archive_option.py340
-rw-r--r--build/scripts/run_msvc_wine.py104
-rw-r--r--build/ymake.core.conf322
-rwxr-xr-xbuild/ymake_conf.py54
16 files changed, 521 insertions, 521 deletions
diff --git a/build/plugins/pybuild.py b/build/plugins/pybuild.py
index 91c2997f23..f32a2d39a0 100644
--- a/build/plugins/pybuild.py
+++ b/build/plugins/pybuild.py
@@ -507,8 +507,8 @@ def onpy_srcs(unit, *args):
for py_suf in unit.get("PY_PROTO_SUFFIXES").split()
])
- if optimize_proto and need_gazetteer_peerdir:
- unit.onpeerdir(['kernel/gazetteer/proto'])
+ if optimize_proto and need_gazetteer_peerdir:
+ unit.onpeerdir(['kernel/gazetteer/proto'])
if evs:
unit.onpeerdir([cpp_runtime_path])
@@ -621,28 +621,28 @@ def onpy_constructor(unit, arg):
else:
arg[arg.index(':')] = '='
unit.onresource(['-', 'py/constructors/{}'.format(arg)])
-
-def onpy_enums_serialization(unit, *args):
- ns = ''
- args = iter(args)
- for arg in args:
- # Namespace directives.
- if arg == 'NAMESPACE':
- ns = next(args)
- else:
- unit.on_py_enum_serialization_to_json(arg)
- unit.on_py_enum_serialization_to_py(arg)
- filename = arg.rsplit('.', 1)[0] + '.py'
- if len(ns) != 0:
- onpy_srcs(unit, 'NAMESPACE', ns, filename)
- else:
- onpy_srcs(unit, filename)
-
-def oncpp_enums_serialization(unit, *args):
- args = iter(args)
- for arg in args:
- # Namespace directives.
- if arg == 'NAMESPACE':
- next(args)
- else:
- unit.ongenerate_enum_serialization_with_header(arg)
+
+def onpy_enums_serialization(unit, *args):
+ ns = ''
+ args = iter(args)
+ for arg in args:
+ # Namespace directives.
+ if arg == 'NAMESPACE':
+ ns = next(args)
+ else:
+ unit.on_py_enum_serialization_to_json(arg)
+ unit.on_py_enum_serialization_to_py(arg)
+ filename = arg.rsplit('.', 1)[0] + '.py'
+ if len(ns) != 0:
+ onpy_srcs(unit, 'NAMESPACE', ns, filename)
+ else:
+ onpy_srcs(unit, filename)
+
+def oncpp_enums_serialization(unit, *args):
+ args = iter(args)
+ for arg in args:
+ # Namespace directives.
+ if arg == 'NAMESPACE':
+ next(args)
+ else:
+ unit.ongenerate_enum_serialization_with_header(arg)
diff --git a/build/plugins/res.py b/build/plugins/res.py
index 0c4e894787..a937caba81 100644
--- a/build/plugins/res.py
+++ b/build/plugins/res.py
@@ -78,11 +78,11 @@ def onresource_files(unit, *args):
dest = None
res = []
first = 0
-
- if args and not unit.enabled('_GO_MODULE'):
- # GO_RESOURCE currently doesn't support DONT_PARSE
- res.append('DONT_PARSE')
-
+
+ if args and not unit.enabled('_GO_MODULE'):
+ # GO_RESOURCE currently doesn't support DONT_PARSE
+ res.append('DONT_PARSE')
+
if args and args[0] == 'DONT_PARSE':
first = 1
diff --git a/build/plugins/rodata.py b/build/plugins/rodata.py
index 4f15c2c4c8..3ecb0f9a83 100644
--- a/build/plugins/rodata.py
+++ b/build/plugins/rodata.py
@@ -75,7 +75,7 @@ class ROData(iw.CustomCommand):
return common.make_tuples([common.tobuilddir(common.stripext(self._path)) + '.o'])
def requested_vars(self):
- return [('includes', '_ASM__INCLUDE')]
+ return [('includes', '_ASM__INCLUDE')]
def run(self, extra_args, binary):
in_file = self.resolve_path(common.get(self.input, 0))
diff --git a/build/plugins/swig.py b/build/plugins/swig.py
index e48e1f9e8e..32a37204a6 100644
--- a/build/plugins/swig.py
+++ b/build/plugins/swig.py
@@ -43,9 +43,9 @@ class Swig(iw.CustomCommand):
elif self._swig_lang in ['jni_cpp', 'jni_java']:
lang_specific_incl_dir = 'java'
incl_dirs = [
- "FOR", "swig",
+ "FOR", "swig",
posixpath.join(self._library_dir, lang_specific_incl_dir),
- "FOR", "swig",
+ "FOR", "swig",
self._library_dir
]
self._incl_dirs = ['$S', '$B'] + [posixpath.join('$S', d) for d in incl_dirs]
diff --git a/build/scripts/fix_msvc_output.py b/build/scripts/fix_msvc_output.py
index 7248434b5b..b2e7d38307 100644
--- a/build/scripts/fix_msvc_output.py
+++ b/build/scripts/fix_msvc_output.py
@@ -1,8 +1,8 @@
import subprocess
import sys
-import process_command_files as pcf
-import process_whole_archive_option as pwa
+import process_command_files as pcf
+import process_whole_archive_option as pwa
def out2err(cmd):
return subprocess.Popen(cmd, stdout=sys.stderr).wait()
@@ -32,9 +32,9 @@ def out2err_cut_first_line(cmd):
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)
+ 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
diff --git a/build/scripts/fs_tools.py b/build/scripts/fs_tools.py
index 1a999f2cf0..dec4c349c8 100644
--- a/build/scripts/fs_tools.py
+++ b/build/scripts/fs_tools.py
@@ -6,9 +6,9 @@ import sys
import shutil
import errno
-import process_command_files as pcf
-
-
+import process_command_files as pcf
+
+
def link_or_copy(src, dst):
try:
if platform.system().lower() == 'windows':
@@ -25,7 +25,7 @@ def link_or_copy(src, dst):
if __name__ == '__main__':
mode = sys.argv[1]
- args = pcf.get_args(sys.argv[2:])
+ args = pcf.get_args(sys.argv[2:])
if mode == 'copy':
shutil.copy(args[0], args[1])
diff --git a/build/scripts/gen_join_srcs.py b/build/scripts/gen_join_srcs.py
index 0071801f90..e0c2df161a 100644
--- a/build/scripts/gen_join_srcs.py
+++ b/build/scripts/gen_join_srcs.py
@@ -1,8 +1,8 @@
import sys
-import process_command_files as pcf
+import process_command_files as pcf
+
-
with open(sys.argv[1], 'w') as f:
f.write('#if defined(__GNUC__)\n')
f.write('#pragma GCC diagnostic ignored "-Wunknown-pragmas"\n')
@@ -12,5 +12,5 @@ with open(sys.argv[1], 'w') as f:
f.write('#pragma GCC diagnostic ignored "-Wsubobject-linkage"\n')
f.write('#endif\n\n')
- for arg in pcf.iter_args(sys.argv[2:]):
- f.write('#include "' + arg + '"\n')
+ for arg in pcf.iter_args(sys.argv[2:]):
+ f.write('#include "' + arg + '"\n')
diff --git a/build/scripts/go_tool.py b/build/scripts/go_tool.py
index 43e0010dd1..c1e98b20c0 100644
--- a/build/scripts/go_tool.py
+++ b/build/scripts/go_tool.py
@@ -13,9 +13,9 @@ import threading
import six
from functools import reduce
-import process_command_files as pcf
-import process_whole_archive_option as pwa
-
+import process_command_files as pcf
+import process_whole_archive_option as pwa
+
arc_project_prefix = 'a.yandex-team.ru/'
std_lib_prefix = 'contrib/go/_std/src/'
vendor_prefix = 'vendor/'
@@ -115,9 +115,9 @@ def preprocess_args(args):
srcs.append(f)
args.srcs = srcs
- if args.extldflags:
- args.extldflags = pwa.ProcessWholeArchiveOption(args.targ_os).construct_cmd(args.extldflags)
-
+ if args.extldflags:
+ args.extldflags = pwa.ProcessWholeArchiveOption(args.targ_os).construct_cmd(args.extldflags)
+
classify_srcs(args.srcs, args)
@@ -780,7 +780,7 @@ def do_link_test(args):
if __name__ == '__main__':
- args = pcf.get_args(sys.argv[1:])
+ args = pcf.get_args(sys.argv[1:])
parser = argparse.ArgumentParser(prefix_chars='+')
parser.add_argument('++mode', choices=['dll', 'exe', 'lib', 'test'], required=True)
@@ -825,7 +825,7 @@ if __name__ == '__main__':
parser.add_argument('++debug-root-map', default=None)
parser.add_argument('++embed', action='append', nargs='*')
parser.add_argument('++embed_xtest', action='append', nargs='*')
- args = parser.parse_args(args)
+ args = parser.parse_args(args)
arc_project_prefix = args.arc_project_prefix
std_lib_prefix = args.std_lib_prefix
diff --git a/build/scripts/link_dyn_lib.py b/build/scripts/link_dyn_lib.py
index 59606145d4..23487f5c1e 100644
--- a/build/scripts/link_dyn_lib.py
+++ b/build/scripts/link_dyn_lib.py
@@ -6,9 +6,9 @@ import collections
import optparse
import pipes
-from process_whole_archive_option import ProcessWholeArchiveOption
+from process_whole_archive_option import ProcessWholeArchiveOption
+
-
def shlex_join(cmd):
# equivalent to shlex.join() in python 3
return ' '.join(
@@ -147,7 +147,7 @@ def fix_cmd(arch, musl, c):
return list(f(list(parse_export_file(fname))))
- if p.endswith('.supp'):
+ if p.endswith('.supp'):
return []
if p.endswith('.pkg.fake'):
@@ -167,8 +167,8 @@ def parse_args():
parser.add_option('--fix-elf')
parser.add_option('--linker-output')
parser.add_option('--musl', action='store_true')
- parser.add_option('--whole-archive-peers', action='append')
- parser.add_option('--whole-archive-libs', action='append')
+ parser.add_option('--whole-archive-peers', action='append')
+ parser.add_option('--whole-archive-libs', action='append')
return parser.parse_args()
@@ -179,7 +179,7 @@ if __name__ == '__main__':
assert opts.target
cmd = fix_cmd(opts.arch, opts.musl, args)
- cmd = ProcessWholeArchiveOption(opts.arch, opts.whole_archive_peers, opts.whole_archive_libs).construct_cmd(cmd)
+ cmd = ProcessWholeArchiveOption(opts.arch, opts.whole_archive_peers, opts.whole_archive_libs).construct_cmd(cmd)
if opts.linker_output:
stdout = open(opts.linker_output, 'w')
diff --git a/build/scripts/link_exe.py b/build/scripts/link_exe.py
index c4319c4cb9..f469e3b442 100644
--- a/build/scripts/link_exe.py
+++ b/build/scripts/link_exe.py
@@ -2,13 +2,13 @@ import sys
import subprocess
import optparse
-from process_whole_archive_option import ProcessWholeArchiveOption
+from process_whole_archive_option import ProcessWholeArchiveOption
+
-
def get_leaks_suppressions(cmd):
supp, newcmd = [], []
for arg in cmd:
- if arg.endswith(".supp"):
+ if arg.endswith(".supp"):
supp.append(arg)
else:
newcmd.append(arg)
@@ -22,14 +22,14 @@ def fix_cmd(musl, c):
return [i for i in c if (not musl or i not in musl_libs) and not i.endswith('.ios.interface') and not i.endswith('.pkg.fake')]
-def gen_default_suppressions(inputs, output, source_root):
+def gen_default_suppressions(inputs, output, source_root):
import collections
import os
supp_map = collections.defaultdict(set)
for filename in inputs:
sanitizer = os.path.basename(filename).split('.', 1)[0]
- with open(os.path.join(source_root, filename)) as src:
+ with open(os.path.join(source_root, filename)) as src:
for line in src:
line = line.strip()
if not line or line.startswith('#'):
@@ -49,11 +49,11 @@ def parse_args():
parser.add_option('--musl', action='store_true')
parser.add_option('--custom-step')
parser.add_option('--python')
- parser.add_option('--source-root')
- parser.add_option('--arch')
+ parser.add_option('--source-root')
+ parser.add_option('--arch')
parser.add_option('--linker-output')
- parser.add_option('--whole-archive-peers', action='append')
- parser.add_option('--whole-archive-libs', action='append')
+ parser.add_option('--whole-archive-peers', action='append')
+ parser.add_option('--whole-archive-libs', action='append')
return parser.parse_args()
@@ -61,7 +61,7 @@ if __name__ == '__main__':
opts, args = parse_args()
cmd = fix_cmd(opts.musl, args)
- cmd = ProcessWholeArchiveOption(opts.arch, opts.whole_archive_peers, opts.whole_archive_libs).construct_cmd(cmd)
+ cmd = ProcessWholeArchiveOption(opts.arch, opts.whole_archive_peers, opts.whole_archive_libs).construct_cmd(cmd)
if opts.custom_step:
assert opts.python
@@ -70,7 +70,7 @@ if __name__ == '__main__':
supp, cmd = get_leaks_suppressions(cmd)
if supp:
src_file = "default_suppressions.cpp"
- gen_default_suppressions(supp, src_file, opts.source_root)
+ gen_default_suppressions(supp, src_file, opts.source_root)
cmd += [src_file]
if opts.linker_output:
diff --git a/build/scripts/link_fat_obj.py b/build/scripts/link_fat_obj.py
index 3208362898..c189668b9e 100644
--- a/build/scripts/link_fat_obj.py
+++ b/build/scripts/link_fat_obj.py
@@ -2,8 +2,8 @@ import argparse
import subprocess
import sys
-from process_whole_archive_option import ProcessWholeArchiveOption
-
+from process_whole_archive_option import ProcessWholeArchiveOption
+
YA_ARG_PREFIX = '-Ya,'
@@ -36,7 +36,7 @@ def get_args():
def strip_suppression_files(srcs):
- return [s for s in srcs if not s.endswith('.supp')]
+ return [s for s in srcs if not s.endswith('.supp')]
def main():
@@ -52,14 +52,14 @@ def main():
# Dependencies
global_srcs = groups['global_srcs']
global_srcs = strip_suppression_files(global_srcs)
- global_srcs = ProcessWholeArchiveOption(args.arch).construct_cmd(global_srcs)
+ global_srcs = ProcessWholeArchiveOption(args.arch).construct_cmd(global_srcs)
peers = groups['peers']
# Tools
linker = groups['linker']
archiver = groups['archiver']
- do_link = linker + ['-o', obj_output, '-Wl,-r', '-nodefaultlibs', '-nostartfiles'] + global_srcs + auto_input
+ do_link = linker + ['-o', obj_output, '-Wl,-r', '-nodefaultlibs', '-nostartfiles'] + global_srcs + auto_input
do_archive = archiver + [lib_output] + peers
do_globals = None
if args.globals_lib:
diff --git a/build/scripts/process_command_files.py b/build/scripts/process_command_files.py
index 82626187de..28accfc175 100644
--- a/build/scripts/process_command_files.py
+++ b/build/scripts/process_command_files.py
@@ -1,33 +1,33 @@
-import sys
-
-
-def is_cmdfile_arg(arg):
- return arg.startswith('@')
-
-def cmdfile_path(arg):
- return arg[1:]
-
-def read_from_command_file(arg):
- with open(arg) as afile:
- return afile.read().splitlines()
-
-def skip_markers(args):
- res = []
- for arg in args:
- if arg == '--ya-start-command-file' or arg == '--ya-end-command-file':
- continue
- res.append(arg)
- return res
-
-def iter_args(args):
- for arg in args:
- if not is_cmdfile_arg(arg):
- if arg == '--ya-start-command-file' or arg == '--ya-end-command-file':
- continue
- yield arg
- else:
- for cmdfile_arg in read_from_command_file(cmdfile_path(arg)):
- yield cmdfile_arg
-
-def get_args(args):
- return list(iter_args(args))
+import sys
+
+
+def is_cmdfile_arg(arg):
+ return arg.startswith('@')
+
+def cmdfile_path(arg):
+ return arg[1:]
+
+def read_from_command_file(arg):
+ with open(arg) as afile:
+ return afile.read().splitlines()
+
+def skip_markers(args):
+ res = []
+ for arg in args:
+ if arg == '--ya-start-command-file' or arg == '--ya-end-command-file':
+ continue
+ res.append(arg)
+ return res
+
+def iter_args(args):
+ for arg in args:
+ if not is_cmdfile_arg(arg):
+ if arg == '--ya-start-command-file' or arg == '--ya-end-command-file':
+ continue
+ yield arg
+ else:
+ for cmdfile_arg in read_from_command_file(cmdfile_path(arg)):
+ yield cmdfile_arg
+
+def get_args(args):
+ return list(iter_args(args))
diff --git a/build/scripts/process_whole_archive_option.py b/build/scripts/process_whole_archive_option.py
index 017706b232..a9c4ef676a 100644
--- a/build/scripts/process_whole_archive_option.py
+++ b/build/scripts/process_whole_archive_option.py
@@ -1,176 +1,176 @@
-import os
-import sys
-
-import process_command_files as pcf
-
-
-class ProcessWholeArchiveOption():
- def __init__(self, arch, peers=None, libs=None):
- self.arch = arch.upper()
- self.peers = { x : 0 for x in peers } if peers else None
- self.libs = { x : 0 for x in libs } if libs else None
- self.start_wa_marker = '--start-wa'
- self.end_wa_marker = '--end-wa'
-
+import os
+import sys
+
+import process_command_files as pcf
+
+
+class ProcessWholeArchiveOption():
+ def __init__(self, arch, peers=None, libs=None):
+ self.arch = arch.upper()
+ self.peers = { x : 0 for x in peers } if peers else None
+ self.libs = { x : 0 for x in libs } if libs else None
+ self.start_wa_marker = '--start-wa'
+ self.end_wa_marker = '--end-wa'
+
def _match_peer_lib(self, arg, ext):
- key = None
+ key = None
if arg.endswith(ext):
- key = os.path.dirname(arg)
- return key if key and self.peers and key in self.peers else None
-
- def _match_lib(self, arg):
- return arg if self.libs and arg in self.libs else None
-
+ key = os.path.dirname(arg)
+ return key if key and self.peers and key in self.peers else None
+
+ def _match_lib(self, arg):
+ return arg if self.libs and arg in self.libs else None
+
def _process_arg(self, arg, ext='.a'):
peer_key = self._match_peer_lib(arg, ext)
- lib_key = self._match_lib(arg)
- if peer_key:
- self.peers[peer_key] += 1
- if lib_key:
- self.libs[lib_key] += 1
- return peer_key if peer_key else lib_key
-
- def _check_peers(self):
- if self.peers:
- for key, value in self.peers.items():
- assert value > 0, '"{}" specified in WHOLE_ARCHIVE() macro is not used on link command'.format(key)
-
- def _construct_cmd_apple(self, args):
- force_load_flag = '-Wl,-force_load,'
- is_inside_wa_markers = False
-
- cmd = []
- for arg in args:
- if arg.startswith(force_load_flag):
- cmd.append(arg)
- elif arg == self.start_wa_marker:
- is_inside_wa_markers = True
- elif arg == self.end_wa_marker:
- is_inside_wa_markers = False
- elif is_inside_wa_markers:
- cmd.append(force_load_flag + arg)
- else:
- key = self._process_arg(arg)
- cmd.append(force_load_flag + arg if key else arg)
-
- self._check_peers()
-
- return cmd
-
- def _construct_cmd_win(self, args):
- whole_archive_prefix = '/WHOLEARCHIVE:'
- is_inside_wa_markers = False
-
- def add_prefix(arg, need_check_peers_and_libs):
+ lib_key = self._match_lib(arg)
+ if peer_key:
+ self.peers[peer_key] += 1
+ if lib_key:
+ self.libs[lib_key] += 1
+ return peer_key if peer_key else lib_key
+
+ def _check_peers(self):
+ if self.peers:
+ for key, value in self.peers.items():
+ assert value > 0, '"{}" specified in WHOLE_ARCHIVE() macro is not used on link command'.format(key)
+
+ def _construct_cmd_apple(self, args):
+ force_load_flag = '-Wl,-force_load,'
+ is_inside_wa_markers = False
+
+ cmd = []
+ for arg in args:
+ if arg.startswith(force_load_flag):
+ cmd.append(arg)
+ elif arg == self.start_wa_marker:
+ is_inside_wa_markers = True
+ elif arg == self.end_wa_marker:
+ is_inside_wa_markers = False
+ elif is_inside_wa_markers:
+ cmd.append(force_load_flag + arg)
+ else:
+ key = self._process_arg(arg)
+ cmd.append(force_load_flag + arg if key else arg)
+
+ self._check_peers()
+
+ return cmd
+
+ def _construct_cmd_win(self, args):
+ whole_archive_prefix = '/WHOLEARCHIVE:'
+ is_inside_wa_markers = False
+
+ def add_prefix(arg, need_check_peers_and_libs):
key = self._process_arg(arg, '.lib') if need_check_peers_and_libs else arg
- return whole_archive_prefix + arg if key else arg
-
- def add_whole_archive_prefix(arg, need_check_peers_and_libs):
- if not pcf.is_cmdfile_arg(arg):
- return add_prefix(arg, need_check_peers_and_libs)
-
- cmd_file_path = pcf.cmdfile_path(arg)
- cf_args = pcf.read_from_command_file(cmd_file_path)
- with open(cmd_file_path, 'w') as afile:
- for cf_arg in cf_args:
- afile.write(add_prefix(cf_arg, need_check_peers_and_libs) + "\n")
- return arg
-
- cmd = []
- for arg in args:
- if arg == self.start_wa_marker:
- is_inside_wa_markers = True
- elif arg == self.end_wa_marker:
- is_inside_wa_markers = False
- elif is_inside_wa_markers:
- cmd.append(add_whole_archive_prefix(arg, False))
- continue
- elif self.peers or self.libs:
- cmd.append(add_whole_archive_prefix(arg, True))
- else:
- cmd.append(arg)
-
- self._check_peers()
-
- return cmd
-
- def _construct_cmd_linux(self, args):
- whole_archive_flag = '-Wl,--whole-archive'
- no_whole_archive_flag = '-Wl,--no-whole-archive'
-
- def replace_markers(arg):
- if arg == self.start_wa_marker:
- return whole_archive_flag
- if arg == self.end_wa_marker:
- return no_whole_archive_flag
- return arg
-
- args = [replace_markers(arg) for arg in args]
-
- cmd = []
- is_inside_whole_archive = False
- is_whole_archive = False
- # We are trying not to create excessive sequences of consecutive flags
- # -Wl,--no-whole-archive -Wl,--whole-archive ('externally' specified
- # flags -Wl,--[no-]whole-archive are not taken for consideration in this
- # optimization intentionally)
- for arg in args:
- if arg == whole_archive_flag:
- is_inside_whole_archive = True
- is_whole_archive = False
- elif arg == no_whole_archive_flag:
- is_inside_whole_archive = False
- is_whole_archive = False
- else:
- key = self._process_arg(arg)
- if not is_inside_whole_archive:
- if key:
- if not is_whole_archive:
- cmd.append(whole_archive_flag)
- is_whole_archive = True
- elif is_whole_archive:
- cmd.append(no_whole_archive_flag)
- is_whole_archive = False
-
- cmd.append(arg)
-
- if is_whole_archive:
- cmd.append(no_whole_archive_flag)
-
- self._check_peers()
-
- return cmd
-
- def construct_cmd(self, args):
+ return whole_archive_prefix + arg if key else arg
+
+ def add_whole_archive_prefix(arg, need_check_peers_and_libs):
+ if not pcf.is_cmdfile_arg(arg):
+ return add_prefix(arg, need_check_peers_and_libs)
+
+ cmd_file_path = pcf.cmdfile_path(arg)
+ cf_args = pcf.read_from_command_file(cmd_file_path)
+ with open(cmd_file_path, 'w') as afile:
+ for cf_arg in cf_args:
+ afile.write(add_prefix(cf_arg, need_check_peers_and_libs) + "\n")
+ return arg
+
+ cmd = []
+ for arg in args:
+ if arg == self.start_wa_marker:
+ is_inside_wa_markers = True
+ elif arg == self.end_wa_marker:
+ is_inside_wa_markers = False
+ elif is_inside_wa_markers:
+ cmd.append(add_whole_archive_prefix(arg, False))
+ continue
+ elif self.peers or self.libs:
+ cmd.append(add_whole_archive_prefix(arg, True))
+ else:
+ cmd.append(arg)
+
+ self._check_peers()
+
+ return cmd
+
+ def _construct_cmd_linux(self, args):
+ whole_archive_flag = '-Wl,--whole-archive'
+ no_whole_archive_flag = '-Wl,--no-whole-archive'
+
+ def replace_markers(arg):
+ if arg == self.start_wa_marker:
+ return whole_archive_flag
+ if arg == self.end_wa_marker:
+ return no_whole_archive_flag
+ return arg
+
+ args = [replace_markers(arg) for arg in args]
+
+ cmd = []
+ is_inside_whole_archive = False
+ is_whole_archive = False
+ # We are trying not to create excessive sequences of consecutive flags
+ # -Wl,--no-whole-archive -Wl,--whole-archive ('externally' specified
+ # flags -Wl,--[no-]whole-archive are not taken for consideration in this
+ # optimization intentionally)
+ for arg in args:
+ if arg == whole_archive_flag:
+ is_inside_whole_archive = True
+ is_whole_archive = False
+ elif arg == no_whole_archive_flag:
+ is_inside_whole_archive = False
+ is_whole_archive = False
+ else:
+ key = self._process_arg(arg)
+ if not is_inside_whole_archive:
+ if key:
+ if not is_whole_archive:
+ cmd.append(whole_archive_flag)
+ is_whole_archive = True
+ elif is_whole_archive:
+ cmd.append(no_whole_archive_flag)
+ is_whole_archive = False
+
+ cmd.append(arg)
+
+ if is_whole_archive:
+ cmd.append(no_whole_archive_flag)
+
+ self._check_peers()
+
+ return cmd
+
+ def construct_cmd(self, args):
if self.arch in ('DARWIN', 'IOS', 'IOSSIM'):
- return self._construct_cmd_apple(args)
-
- if self.arch == 'WINDOWS':
- return self._construct_cmd_win(args)
-
- return self._construct_cmd_linux(args)
-
-
-def get_whole_archive_peers_and_libs(args):
- remaining_args = []
- peers = []
- libs = []
- peers_flag = '--whole-archive-peers'
- libs_flag = '--whole-archive-libs'
-
- next_is_peer = False
- next_is_lib = False
- for arg in args:
- if arg == peers_flag:
- next_is_peer = True
- elif arg == libs_flag:
- next_is_lib = True
- elif next_is_peer:
- peers.append(arg)
- next_is_peer = False
- elif next_is_lib:
- libs.append(arg)
- next_is_lib = False
- else:
- remaining_args.append(arg)
- return remaining_args, peers, libs
+ return self._construct_cmd_apple(args)
+
+ if self.arch == 'WINDOWS':
+ return self._construct_cmd_win(args)
+
+ return self._construct_cmd_linux(args)
+
+
+def get_whole_archive_peers_and_libs(args):
+ remaining_args = []
+ peers = []
+ libs = []
+ peers_flag = '--whole-archive-peers'
+ libs_flag = '--whole-archive-libs'
+
+ next_is_peer = False
+ next_is_lib = False
+ for arg in args:
+ if arg == peers_flag:
+ next_is_peer = True
+ elif arg == libs_flag:
+ next_is_lib = True
+ elif next_is_peer:
+ peers.append(arg)
+ next_is_peer = False
+ elif next_is_lib:
+ libs.append(arg)
+ next_is_lib = False
+ else:
+ remaining_args.append(arg)
+ return remaining_args, peers, libs
diff --git a/build/scripts/run_msvc_wine.py b/build/scripts/run_msvc_wine.py
index 5aadae6a45..439d1f8831 100644
--- a/build/scripts/run_msvc_wine.py
+++ b/build/scripts/run_msvc_wine.py
@@ -8,10 +8,10 @@ import json
import argparse
import errno
-import process_command_files as pcf
-import process_whole_archive_option as pwa
+import process_command_files as pcf
+import process_whole_archive_option as pwa
+
-
procs = []
build_kekeke = 45
@@ -359,56 +359,56 @@ def make_full_path_arg(arg, bld_root, short_root):
return os.path.join(short_root, arg)
return arg
-def fix_path(p):
+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] == ':'
- pp = None
- for pr in topdirs:
- pp2 = p.find(pr)
- if abs_path_start(p, pp2) and (pp is None or pp > pp2):
- pp = pp2
- if pp is not None:
- return p[:pp] + 'Z:' + p[pp:].replace('/', '\\')
- if p.startswith('/Fo'):
- return '/Fo' + p[3:].replace('/', '\\')
- return p
-
-def process_free_args(args, wine, bld_root, mode):
- whole_archive_prefix = '/WHOLEARCHIVE:'
- short_names = {}
- winepath = os.path.join(os.path.dirname(wine), 'winepath')
- short_names[bld_root] = trim_path(bld_root, winepath)
- # Slow for no benefit.
- # arc_root = args.arcadia_root
- # short_names[arc_root] = trim_path(arc_root, winepath)
-
- free_args, wa_peers, wa_libs = pwa.get_whole_archive_peers_and_libs(pcf.skip_markers(args))
-
- process_link = lambda x: make_full_path_arg(x, bld_root, short_names[bld_root]) if mode in ('link', 'lib') else x
- def process_arg(arg):
- with_wa_prefix = arg.startswith(whole_archive_prefix)
- prefix = whole_archive_prefix if with_wa_prefix else ''
- without_prefix_arg = arg[len(prefix):]
- return prefix + fix_path(process_link(downsize_path(without_prefix_arg, short_names)))
-
- result = []
- for arg in free_args:
- if pcf.is_cmdfile_arg(arg):
- cmd_file_path = pcf.cmdfile_path(arg)
- cf_args = pcf.read_from_command_file(cmd_file_path)
- with open(cmd_file_path, 'w') as afile:
- for cf_arg in cf_args:
- afile.write(process_arg(cf_arg) + "\n")
- result.append(arg)
- else:
- result.append(process_arg(arg))
- return pwa.ProcessWholeArchiveOption('WINDOWS', wa_peers, wa_libs).construct_cmd(result)
-
-def run_main():
+ pp = None
+ for pr in topdirs:
+ pp2 = p.find(pr)
+ if abs_path_start(p, pp2) and (pp is None or pp > pp2):
+ pp = pp2
+ if pp is not None:
+ return p[:pp] + 'Z:' + p[pp:].replace('/', '\\')
+ if p.startswith('/Fo'):
+ return '/Fo' + p[3:].replace('/', '\\')
+ return p
+
+def process_free_args(args, wine, bld_root, mode):
+ whole_archive_prefix = '/WHOLEARCHIVE:'
+ short_names = {}
+ winepath = os.path.join(os.path.dirname(wine), 'winepath')
+ short_names[bld_root] = trim_path(bld_root, winepath)
+ # Slow for no benefit.
+ # arc_root = args.arcadia_root
+ # short_names[arc_root] = trim_path(arc_root, winepath)
+
+ free_args, wa_peers, wa_libs = pwa.get_whole_archive_peers_and_libs(pcf.skip_markers(args))
+
+ process_link = lambda x: make_full_path_arg(x, bld_root, short_names[bld_root]) if mode in ('link', 'lib') else x
+ def process_arg(arg):
+ with_wa_prefix = arg.startswith(whole_archive_prefix)
+ prefix = whole_archive_prefix if with_wa_prefix else ''
+ without_prefix_arg = arg[len(prefix):]
+ return prefix + fix_path(process_link(downsize_path(without_prefix_arg, short_names)))
+
+ result = []
+ for arg in free_args:
+ if pcf.is_cmdfile_arg(arg):
+ cmd_file_path = pcf.cmdfile_path(arg)
+ cf_args = pcf.read_from_command_file(cmd_file_path)
+ with open(cmd_file_path, 'w') as afile:
+ for cf_arg in cf_args:
+ afile.write(process_arg(cf_arg) + "\n")
+ result.append(arg)
+ else:
+ result.append(process_arg(arg))
+ return pwa.ProcessWholeArchiveOption('WINDOWS', wa_peers, wa_libs).construct_cmd(result)
+
+def run_main():
parser = argparse.ArgumentParser()
parser.add_argument('wine', action='store')
parser.add_argument('-v', action='store', dest='version', default='120')
@@ -418,8 +418,8 @@ def run_main():
parser.add_argument('arcadia_build_root', action='store')
parser.add_argument('binary', action='store')
parser.add_argument('free_args', nargs=argparse.REMAINDER)
- # By now just unpack. Ideally we should fix path and pack arguments back into command file
- args = parser.parse_args()
+ # By now just unpack. Ideally we should fix path and pack arguments back into command file
+ args = parser.parse_args()
wine = args.wine
mode = args.mode
@@ -427,7 +427,7 @@ def run_main():
version = args.version
incl_paths = args.incl_paths
bld_root = args.arcadia_build_root
- free_args = args.free_args
+ free_args = args.free_args
wine_dir = os.path.dirname(os.path.dirname(wine))
bin_dir = os.path.dirname(binary)
@@ -435,7 +435,7 @@ def run_main():
if not incl_paths:
incl_paths = [tc_dir + '/VC/include', tc_dir + '/include']
- cmd_out = find_cmd_out(free_args)
+ cmd_out = find_cmd_out(free_args)
env = os.environ.copy()
@@ -451,7 +451,7 @@ def run_main():
env['LIB'] = fix_path(tc_dir + '/VC/lib/amd64')
env['LD_LIBRARY_PATH'] = ':'.join(wine_dir + d for d in ['/lib', '/lib64', '/lib64/wine'])
- cmd = [binary] + process_free_args(free_args, wine, bld_root, mode)
+ cmd = [binary] + process_free_args(free_args, wine, bld_root, mode)
for x in ('/NOLOGO', '/nologo', '/FD'):
try:
diff --git a/build/ymake.core.conf b/build/ymake.core.conf
index f85e5501a1..081833998b 100644
--- a/build/ymake.core.conf
+++ b/build/ymake.core.conf
@@ -39,11 +39,11 @@ SO_OTPUTS=no
@import "${CONF_ROOT}/conf/project_specific/other.conf"
-USE_GLOBAL_CMD=no
-when ($OS_WINDOWS != "yes") {
- USE_GLOBAL_CMD=yes
-}
-
+USE_GLOBAL_CMD=no
+when ($OS_WINDOWS != "yes") {
+ USE_GLOBAL_CMD=yes
+}
+
YMAKE_RESOURCE_BIN=${YMAKE_RESOURCE_GLOBAL}/ymake
YMAKE_RESOURCE_DIR=build/external_resources/ymake
when ($USE_YMAKE_RESOURCE == "yes") {
@@ -657,7 +657,7 @@ macro JAVA_PROTO_PLUGIN(NAME, TOOL, DEPS[]) {
# tag:proto tag:cpp-specific
macro _ADD_CPP_PROTO_OUT(Suf) {
- SET_APPEND(CPP_PROTO_OUTS \${output;hide;norel;nopath;noext;suf=$Suf:File})
+ SET_APPEND(CPP_PROTO_OUTS \${output;hide;norel;nopath;noext;suf=$Suf:File})
# XXX fix variable expansion in plugins
SET(CPP_PROTO_SUFFIXES $CPP_PROTO_SUFFIXES $Suf)
@@ -1148,8 +1148,8 @@ module _BASE_UNIT: _BARE_UNIT {
PEERDIR_TAGS=CPP_PROTO CPP_FBS CPP_SSQLS CPP_IDL PY2 PY2_NATIVE YQL_UDF_STATIC __EMPTY__ DLL_LIB
CPP_PROTO_CMDLINE=${cwd;rootdir;input:File} $PROTOC -I=./$PROTO_NAMESPACE -I=$ARCADIA_ROOT/$PROTO_NAMESPACE ${pre=-I=:_PROTO__INCLUDE} -I=$ARCADIA_BUILD_ROOT -I=$PROTOBUF_PATH --cpp_out=${CPP_PROTO_PLUGINS}$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE $PROTOC_STYLEGUIDE_OUT $PROTOC_PLUGIN_STYLEGUIDE ${input;rootrel:File}
- CPP_PROTO_OUTS+=${output;hide;norel;nopath;noext:File.pb.cc} ${output;main;hide;norel;nopath;noext:File.pb.h}
- CPP_EV_OUTS+=${output;hide;norel:File.pb.cc} ${output;hide;norel:File.pb.h}
+ CPP_PROTO_OUTS+=${output;hide;norel;nopath;noext:File.pb.cc} ${output;main;hide;norel;nopath;noext:File.pb.h}
+ CPP_EV_OUTS+=${output;hide;norel:File.pb.cc} ${output;hide;norel:File.pb.h}
when ($PY_PROTOS_FOR == "yes") {
MACRO_ALIAS(EVLOG_CMD _PY_EVLOG_CMD)
@@ -1677,13 +1677,13 @@ module PROGRAM: _BASE_PROGRAM {
ADD_YTEST($MODULE_PREFIX$REALPRJNAME coverage.extractor)
ADD_CLANG_TIDY()
- SET(MODULE_LANG CPP)
+ SET(MODULE_LANG CPP)
}
# tag:python-specific tag:deprecated tag:internal
module _PY2_PROGRAM: _BASE_PY_PROGRAM {
.ALIASES=REQUIREMENTS=PY_REQUIREMENTS
- SET(MODULE_LANG PY2)
+ SET(MODULE_LANG PY2)
# Looks like we cannot avoid copy-paste util ymake supports multiple inheritance
# We need to attach coverage.extractor to every py_program target, except pytest targets
@@ -1856,7 +1856,7 @@ module UNITTEST: _BASE_UNITTEST {
.SEM=UNITTEST_SEM
PEERDIR(library/cpp/testing/unittest_main)
ADD_YTEST($MODULE_PREFIX$REALPRJNAME unittest.py)
- SET(MODULE_LANG CPP)
+ SET(MODULE_LANG CPP)
}
# tag:yt-specific tag:test
@@ -1887,7 +1887,7 @@ module GTEST: _BASE_UNITTEST {
.SEM=UNITTEST_SEM
PEERDIR(library/cpp/testing/gtest library/cpp/testing/gtest_main)
ADD_YTEST($MODULE_PREFIX$REALPRJNAME gunittest)
- SET(MODULE_LANG CPP)
+ SET(MODULE_LANG CPP)
}
USE_AFL=no
@@ -2186,7 +2186,7 @@ module PY2TEST: PYTEST_BIN {
otherwise {
PEERDIR+=build/rules/py2_deprecation
}
- SET(MODULE_LANG PY2)
+ SET(MODULE_LANG PY2)
ASSERT(_OK You are using deprecated Python2-only code (PY2TEST). Please consider rewriting to Python 3.)
}
@@ -2199,7 +2199,7 @@ module PY3TEST_BIN: _BASE_PY3_PROGRAM {
.FINAL_TARGET=no
.ALLOWED=YT_SPEC NO_DOCTESTS
SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json)
- SET(MODULE_LANG PY3)
+ SET(MODULE_LANG PY3)
SETUP_PYTEST_BIN()
PEERDIR+=library/python/pytest
}
@@ -2304,7 +2304,7 @@ module EXECTEST: _BARE_UNIT {
### For more details see: https://wiki.yandex-team.ru/yatool/test/#zapuskbenchmark
module Y_BENCHMARK: PROGRAM {
PEERDIR(library/cpp/testing/benchmark/main)
- SET(MODULE_LANG CPP)
+ SET(MODULE_LANG CPP)
}
# tag:cpp-specific tag:test
@@ -2316,7 +2316,7 @@ module Y_BENCHMARK: PROGRAM {
module G_BENCHMARK: _BASE_PROGRAM {
PEERDIR(library/cpp/testing/gbenchmark_main)
ADD_YTEST($MODULE_PREFIX$REALPRJNAME g_benchmark)
- SET(MODULE_LANG CPP)
+ SET(MODULE_LANG CPP)
}
# tag:test
@@ -2361,11 +2361,11 @@ module _LIBRARY: _BASE_UNIT {
.GLOBAL=USER_CFLAGS USER_CXXFLAGS USER_CONLYFLAGS LDFLAGS SRCS _WHOLE_ARCHIVE_LIBS_VALUE RPATH
.RESTRICTED=ALLOCATOR SIZE TAG DATA TEST_DATA DEPENDS FORK_TESTS FORK_SUBTESTS SPLIT_FACTOR TEST_CWD RUN TIMEOUT SPLIT_DWARF
.FINAL_TARGET=no
- .GLOBAL_CMD=GLOBAL_LINK_LIB
+ .GLOBAL_CMD=GLOBAL_LINK_LIB
.GLOBAL_EXTS=.o .obj .tidyjson
.ALIASES=RES_REQUIREMENTS=PY_REQUIREMENTS
- GLOBAL_SUFFIX=.global$MODULE_SUFFIX
+ GLOBAL_SUFFIX=.global$MODULE_SUFFIX
#TODO: Remove this hack (really we do not need add fake src at all)
ENABLE(NEED_ADD_FAKE_SRC)
_REQUIRE_EXPLICIT_LICENSE(contrib/deprecated contrib/libs contrib/restricted contrib/python)
@@ -2405,17 +2405,17 @@ module _LIBRARY: _BASE_UNIT {
}
}
-CPP_LIBRARY_SEM=add_library ${MODDIR} $REALPRJNAME ${hide:TARGET} ${hide:AUTO_INPUT} \
+CPP_LIBRARY_SEM=add_library ${MODDIR} $REALPRJNAME ${hide:TARGET} ${hide:AUTO_INPUT} \
&& library_fake_marker FAKE_MODULE ${FAKE_MODULE} \
&& consumer_link_library PUBLIC $CMAKE_LINK_TARGET \
&& target_include_directories PUBLIC $_C__INCLUDE_GLOBAL \
&& target_include_directories PRIVATE $_C__INCLUDE_OWNED \
&& target_compile_definitions PRIVATE $USER_CFLAGS $USER_CXXFLAGS
-CPP_OBJ_LIBRARY_SEM=add_global_library_for ${MODDIR} ${suf=.global:REALPRJNAME} $REALPRJNAME ${hide:GLOBAL_TARGET} ${hide:AUTO_INPUT} \
+CPP_OBJ_LIBRARY_SEM=add_global_library_for ${MODDIR} ${suf=.global:REALPRJNAME} $REALPRJNAME ${hide:GLOBAL_TARGET} ${hide:AUTO_INPUT} \
&& target_include_directories PUBLIC $_C__INCLUDE_GLOBAL \
&& target_include_directories PRIVATE $_C__INCLUDE_OWNED \
- && target_compile_definitions PRIVATE $USER_CFLAGS $USER_CXXFLAGS
-
+ && target_compile_definitions PRIVATE $USER_CFLAGS $USER_CXXFLAGS
+
CMAKE_FIND_PKG=
CMAKE_LINK_TARGET=$REALPRJNAME
CMAKE_FIND_PKG_COMP=
@@ -2438,7 +2438,7 @@ module LIBRARY: _LIBRARY {
.ALIASES=REQUIREMENTS=CC_REQUIREMENTS
.SEM=CPP_LIBRARY_SEM
.GLOBAL_SEM=CPP_OBJ_LIBRARY_SEM
-
+
when ($CMAKE_PACKAGE_COMPONENT != "") {
CMAKE_FIND_PKG_COMP=COMPONENTS $CMAKE_PACKAGE_COMPONENT
}
@@ -2458,7 +2458,7 @@ module LIBRARY: _LIBRARY {
PEERDIR+=$CPP_PROTOBUF_PEERS
}
SET(MODULE_TYPE LIBRARY)
- SET(MODULE_LANG CPP)
+ SET(MODULE_LANG CPP)
ADD_CLANG_TIDY()
}
@@ -2551,18 +2551,18 @@ module FAT_OBJECT: LIBRARY {
.CMD=LINK_FAT_OBJECT_CMD
.PEERDIR_POLICY=as_build_from
- when ($MSVC == "yes" || $CYGWIN == "yes") {
- MODULE_SUFFIX=.global.lib
- }
+ when ($MSVC == "yes" || $CYGWIN == "yes") {
+ MODULE_SUFFIX=.global.lib
+ }
elsewhen ($OS_ANDROID == "yes") {
MODULE_SUFFIX=.a
}
- otherwise {
- MODULE_SUFFIX=.o
- }
-
- _USE_LINKER()
-
+ otherwise {
+ MODULE_SUFFIX=.o
+ }
+
+ _USE_LINKER()
+
# This module requires at least one .o which is not subject to removal so just add _fake_src.cpp as SRCS
# ymake's handling of NEED_ADD_FAKE_SRC may insert arbitrary command, not necessarily compilation
DISABLE(NEED_ADD_FAKE_SRC)
@@ -2602,7 +2602,7 @@ module DLL_UNIT: _LINK_UNIT {
ALLOCATOR(FAKE)
SET(MODULE_TYPE DLL)
SET(MODULE_TAG DLL)
- SET(MODULE_LANG CPP)
+ SET(MODULE_LANG CPP)
ADD_CLANG_TIDY()
when ($MSVC == "yes" || $CYGWIN == "yes") {
@@ -2716,7 +2716,7 @@ module PY_ANY_MODULE: DLL_UNIT {
### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/
module PY2MODULE: PY_ANY_MODULE {
PYTHON2_MODULE()
- SET(MODULE_LANG PY2)
+ SET(MODULE_LANG PY2)
.RESTRICTED=PYTHON3_MODULE PYTHON3_ADDINCL
}
@@ -2735,7 +2735,7 @@ module PY2MODULE: PY_ANY_MODULE {
### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/
module PY3MODULE: PY_ANY_MODULE {
PYTHON3_MODULE()
- SET(MODULE_LANG PY3)
+ SET(MODULE_LANG PY3)
.RESTRICTED=PYTHON2_MODULE PYTHON2_ADDINCL
}
@@ -2803,7 +2803,7 @@ macro DYNAMIC_LIBRARY_FROM(Path...) {
### DLL cannot participate in linking to programs but can be used from Java or as final artifact (packaged and deployed).
module DLL: DLL_UNIT {
SET(MAKE_ONLY_SHARED_LIB yes)
- SET(MODULE_LANG CPP)
+ SET(MODULE_LANG CPP)
when ($OS_WINDOWS) {
MODULE_SUFFIX=.dll
}
@@ -3188,7 +3188,7 @@ module _DOCS_BASE_UNIT: _BARE_UNIT {
ENABLE(_DOCS_BASE_UNIT)
SET(MODULE_SUFFIX .tar.gz)
- SET(MODULE_LANG DOCS)
+ SET(MODULE_LANG DOCS)
DEFAULT(_DOCS_BUILDER_VALUE yfm)
DEFAULT(_DOCS_DIR_VALUE ${MODDIR})
select ($_DOCS_BUILDER) {
@@ -3434,7 +3434,7 @@ module EXTERNAL_JAVA_LIBRARY: _BASE_UNIT {
DISABLE(NEED_PLATFORM_PEERDIRS)
NO_PLATFORM()
SET(MODULE_SUFFIX .jar)
- SET(MODULE_LANG JAVA)
+ SET(MODULE_LANG JAVA)
}
# tag:java-specific
@@ -3539,7 +3539,7 @@ module _JAR_BASE: _BARE_UNIT {
DISABLE(NEED_PLATFORM_PEERDIRS)
NO_PLATFORM()
VCS_JAVA=${suf=.__vcs_version__.mf:TARGET}
- SET(MODULE_LANG JAVA)
+ SET(MODULE_LANG JAVA)
}
# tag:java-specific
@@ -4041,15 +4041,15 @@ module PY2_LIBRARY: _LIBRARY {
}
.ALLOWED=FORK_TESTS
.IGNORED=GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER USE_PYTHON2
- .RESTRICTED=PYTHON3_ADDINCL USE_PYTHON3 PYTHON2_ADDINCL OPTIMIZE_PY_PROTOS NO_OPTIMIZE_PY_PROTOS
- USE_GLOBAL_CMD=yes
+ .RESTRICTED=PYTHON3_ADDINCL USE_PYTHON3 PYTHON2_ADDINCL OPTIMIZE_PY_PROTOS NO_OPTIMIZE_PY_PROTOS
+ USE_GLOBAL_CMD=yes
when ($PY_PROTO_MYPY_ENABLED == "yes") {
PY_PROTO_MYPY_SUFFIX=_pb2.pyi
PY_PROTO_MYPY_PLUGIN=$PY_PROTO_MYPY_PLUGIN_BASE ${output;hide;noauto;norel;nopath;noext;suf=_pb2.pyi:File}
PY_PROTO_MYPY_PLUGIN_INTERNAL=$PY_PROTO_MYPY_PLUGIN_BASE ${output;hide;noauto;norel;nopath;noext;suf=__int___pb2.pyi:File} ${hide;kv:"ext_out_name_for_${nopath;noext;suf=__int___pb2.pyi:File} ${nopath;noext;suf=_pb2.pyi:File}"})
}
- SET(MODULE_LANG PY2)
+ SET(MODULE_LANG PY2)
}
@@ -4070,8 +4070,8 @@ module _PY3_LIBRARY: _LIBRARY {
}
.ALLOWED=FORK_TESTS
.IGNORED=GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER
- .RESTRICTED=PYTHON3_ADDINCL USE_PYTHON3 PYTHON2_ADDINCL USE_PYTHON2 OPTIMIZE_PY_PROTOS NO_OPTIMIZE_PY_PROTOS
- USE_GLOBAL_CMD=yes
+ .RESTRICTED=PYTHON3_ADDINCL USE_PYTHON3 PYTHON2_ADDINCL USE_PYTHON2 OPTIMIZE_PY_PROTOS NO_OPTIMIZE_PY_PROTOS
+ USE_GLOBAL_CMD=yes
PEERDIR($YMAKE_PYTHON3_PEER)
RUN_CYTHON_SCRIPT=$YMAKE_PYTHON3 $CYTHON_SCRIPT
@@ -4081,7 +4081,7 @@ module _PY3_LIBRARY: _LIBRARY {
PY_PROTO_MYPY_PLUGIN=$PY_PROTO_MYPY_PLUGIN_BASE ${output;hide;noauto;norel;nopath;noext;suf=_pb2.pyi:File}
PY_PROTO_MYPY_PLUGIN_INTERNAL=$PY_PROTO_MYPY_PLUGIN_BASE ${output;hide;noauto;norel;nopath;noext;suf=__int___pb2.pyi:File} ${hide;kv:"ext_out_name_for_${nopath;noext;suf=__int___pb2.pyi:File} ${nopath;noext;suf=_pb2.pyi:File}"})
}
- SET(MODULE_LANG PY3)
+ SET(MODULE_LANG PY3)
}
# tag:python-specific
@@ -4146,8 +4146,8 @@ module _BASE_PY_PROGRAM: _BASE_PROGRAM {
NO_STRIP=yes
}
.IGNORED=GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER USE_PYTHON2
- .RESTRICTED=PYTHON3_ADDINCL USE_PYTHON3 PYTHON2_ADDINCL OPTIMIZE_PY_PROTOS NO_OPTIMIZE_PY_PROTOS
- SET(MODULE_LANG PY2)
+ .RESTRICTED=PYTHON3_ADDINCL USE_PYTHON3 PYTHON2_ADDINCL OPTIMIZE_PY_PROTOS NO_OPTIMIZE_PY_PROTOS
+ SET(MODULE_LANG PY2)
}
# tag:python-specific tag:codenav
@@ -4207,7 +4207,7 @@ module _BASE_PY3_PROGRAM: _BASE_PROGRAM {
}
.IGNORED=GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER
.RESTRICTED=PYTHON3_ADDINCL USE_PYTHON3 PYTHON2_ADDINCL USE_PYTHON2
- SET(MODULE_LANG PY3)
+ SET(MODULE_LANG PY3)
}
# tag:python-specific
@@ -4920,7 +4920,7 @@ module _JAVA_PLACEHOLDER: _BASE_UNIT {
# protobuf-java-util
DEPENDENCY_MANAGEMENT(contrib/java/com/google/protobuf/protobuf-java-util/${JAVA_PROTO_RUNTIME_VERSION})
CHECK_DEPENDENT_DIRS(DENY PEERDIRS contrib/java/com/google/protobuf/protobuf-java-util EXCEPT contrib/java/com/google/protobuf/protobuf-java-util/${JAVA_PROTO_RUNTIME_VERSION})
- SET(MODULE_LANG JAVA)
+ SET(MODULE_LANG JAVA)
}
# tag:java-specific
@@ -5449,7 +5449,7 @@ macro _GENERATE_PY_EVS_INTERNAL(FILES...) {
macro _COPY_FILE_IMPL(FILE, AUTO_DST="", NOAUTO_DST="", OUTPUT_INCLUDES[], REQUIREMENTS[]) {
.CMD=$COPY_CMD ${input:FILE} ${output:AUTO_DST} ${output;noauto:NOAUTO_DST} ${output_include;hide:OUTPUT_INCLUDES} ${requirements;hide:REQUIREMENTS} ${kv;hide:"p CP"} ${kv;hide:"pc light-cyan"}
- .SEM=copy_file ${input:FILE} ${output:AUTO_DST} ${output;noauto:NOAUTO_DST}
+ .SEM=copy_file ${input:FILE} ${output:AUTO_DST} ${output;noauto:NOAUTO_DST}
}
### @usage: COPY_FILE(File Destination [AUTO] [OUTPUT_INCLUDES Deps...])
@@ -5466,7 +5466,7 @@ macro _COPY_FILE_IMPL(FILE, AUTO_DST="", NOAUTO_DST="", OUTPUT_INCLUDES[], REQUI
### mention it in SRCS under new name (or specify AUTO boolean parameter) for further processing.
macro COPY_FILE(File, Destination, AUTO?"AUTO_DST":"NOAUTO_DST", OUTPUT_INCLUDES[], REQUIREMENTS[]) {
.CMD=$_COPY_FILE_IMPL($File $AUTO $Destination OUTPUT_INCLUDES $OUTPUT_INCLUDES REQUIREMENTS $REQUIREMENTS)
- .SEM=$_COPY_FILE_IMPL($File $AUTO $Destination OUTPUT_INCLUDES $OUTPUT_INCLUDES REQUIREMENTS $REQUIREMENTS)
+ .SEM=$_COPY_FILE_IMPL($File $AUTO $Destination OUTPUT_INCLUDES $OUTPUT_INCLUDES REQUIREMENTS $REQUIREMENTS)
}
### @usage: COPY_FILE_WITH_CONTEXT(FILE DEST [AUTO] [OUTPUT_INCLUDES DEPS...])
@@ -5478,7 +5478,7 @@ macro COPY_FILE_WITH_CONTEXT(FILE, DEST, AUTO?"AUTO":"", OUTPUT_INCLUDES[]) {
}
macro _BUNDLE_TARGET(Target, Destination) {
- .CMD=$MOVE_FILE ${result:Target} ${output;noauto:Destination} ${kv;hide:"p BN"} ${kv;hide:"pc light-cyan"} $VCS_INFO_DISABLE_CACHE__NO_UID__
+ .CMD=$MOVE_FILE ${result:Target} ${output;noauto:Destination} ${kv;hide:"p BN"} ${kv;hide:"pc light-cyan"} $VCS_INFO_DISABLE_CACHE__NO_UID__
}
### @usage: TIMEOUT(TIMEOUT)
@@ -5575,7 +5575,7 @@ macro SIZE(Type) {
### This macro doesn't place all file into Out, it emits #include<Src>... Use the for C++ source files only.
### You should specify file name with the extension as Out. Futher processing will be done according this extension.
macro JOIN_SRCS(Out, Src...) {
- .CMD=$YMAKE_PYTHON ${input:"build/scripts/gen_join_srcs.py"} ${output:Out} --ya-start-command-file ${input;rootrel:Src} --ya-end-command-file ${output_include;hide:Src} ${kv;hide:"p JS"} ${kv;hide:"pc magenta"}
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/gen_join_srcs.py"} ${output:Out} --ya-start-command-file ${input;rootrel:Src} --ya-end-command-file ${output_include;hide:Src} ${kv;hide:"p JS"} ${kv;hide:"pc magenta"}
.SEM=target_joined_source $Out ${input:Src} ${output;hide;suf=.o:Out} && modules_required yandex_common.cmake
_CONDITIONAL_SRCS($TIDY_VALUE $Src)
}
@@ -5586,7 +5586,7 @@ macro JOIN_SRCS(Out, Src...) {
### This macro doesn't place all file into Out, it emits #include<Src>... Use the for C++ source files only.
### You should specify file name with the extension as Out. Further processing will be done according to this extension.
macro JOIN_SRCS_GLOBAL(Out, Src...) {
- .CMD=$YMAKE_PYTHON ${input:"build/scripts/gen_join_srcs.py"} ${output;noauto:Out} --ya-start-command-file ${input;rootrel:Src} --ya-end-command-file ${output_include;hide:Src} ${kv;hide:"p JS"} ${kv;hide:"pc magenta"}
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/gen_join_srcs.py"} ${output;noauto:Out} --ya-start-command-file ${input;rootrel:Src} --ya-end-command-file ${output_include;hide:Src} ${kv;hide:"p JS"} ${kv;hide:"pc magenta"}
SRCS(GLOBAL $Out)
}
@@ -5596,7 +5596,7 @@ macro JOIN_SRCS_GLOBAL(Out, Src...) {
### This macro places all files into single file, so will work with any sources.
### You should specify file name with the extension as Out. Further processing will be done according to this extension.
macro FLAT_JOIN_SRCS_GLOBAL(Out, Src...) {
- .CMD=$YMAKE_PYTHON ${input:"build/scripts/fs_tools.py"} cat ${output;noauto:Out} --ya-start-command-file ${input:Src} --ya-end-command-file ${output_include;hide:Src} ${kv;hide:"p JS"} ${kv;hide:"pc magenta"}
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/fs_tools.py"} cat ${output;noauto:Out} --ya-start-command-file ${input:Src} --ya-end-command-file ${output_include;hide:Src} ${kv;hide:"p JS"} ${kv;hide:"pc magenta"}
SRCS(GLOBAL $Out)
}
@@ -5702,13 +5702,13 @@ macro NO_CPU_CHECK() {
### @usage: ADDINCLSELF()
###
### The macro adds the -I<project source path> flag to the source compilation flags of the current project.
-macro ADDINCLSELF(FOR="") {
- when($FOR) {
- ADDINCL+=FOR $FOR ${MODDIR}
- }
- otherwise {
- ADDINCL+=${MODDIR}
- }
+macro ADDINCLSELF(FOR="") {
+ when($FOR) {
+ ADDINCL+=FOR $FOR ${MODDIR}
+ }
+ otherwise {
+ ADDINCL+=${MODDIR}
+ }
}
COMPILE_OUT_SUFFIX=
@@ -5870,7 +5870,7 @@ macro _SRC("cfgproto", SRC, SRCFLAGS...) {
macro _SRC("pyx", SRC, SRCFLAGS...) {
# Copy-paste from BUILDWITH_CYTHON
.CMD=$RUN_CYTHON_SCRIPT $CYTHON_OPTIONS --cplus ${CYTHON_CPP_OUTPUT_INCLUDES} ${pre=-I:_CYTHON__INCLUDE} ${input:SRC} -o ${output;tobindir:SRC.cpp} $CYTHON_OUTPUT_INCLUDES ${SRCFLAGS} ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p CY"} ${kv;hide:"pc yellow"}
- .ADDINCL=FOR cython contrib/tools/cython/Cython/Includes
+ .ADDINCL=FOR cython contrib/tools/cython/Cython/Includes
}
# tag:src-processing
@@ -6276,7 +6276,7 @@ macro SRC_CPP_AVX2(FILE, FLAGS...) {
### Generates .cpp file from .pyx.
macro BUILDWITH_CYTHON_CPP(Src, Options...) {
.CMD=$RUN_CYTHON_SCRIPT $CYTHON_OPTIONS ${Options} --cplus ${CYTHON_CPP_OUTPUT_INCLUDES} ${pre=-I:_CYTHON__INCLUDE} ${input:Src} -o ${output;tobindir:Src.cpp} $CYTHON_OUTPUT_INCLUDES ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p CY"} ${kv;hide:"pc yellow"}
- ADDINCL(FOR cython contrib/tools/cython/Cython/Includes)
+ ADDINCL(FOR cython contrib/tools/cython/Cython/Includes)
}
# tag:python-processing tag:cython tag:internal
@@ -6286,7 +6286,7 @@ macro BUILDWITH_CYTHON_CPP(Src, Options...) {
### If Dep changes the .cpp file will be re-generated.
macro _BUILDWITH_CYTHON_CPP_DEP(Src, Dep, Options...) {
.CMD=$RUN_CYTHON_SCRIPT $CYTHON_OPTIONS ${Options} --cplus ${CYTHON_CPP_OUTPUT_INCLUDES} ${pre=-I:_CYTHON__INCLUDE} ${input:Src} ${input;hide:Dep} -o ${output;tobindir:Src.cpp} $CYTHON_OUTPUT_INCLUDES ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p CY"} ${kv;hide:"pc yellow"}
- ADDINCL(FOR cython contrib/tools/cython/Cython/Includes)
+ ADDINCL(FOR cython contrib/tools/cython/Cython/Includes)
}
# tag:python-processing tag:cython
@@ -6295,7 +6295,7 @@ macro _BUILDWITH_CYTHON_CPP_DEP(Src, Dep, Options...) {
### Generates .c file from .pyx.
macro BUILDWITH_CYTHON_C(Src, Options...) {
.CMD=$RUN_CYTHON_SCRIPT $CYTHON_OPTIONS ${Options} ${pre=-I:_CYTHON__INCLUDE} ${input:Src} -o ${output;tobindir:Src.c} $CYTHON_OUTPUT_INCLUDES ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p CY"} ${kv;hide:"pc yellow"}
- ADDINCL(FOR cython contrib/tools/cython/Cython/Includes)
+ ADDINCL(FOR cython contrib/tools/cython/Cython/Includes)
}
# tag:python-processing tag:cython tag:internal
@@ -6305,7 +6305,7 @@ macro BUILDWITH_CYTHON_C(Src, Options...) {
### If Dep changes the .c file will be re-generated.
macro _BUILDWITH_CYTHON_C_DEP(Src, Dep, Options...) {
.CMD=$RUN_CYTHON_SCRIPT $CYTHON_OPTIONS ${Options} ${pre=-I:_CYTHON__INCLUDE} ${input:Src} ${input;hide:Dep} -o ${output;tobindir:Src.c} $CYTHON_OUTPUT_INCLUDES ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p CY"} ${kv;hide:"pc yellow"}
- ADDINCL(FOR cython contrib/tools/cython/Cython/Includes)
+ ADDINCL(FOR cython contrib/tools/cython/Cython/Includes)
}
# tag:python-processing tag:cython tag:internal
@@ -6314,7 +6314,7 @@ macro _BUILDWITH_CYTHON_C_DEP(Src, Dep, Options...) {
### BUILDWITH_CYTHON_C without .pyx infix and with cdef public .h file.
macro _BUILDWITH_CYTHON_C_H(Src, Dep, Options...) {
.CMD=$RUN_CYTHON_SCRIPT $CYTHON_OPTIONS ${Options} ${pre=-I:_CYTHON__INCLUDE} ${input:Src} ${input;hide:Dep} -o ${output;noext;tobindir:Src.c} ${output;hide;addincl;noext;tobindir:Src.h} $CYTHON_OUTPUT_INCLUDES ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p CY"} ${kv;hide:"pc yellow"}
- ADDINCL(FOR cython contrib/tools/cython/Cython/Includes)
+ ADDINCL(FOR cython contrib/tools/cython/Cython/Includes)
}
# tag:python-processing tag:cython tag:internal
@@ -6323,7 +6323,7 @@ macro _BUILDWITH_CYTHON_C_H(Src, Dep, Options...) {
### BUILDWITH_CYTHON_C_H with cdef api _api.h file.
macro _BUILDWITH_CYTHON_C_API_H(Src, Dep, Options...) {
.CMD=$RUN_CYTHON_SCRIPT $CYTHON_OPTIONS ${Options} ${pre=-I:_CYTHON__INCLUDE} ${input:Src} ${input;hide:Dep} -o ${output;noext;tobindir:Src.c} ${output;hide;addincl;noext;tobindir:Src.h} ${output;hide;addincl;noext;defext=_api.h;tobindir:Src} $CYTHON_OUTPUT_INCLUDES ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p CY"} ${kv;hide:"pc yellow"}
- ADDINCL(FOR cython contrib/tools/cython/Cython/Includes)
+ ADDINCL(FOR cython contrib/tools/cython/Cython/Includes)
}
# tag:python-processing tag:internal
@@ -6333,7 +6333,7 @@ macro _BUILDWITH_CYTHON_C_API_H(Src, Dep, Options...) {
### provides DstSubPrefix_swg python module.
macro _SWIG_PYTHON_CPP(Src, DstSubPrefix) {
.CMD=$_SWIG_TOOL -I$ARCADIA_BUILD_ROOT -I$ARCADIA_ROOT -I$_SWIG_LIBRARY_ABS/python -I$_SWIG_LIBRARY_ABS -c++ -python -module ${nopath:DstSubPrefix} -interface ${nopath;suf=_swg:DstSubPrefix} -o ${output;suf=.swg.cpp:DstSubPrefix} ${input:Src} ${output;noauto;hide;suf=.py:DstSubPrefix} ${kv;hide:"p SW"} ${kv;hide:"pc yellow"}
- ADDINCL(FOR swig $_SWIG_LIBRARY/python FOR swig $_SWIG_LIBRARY)
+ ADDINCL(FOR swig $_SWIG_LIBRARY/python FOR swig $_SWIG_LIBRARY)
}
# tag:python-processing tag:internal
@@ -6342,7 +6342,7 @@ macro _SWIG_PYTHON_CPP(Src, DstSubPrefix) {
### Like _SWIG_PYTHON_CPP but generate DstSubPrefix_swg.c.
macro _SWIG_PYTHON_C(Src, DstSubPrefix) {
.CMD=$_SWIG_TOOL -I$ARCADIA_BUILD_ROOT -I$ARCADIA_ROOT -I$_SWIG_LIBRARY_ABS/python -I$_SWIG_LIBRARY_ABS -python -module ${nopath:DstSubPrefix} -interface ${nopath;suf=_swg:DstSubPrefix} -o ${output;suf=.swg.c:DstSubPrefix} ${input:Src} ${output;noauto;hide;suf=.py:DstSubPrefix} ${kv;hide:"p SW"} ${kv;hide:"pc yellow"}
- ADDINCL(FOR swig $_SWIG_LIBRARY/python FOR swig $_SWIG_LIBRARY)
+ ADDINCL(FOR swig $_SWIG_LIBRARY/python FOR swig $_SWIG_LIBRARY)
}
### @usage: BUILDWITH_RAGEL6(Src Options...)
@@ -7164,7 +7164,7 @@ CLANG_ROOT=$CLANG_RESOURCE_GLOBAL
###
### More information will be available (eventually:) here: https://wiki.yandex-team.ru/Users/denisk/codegenerator/
macro GENERATED_SRCS(PARSE_META_FROM{input}[], OUTPUT_INCLUDES[], OPTIONS[], TEMPLATES...) {
- .CMD=${tool:"market/tools/code_generator"} --cpp-file ${input:PARSE_META_FROM} --templates-dir / ${ARCADIA_ROOT} --templates ${input:TEMPLATES.markettemplate} --generated-files ${output:TEMPLATES} ${output_include;hide:OUTPUT_INCLUDES} ${output_include;hide:PARSE_META_FROM} --arcadia-root ${ARCADIA_ROOT} --arcadia-build-root ${ARCADIA_BUILD_ROOT} --clang-root $CLANG_ROOT ${OPTIONS} -- $C_FLAGS_PLATFORM $CXXFLAGS ${pre=-I:_C__INCLUDE} -std=c++17 -Wno-unknown-warning-option -Wno-unused-parameter -Wno-undefined-inline -Wno-undefined-internal -Wno-unused-function $LLVM_OPTS -fno-lto
+ .CMD=${tool:"market/tools/code_generator"} --cpp-file ${input:PARSE_META_FROM} --templates-dir / ${ARCADIA_ROOT} --templates ${input:TEMPLATES.markettemplate} --generated-files ${output:TEMPLATES} ${output_include;hide:OUTPUT_INCLUDES} ${output_include;hide:PARSE_META_FROM} --arcadia-root ${ARCADIA_ROOT} --arcadia-build-root ${ARCADIA_BUILD_ROOT} --clang-root $CLANG_ROOT ${OPTIONS} -- $C_FLAGS_PLATFORM $CXXFLAGS ${pre=-I:_C__INCLUDE} -std=c++17 -Wno-unknown-warning-option -Wno-unused-parameter -Wno-undefined-inline -Wno-undefined-internal -Wno-unused-function $LLVM_OPTS -fno-lto
PEERDIR(build/platform/clang)
}
@@ -7366,10 +7366,10 @@ macro RUN_ANTLR4_GO(GRAMMAR, OUTPUT_INCLUDES[], LISTENER?"GRAMMAR":"_ANTLR4_EMPT
}
# tag:cpp-specific
-macro CPP_ADDINCL(Dirs...) {
- ADDINCL($Dirs)
-}
-
+macro CPP_ADDINCL(Dirs...) {
+ ADDINCL($Dirs)
+}
+
# tag:internal
_WHOLE_ARCHIVE_PEERS_VALUE=
### @usage: WHOLE_ARCHIVE(dirnames...) # internal
@@ -7423,17 +7423,17 @@ macro TASKLET_REG_EXT(Name, Lang, Impl, Wrapper, Includes...) {
}
# tag:cpp-specific
-_CPP_PROTO_MODULE_PREFIX=
-_CPP_PROTO_MODULE_SUFFIX=
-when ($MSVC == "yes" || $CYGWIN == "yes") {
- _CPP_PROTO_MODULE_PREFIX=
- _CPP_PROTO_MODULE_SUFFIX=.lib
-}
-otherwise {
- _CPP_PROTO_MODULE_PREFIX=lib
- _CPP_PROTO_MODULE_SUFFIX=.a
-}
-
+_CPP_PROTO_MODULE_PREFIX=
+_CPP_PROTO_MODULE_SUFFIX=
+when ($MSVC == "yes" || $CYGWIN == "yes") {
+ _CPP_PROTO_MODULE_PREFIX=
+ _CPP_PROTO_MODULE_SUFFIX=.lib
+}
+otherwise {
+ _CPP_PROTO_MODULE_PREFIX=lib
+ _CPP_PROTO_MODULE_SUFFIX=.a
+}
+
### @usage: EXPOSE(OutputsToExport...)
###
### Allows to mark outputs of macro command as unused in the current module but intended
@@ -7489,9 +7489,9 @@ multimodule PROTO_LIBRARY {
_OK=no
}
ASSERT(_OK BUILD_PROTO_AS_EVLOG and USE_VANILLA_PROTOC are incompatible yet)
-
- MODULE_SUFFIX=$_CPP_PROTO_MODULE_SUFFIX
- MODULE_PREFIX=$_CPP_PROTO_MODULE_PREFIX
+
+ MODULE_SUFFIX=$_CPP_PROTO_MODULE_SUFFIX
+ MODULE_PREFIX=$_CPP_PROTO_MODULE_PREFIX
when ($_COMMON_GOOGLE_APIS != "None") {
PEERDIR += contrib/libs/googleapis-common-protos
@@ -7517,36 +7517,36 @@ multimodule PROTO_LIBRARY {
module PY_PROTO: PY2_LIBRARY {
.ALIASES=SRCS=PY_SRCS
- .ALLOWED=OPTIMIZE_PY_PROTOS NO_OPTIMIZE_PY_PROTOS
- .PEERDIRSELF=CPP_PROTO
+ .ALLOWED=OPTIMIZE_PY_PROTOS NO_OPTIMIZE_PY_PROTOS
+ .PEERDIRSELF=CPP_PROTO
.SEM=ignored
SET(PEERDIR_TAGS PY2 PY_PROTO)
ENABLE(PY_PROTO)
- OPTIMIZE_PY_PROTOS()
+ OPTIMIZE_PY_PROTOS()
OBJ_SUF=.py2
- # Can not use NO_LINT(), because is not allowed outside of contrib directory
+ # Can not use NO_LINT(), because is not allowed outside of contrib directory
SET(LINT_LEVEL_VALUE none_internal)
-
+
when ($_COMMON_GOOGLE_APIS != "None") {
PEERDIR += contrib/libs/googleapis-common-protos
}
-
- _IGNORE_SELF_PEERS=
- _CPP_PROTO_LIBRARY=${MODDIR}/$_CPP_PROTO_MODULE_PREFIX$REALPRJNAME$_CPP_PROTO_MODULE_SUFFIX
- when ($OPTIMIZE_PY_PROTOS_FLAG == "no") {
- _IGNORE_PEERDIRSELF=CPP_PROTO
- }
- SET_APPEND(_WHOLE_ARCHIVE_LIBS_VALUE_GLOBAL $_CPP_PROTO_LIBRARY)
+
+ _IGNORE_SELF_PEERS=
+ _CPP_PROTO_LIBRARY=${MODDIR}/$_CPP_PROTO_MODULE_PREFIX$REALPRJNAME$_CPP_PROTO_MODULE_SUFFIX
+ when ($OPTIMIZE_PY_PROTOS_FLAG == "no") {
+ _IGNORE_PEERDIRSELF=CPP_PROTO
+ }
+ SET_APPEND(_WHOLE_ARCHIVE_LIBS_VALUE_GLOBAL $_CPP_PROTO_LIBRARY)
}
module PY3_PROTO: PY3_LIBRARY {
.ALIASES=SRCS=PY_SRCS
- .ALLOWED=OPTIMIZE_PY_PROTOS NO_OPTIMIZE_PY_PROTOS
- .PEERDIRSELF=CPP_PROTO
+ .ALLOWED=OPTIMIZE_PY_PROTOS NO_OPTIMIZE_PY_PROTOS
+ .PEERDIRSELF=CPP_PROTO
.SEM=ignored
SET(PEERDIR_TAGS PY3 PY3_PROTO)
ENABLE(PY3_PROTO)
- OPTIMIZE_PY_PROTOS()
+ OPTIMIZE_PY_PROTOS()
when ($MSVC == "yes" || $CYGWIN == "yes") {
MODULE_PREFIX=py3
}
@@ -7554,19 +7554,19 @@ multimodule PROTO_LIBRARY {
MODULE_PREFIX=libpy3
}
OBJ_SUF=.py3
- # Can not use NO_LINT(), because is not allowed outside of contrib directory
+ # Can not use NO_LINT(), because is not allowed outside of contrib directory
SET(LINT_LEVEL_VALUE none_internal)
-
+
when ($_COMMON_GOOGLE_APIS != "None") {
PEERDIR += contrib/libs/googleapis-common-protos
}
-
- _IGNORE_SELF_PEERS=
- _CPP_PROTO_LIBRARY=${MODDIR}/$_CPP_PROTO_MODULE_PREFIX$REALPRJNAME$_CPP_PROTO_MODULE_SUFFIX
- when ($OPTIMIZE_PY_PROTOS_FLAG == "no") {
- _IGNORE_PEERDIRSELF=CPP_PROTO
- }
- SET_APPEND(_WHOLE_ARCHIVE_LIBS_VALUE_GLOBAL $_CPP_PROTO_LIBRARY)
+
+ _IGNORE_SELF_PEERS=
+ _CPP_PROTO_LIBRARY=${MODDIR}/$_CPP_PROTO_MODULE_PREFIX$REALPRJNAME$_CPP_PROTO_MODULE_SUFFIX
+ when ($OPTIMIZE_PY_PROTOS_FLAG == "no") {
+ _IGNORE_PEERDIRSELF=CPP_PROTO
+ }
+ SET_APPEND(_WHOLE_ARCHIVE_LIBS_VALUE_GLOBAL $_CPP_PROTO_LIBRARY)
}
module GO_PROTO: GO_LIBRARY {
@@ -7787,7 +7787,7 @@ module JSRC_LIBRARY: _BARE_UNIT {
SET(MODULE_SUFFIX .jsrc)
SET(DONT_RESOLVE_INCLUDES yes)
SET(NEED_PLATFORM_PEERDIRS no)
- SET(MODULE_LANG JAVA)
+ SET(MODULE_LANG JAVA)
NO_RUNTIME()
}
@@ -8387,7 +8387,7 @@ module _GO_BASE_UNIT: _BASE_UNIT {
SET(COVERAGE_FLAGS)
SET(EXTRA_OUTPUT)
- SET(MODULE_LANG GO)
+ SET(MODULE_LANG GO)
PEERDIR(build/external_resources/go_tools)
@@ -8487,11 +8487,11 @@ module _GO_BASE_UNIT: _BASE_UNIT {
when ($OS_DARWIN) {
PEERDIR+=build/external_resources/go_fake_xcrun
- GO_EXTLD = ++extld $_GO_EXTLD ++extldflags $_GO_SONAME $LD_SDK_VERSION -undefined dynamic_lookup $C_FLAGS_PLATFORM --sysroot=$MACOS_SDK_RESOURCE_GLOBAL --start-wa ${rootrel;ext=.a:SRCS_GLOBAL} --end-wa ${rootrel;ext=.o:SRCS_GLOBAL} --cgo-peers $LDFLAGS $LDFLAGS_GLOBAL $OBJADDE $OBJADDE_LIB $GO_LDFLAGS_GLOBAL $C_LIBRARY_PATH $C_SYSTEM_LIBRARIES_INTERCEPT $C_SYSTEM_LIBRARIES $STRIP_FLAG
+ GO_EXTLD = ++extld $_GO_EXTLD ++extldflags $_GO_SONAME $LD_SDK_VERSION -undefined dynamic_lookup $C_FLAGS_PLATFORM --sysroot=$MACOS_SDK_RESOURCE_GLOBAL --start-wa ${rootrel;ext=.a:SRCS_GLOBAL} --end-wa ${rootrel;ext=.o:SRCS_GLOBAL} --cgo-peers $LDFLAGS $LDFLAGS_GLOBAL $OBJADDE $OBJADDE_LIB $GO_LDFLAGS_GLOBAL $C_LIBRARY_PATH $C_SYSTEM_LIBRARIES_INTERCEPT $C_SYSTEM_LIBRARIES $STRIP_FLAG
CGO2_LDFLAGS_VALUE += $LD_SDK_VERSION -undefined dynamic_lookup -nodefaultlibs -lc
}
elsewhen ($OS_LINUX) {
- GO_EXTLD = ++extld $_GO_EXTLD ++extldflags $_GO_SONAME $C_FLAGS_PLATFORM --sysroot=$OS_SDK_ROOT_RESOURCE_GLOBAL -Wl,--whole-archive ${rootrel;ext=.a:SRCS_GLOBAL} -Wl,--no-whole-archive ${rootrel;ext=.o:SRCS_GLOBAL} --cgo-peers $LDFLAGS $LDFLAGS_GLOBAL $OBJADDE $OBJADDE_LIB $GO_LDFLAGS_GLOBAL $C_LIBRARY_PATH $C_SYSTEM_LIBRARIES_INTERCEPT $C_SYSTEM_LIBRARIES $STRIP_FLAG
+ GO_EXTLD = ++extld $_GO_EXTLD ++extldflags $_GO_SONAME $C_FLAGS_PLATFORM --sysroot=$OS_SDK_ROOT_RESOURCE_GLOBAL -Wl,--whole-archive ${rootrel;ext=.a:SRCS_GLOBAL} -Wl,--no-whole-archive ${rootrel;ext=.o:SRCS_GLOBAL} --cgo-peers $LDFLAGS $LDFLAGS_GLOBAL $OBJADDE $OBJADDE_LIB $GO_LDFLAGS_GLOBAL $C_LIBRARY_PATH $C_SYSTEM_LIBRARIES_INTERCEPT $C_SYSTEM_LIBRARIES $STRIP_FLAG
CGO2_LDFLAGS_VALUE += -Wl,--unresolved-symbols=ignore-all -nodefaultlibs -lc
}
otherwise {
@@ -8823,13 +8823,13 @@ multimodule PY23_NATIVE_LIBRARY {
.RESTRICTED=PY_SRCS USE_PYTHON2 USE_PYTHON3 PYTHON3_ADDINCL
OBJ_SUF=.py2
PYTHON2_ADDINCL()
- SET(MODULE_LANG PY2)
+ SET(MODULE_LANG PY2)
}
module PY3: LIBRARY {
.RESTRICTED=PY_SRCS USE_PYTHON2 USE_PYTHON3
.ALIASES=PYTHON2_ADDINCL=PYTHON3_ADDINCL
PYTHON3_ADDINCL()
- SET(MODULE_LANG PY3)
+ SET(MODULE_LANG PY3)
when ($MSVC == "yes" || $CYGWIN == "yes") {
MODULE_PREFIX=py3c
}
@@ -8989,7 +8989,7 @@ macro COMPILE_SWIFT_MODULE(SRCS{input}[], BRIDGE_HEADER{input}="", Flags...) {
# swift core libraries
LDFLAGS($SWIFT_LD_FLAGS)
- .CMD=$YMAKE_PYTHON ${input:"build/scripts/gen_swiftc_output_map.py"} $(SOURCE_ROOT) $(BUILD_ROOT) $BINDIR/swift_output_map.json ${input:SRCS} && $SWIFT_COMPILER -c $SWIFT_FLAGS_PLATFORM $Flags $SWIFT_BRIDGE_HEADER ${pre=-Xcc -I:_C__INCLUDE} ${input:SRCS} -emit-objc-header -emit-objc-header-path ${output;suf=-Swift.h:REALPRJNAME} -emit-module -module-name $REALPRJNAME -output-file-map $BINDIR/swift_output_map.json ${output;hide;suf=.o:SRCS}
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/gen_swiftc_output_map.py"} $(SOURCE_ROOT) $(BUILD_ROOT) $BINDIR/swift_output_map.json ${input:SRCS} && $SWIFT_COMPILER -c $SWIFT_FLAGS_PLATFORM $Flags $SWIFT_BRIDGE_HEADER ${pre=-Xcc -I:_C__INCLUDE} ${input:SRCS} -emit-objc-header -emit-objc-header-path ${output;suf=-Swift.h:REALPRJNAME} -emit-module -module-name $REALPRJNAME -output-file-map $BINDIR/swift_output_map.json ${output;hide;suf=.o:SRCS}
}
TEST_TOOL_HOST_LOCAL=
@@ -9085,54 +9085,54 @@ macro SDBUS_CPP_PROXY(File) {
.CMD=${tool:"contrib/libs/sdbus-cpp/tools/xml2cpp-codegen"} --proxy=${output;nopath;noext:File.proxy.h} ${input:File}
.PEERDIR=contrib/libs/sdbus-cpp
}
-
-
+
+
# tag:python-specific
-macro _PY_SSQLS_SRC(EXT, SRC, SRCFLAGS...) {
- #generic macro
-}
-
+macro _PY_SSQLS_SRC(EXT, SRC, SRCFLAGS...) {
+ #generic macro
+}
+
# tag:python-specific
-macro _PY_SSQLS_SRC("ssqls", SRC, SRCFLAGS...) {
- .CMD=${tool:"metrika/core/tools/ssqls"} ${input;notransformbuilddir:SRC} -S $ARCADIA_ROOT -B $ARCADIA_BUILD_ROOT -L "python" -D $MODDIR $SRCFLAGS ${output;tobindir;noext;hide;pre=autogenerated/$MODDIR/:SRC.py}
-}
-
+macro _PY_SSQLS_SRC("ssqls", SRC, SRCFLAGS...) {
+ .CMD=${tool:"metrika/core/tools/ssqls"} ${input;notransformbuilddir:SRC} -S $ARCADIA_ROOT -B $ARCADIA_BUILD_ROOT -L "python" -D $MODDIR $SRCFLAGS ${output;tobindir;noext;hide;pre=autogenerated/$MODDIR/:SRC.py}
+}
+
# tag:python-specific
-macro _PY_SSQLS_SRCS(Srcs...) {
- foreach(Src: $Srcs) {
- _PY_SSQLS_SRC(${lastext:Src} $Src)
- }
-}
-
+macro _PY_SSQLS_SRCS(Srcs...) {
+ foreach(Src: $Srcs) {
+ _PY_SSQLS_SRC(${lastext:Src} $Src)
+ }
+}
+
# tag:python-specific
-macro PY_SSQLS_SRCS(Srcs...) {
- _PY_SSQLS_SRCS(KEEP_DIR_STRUCT $Srcs)
- PY_SRCS(${noext;pre=autogenerated/$MODDIR/:Srcs.py})
-}
-
+macro PY_SSQLS_SRCS(Srcs...) {
+ _PY_SSQLS_SRCS(KEEP_DIR_STRUCT $Srcs)
+ PY_SRCS(${noext;pre=autogenerated/$MODDIR/:Srcs.py})
+}
+
# tag:python-specific
-macro _PY_ENUM_SERIALIZATION_TO_JSON(File) {
- .CMD=$ENUM_PARSER_TOOL ${input:File} --output ${output;chksum;noext;suf=.generated.h:File} --json-output ${output;noext:File.json} ${kv;hide:"p EN"} ${kv;hide:"pc yellow"}
-}
-
+macro _PY_ENUM_SERIALIZATION_TO_JSON(File) {
+ .CMD=$ENUM_PARSER_TOOL ${input:File} --output ${output;chksum;noext;suf=.generated.h:File} --json-output ${output;noext:File.json} ${kv;hide:"p EN"} ${kv;hide:"pc yellow"}
+}
+
# tag:python-specific
-macro _PY_ENUM_SERIALIZATION_TO_PY(File) {
- .CMD=${tool:"metrika/core/tools/python_enum_generator"} ${input;noext:File.json} -D ${MODDIR} --output ${output;noext:File.py} ${kv;hide:"p EN"} ${kv;hide:"pc yellow"}
-}
-
+macro _PY_ENUM_SERIALIZATION_TO_PY(File) {
+ .CMD=${tool:"metrika/core/tools/python_enum_generator"} ${input;noext:File.json} -D ${MODDIR} --output ${output;noext:File.py} ${kv;hide:"p EN"} ${kv;hide:"pc yellow"}
+}
+
# tag:metrika
-multimodule SSQLS_LIBRARY {
- module CPP_SSQLS : LIBRARY {
- .ALIASES=ENUMS_SERIALIZATION=CPP_ENUMS_SERIALIZATION
- SET(PEERDIR_TAGS CPP_SSQLS)
+multimodule SSQLS_LIBRARY {
+ module CPP_SSQLS : LIBRARY {
+ .ALIASES=ENUMS_SERIALIZATION=CPP_ENUMS_SERIALIZATION
+ SET(PEERDIR_TAGS CPP_SSQLS)
PEERDIR(metrika/core/libs/appmetrica/types metrika/core/libs/types)
ADDINCL(GLOBAL ${ARCADIA_BUILD_ROOT}/metrika/core/common_tables/include)
- }
- module PY3_SSQLS : PY3_LIBRARY {
- .ALIASES=SRCS=PY_SSQLS_SRCS ENUMS_SERIALIZATION=PY_ENUMS_SERIALIZATION
- SET(PEERDIR_TAGS PY3 PY3_SSQLS)
- }
-}
+ }
+ module PY3_SSQLS : PY3_LIBRARY {
+ .ALIASES=SRCS=PY_SSQLS_SRCS ENUMS_SERIALIZATION=PY_ENUMS_SERIALIZATION
+ SET(PEERDIR_TAGS PY3 PY3_SSQLS)
+ }
+}
macro NGINX_MODULES(Modules...) {
PEERDIR(${Modules})
diff --git a/build/ymake_conf.py b/build/ymake_conf.py
index 0beb55b3a9..30219eb85e 100755
--- a/build/ymake_conf.py
+++ b/build/ymake_conf.py
@@ -2045,11 +2045,11 @@ class LD(Linker):
soname_flag = '-Wl,{option},${{_SONAME}}'.format(option=self.soname_option)
shared_flag = '-shared'
exec_shared_flag = '-pie -fPIE -Wl,--unresolved-symbols=ignore-all -rdynamic' if self.target.is_linux else ''
- if self.whole_archive:
- srcs_globals = self.whole_archive + ' ${rootrel;ext=.a:SRCS_GLOBAL} ' + self.no_whole_archive \
- + ' ${rootrel;ext=.o:SRCS_GLOBAL} ${rootrel;ext=.supp:SRCS_GLOBAL}'
- else:
- srcs_globals = '--start-wa ${rootrel;ext=.a:SRCS_GLOBAL} --end-wa ${rootrel;ext=.o:SRCS_GLOBAL} ${rootrel;ext=.supp:SRCS_GLOBAL}'
+ if self.whole_archive:
+ srcs_globals = self.whole_archive + ' ${rootrel;ext=.a:SRCS_GLOBAL} ' + self.no_whole_archive \
+ + ' ${rootrel;ext=.o:SRCS_GLOBAL} ${rootrel;ext=.supp:SRCS_GLOBAL}'
+ else:
+ srcs_globals = '--start-wa ${rootrel;ext=.a:SRCS_GLOBAL} --end-wa ${rootrel;ext=.o:SRCS_GLOBAL} ${rootrel;ext=.supp:SRCS_GLOBAL}'
ld_env_style = '${cwd:ARCADIA_BUILD_ROOT} $TOOLCHAIN_ENV ${kv;hide:"p LD"} ${requirements;hide:LD_REQUIREMENTS} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"}'
@@ -2152,23 +2152,23 @@ class LD(Linker):
archiver = '$YMAKE_PYTHON ${input:"build/scripts/link_lib.py"} ${quo:AR_TOOL} $AR_TYPE %s $ARCADIA_BUILD_ROOT %s' % (self.llvm_ar_format, self.ar_plugin or 'None')
# Static Library
emit('LINK_LIB', '$GENERATE_MF &&', archiver, '$TARGET', tail_link_lib)
- emit('GLOBAL_LINK_LIB', archiver, '$GLOBAL_TARGET', tail_link_lib)
+ emit('GLOBAL_LINK_LIB', archiver, '$GLOBAL_TARGET', tail_link_lib)
# "Fat Object" : pre-linked global objects and static library with all dependencies
- def emit_link_fat_obj(cmd_name, need_wa_option, *extended_flags):
+ def emit_link_fat_obj(cmd_name, need_wa_option, *extended_flags):
prefix = ['$GENERATE_MF && $GENERATE_VCS_C_INFO_NODEP &&',
'$YMAKE_PYTHON ${input:"build/scripts/link_fat_obj.py"} --build-root $ARCADIA_BUILD_ROOT']
globals_libs = srcs_globals if need_wa_option else '${rootrel;ext=.a:SRCS_GLOBAL} ${rootrel;ext=.o:SRCS_GLOBAL}'
suffix = [arch_flag,
- '-Ya,input $AUTO_INPUT $VCS_C_OBJ -Ya,global_srcs', globals_libs, '-Ya,peers $PEERS',
- '-Ya,linker $CXX_COMPILER $LDFLAGS_GLOBAL $C_FLAGS_PLATFORM', self.ld_sdk, '-Ya,archiver', archiver,
+ '-Ya,input $AUTO_INPUT $VCS_C_OBJ -Ya,global_srcs', globals_libs, '-Ya,peers $PEERS',
+ '-Ya,linker $CXX_COMPILER $LDFLAGS_GLOBAL $C_FLAGS_PLATFORM', self.ld_sdk, '-Ya,archiver', archiver,
'$TOOLCHAIN_ENV ${kv;hide:"p LD"} ${requirements;hide:LD_REQUIREMENTS} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"}']
emit(cmd_name, *(prefix + list(extended_flags) + suffix))
# TODO(somov): Проверить, не нужны ли здесь все остальные флаги компоновки (LDFLAGS и т. д.).
- emit_link_fat_obj('LINK_FAT_OBJECT', True, '--obj=$TARGET', '--lib=${output:REALPRJNAME.a}')
- emit_link_fat_obj('LINK_RECURSIVE_LIBRARY', False, '--lib=$TARGET', '--with-own-obj', '--with-global-srcs')
- emit_link_fat_obj('LINK_FAT_OBJECT_LIBRARY', False, '--lib=$TARGET', '$FAT_OBJECT_ARGS', '$FAT_OBJECT_OUTS')
+ emit_link_fat_obj('LINK_FAT_OBJECT', True, '--obj=$TARGET', '--lib=${output:REALPRJNAME.a}')
+ emit_link_fat_obj('LINK_RECURSIVE_LIBRARY', False, '--lib=$TARGET', '--with-own-obj', '--with-global-srcs')
+ emit_link_fat_obj('LINK_FAT_OBJECT_LIBRARY', False, '--lib=$TARGET', '$FAT_OBJECT_ARGS', '$FAT_OBJECT_OUTS')
emit('LIBRT', '-lrt')
emit('MD5LIB', '-lcrypt')
@@ -2766,33 +2766,33 @@ class MSVCLinker(MSVC, Linker):
'-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',
)
- # we split srcs_global into two groups: libs and objs
- # # each group can be in its own command file
- # first group need /WHOLEARCHIVE: prefix which will be added in fix_msvc_output.py or run_msvc_wine.py
- # the tail of link commands will be added in the third command file
- srcs_globals = '--start-wa --ya-start-command-file ${qe;rootrel;ext=.lib:SRCS_GLOBAL} --ya-end-command-file --end-wa \
- --ya-start-command-file ${qe;rootrel;ext=.obj:SRCS_GLOBAL} --ya-end-command-file'
+ # we split srcs_global into two groups: libs and objs
+ # # each group can be in its own command file
+ # first group need /WHOLEARCHIVE: prefix which will be added in fix_msvc_output.py or run_msvc_wine.py
+ # the tail of link commands will be added in the third command file
+ srcs_globals = '--start-wa --ya-start-command-file ${qe;rootrel;ext=.lib:SRCS_GLOBAL} --ya-end-command-file --end-wa \
+ --ya-start-command-file ${qe;rootrel;ext=.obj:SRCS_GLOBAL} --ya-end-command-file'
emit('REAL_LINK_DYN_LIB_CMDLINE', '${TOOLCHAIN_ENV} ${cwd:ARCADIA_BUILD_ROOT} ${LINK_WRAPPER} ${LINK_WRAPPER_DYNLIB} ${LINK_EXE_CMD} \
${LINK_IMPLIB_VALUE} /DLL /OUT:${qe;rootrel:TARGET} ${LINK_EXTRA_OUTPUT} ${EXPORTS_VALUE} \
${pre=--whole-archive-peers :WHOLE_ARCHIVE_PEERS} \
${pre=--whole-archive-libs :_WHOLE_ARCHIVE_LIBS_VALUE_GLOBAL}',
srcs_globals, '--ya-start-command-file ${VCS_C_OBJ_RR} ${qe;rootrel:AUTO_INPUT} ${qe;rootrel;ext=.lib:PEERS} ${qe;rootrel;ext=.dll;noext;suf=.lib:PEERS} \
- $LINK_EXE_FLAGS $LINK_STDLIBS $LDFLAGS $LDFLAGS_GLOBAL $OBJADDE --ya-end-command-file')
+ $LINK_EXE_FLAGS $LINK_STDLIBS $LDFLAGS $LDFLAGS_GLOBAL $OBJADDE --ya-end-command-file')
emit('REAL_LINK_DYN_LIB', '$REAL_LINK_DYN_LIB_IMPL($_WHOLE_ARCHIVE_PEERS_VALUE)')
emit('SWIG_DLL_JAR_CMD', '$GENERATE_MF && $GENERATE_VCS_C_INFO_NODEP && $REAL_SWIG_DLL_JAR_CMD')
- head_link_lib = '${TOOLCHAIN_ENV} ${cwd:ARCADIA_BUILD_ROOT} ${LIB_WRAPPER} ${LINK_LIB_CMD}'
+ head_link_lib = '${TOOLCHAIN_ENV} ${cwd:ARCADIA_BUILD_ROOT} ${LIB_WRAPPER} ${LINK_LIB_CMD}'
tail_link_lib = '--ya-start-command-file ${qe;rootrel:AUTO_INPUT} $LINK_LIB_FLAGS --ya-end-command-file \
${requirements;hide:LIB_REQUIREMENTS} ${hide;kv:"soe"} ${hide;kv:"p AR"} ${hide;kv:"pc light-red"}'
- emit('LINK_LIB', '${GENERATE_MF} &&', head_link_lib, '/OUT:${qe;rootrel:TARGET}', tail_link_lib)
- emit('GLOBAL_LINK_LIB', head_link_lib, '/OUT:${qe;rootrel:GLOBAL_TARGET}', tail_link_lib)
-
+ emit('LINK_LIB', '${GENERATE_MF} &&', head_link_lib, '/OUT:${qe;rootrel:TARGET}', tail_link_lib)
+ emit('GLOBAL_LINK_LIB', head_link_lib, '/OUT:${qe;rootrel:GLOBAL_TARGET}', tail_link_lib)
+
emit('LINK_EXE_CMDLINE', '${GENERATE_MF} && $GENERATE_VCS_C_INFO_NODEP && ${TOOLCHAIN_ENV} ${cwd:ARCADIA_BUILD_ROOT} ${LINK_WRAPPER}',
'${LINK_EXE_CMD} /OUT:${qe;rootrel:TARGET} \
${pre=--whole-archive-peers :WHOLE_ARCHIVE_PEERS} \
${pre=--whole-archive-libs :_WHOLE_ARCHIVE_LIBS_VALUE_GLOBAL} ',
- '${LINK_EXTRA_OUTPUT}', srcs_globals, '--ya-start-command-file ${VCS_C_OBJ_RR} ${qe;rootrel:AUTO_INPUT} $LINK_EXE_FLAGS $LINK_STDLIBS $LDFLAGS $LDFLAGS_GLOBAL $OBJADDE \
+ '${LINK_EXTRA_OUTPUT}', srcs_globals, '--ya-start-command-file ${VCS_C_OBJ_RR} ${qe;rootrel:AUTO_INPUT} $LINK_EXE_FLAGS $LINK_STDLIBS $LDFLAGS $LDFLAGS_GLOBAL $OBJADDE \
${qe;rootrel;ext=.lib:PEERS} ${qe;rootrel;ext=.dll;noext;suf=.lib:PEERS} --ya-end-command-file \
${hide;kv:"soe"} ${hide;kv:"p LD"} ${requirements;hide:LD_REQUIREMENTS} ${hide;kv:"pc blue"}')
emit('LINK_EXE', '$LINK_EXE_IMPL($_WHOLE_ARCHIVE_PEERS_VALUE)')
@@ -2808,10 +2808,10 @@ class MSVCLinker(MSVC, Linker):
${hide;kv:"soe"} ${hide;kv:"p LD"} ${requirements;hide:LD_REQUIREMENTS} ${hide;kv:"pc blue"}')
emit('LINK_EXEC_DYN_LIB', '$LINK_EXEC_DYN_LIB_IMPL($_WHOLE_ARCHIVE_PEERS_VALUE)')
- emit('LINK_GLOBAL_FAT_OBJECT', '${TOOLCHAIN_ENV} ${cwd:ARCADIA_BUILD_ROOT} ${LIB_WRAPPER} ${LINK_LIB_CMD} /OUT:${qe;rootrel:TARGET} \
+ emit('LINK_GLOBAL_FAT_OBJECT', '${TOOLCHAIN_ENV} ${cwd:ARCADIA_BUILD_ROOT} ${LIB_WRAPPER} ${LINK_LIB_CMD} /OUT:${qe;rootrel:TARGET} \
--ya-start-command-file ${qe;rootrel;ext=.lib:SRCS_GLOBAL} ${qe;rootrel;ext=.obj:SRCS_GLOBAL} ${qe;rootrel:AUTO_INPUT} $LINK_LIB_FLAGS --ya-end-command-file')
- emit('LINK_PEERS_FAT_OBJECT', '${TOOLCHAIN_ENV} ${cwd:ARCADIA_BUILD_ROOT} ${LIB_WRAPPER} ${LINK_LIB_CMD} /OUT:${qe;rootrel;output:REALPRJNAME.lib} \
- --ya-start-command-file ${qe;rootrel:PEERS} $LINK_LIB_FLAGS --ya-end-command-file')
+ emit('LINK_PEERS_FAT_OBJECT', '${TOOLCHAIN_ENV} ${cwd:ARCADIA_BUILD_ROOT} ${LIB_WRAPPER} ${LINK_LIB_CMD} /OUT:${qe;rootrel;output:REALPRJNAME.lib} \
+ --ya-start-command-file ${qe;rootrel:PEERS} $LINK_LIB_FLAGS --ya-end-command-file')
emit('LINK_FAT_OBJECT', '${GENERATE_MF} && $GENERATE_VCS_C_INFO_NODEP && $LINK_GLOBAL_FAT_OBJECT && $LINK_PEERS_FAT_OBJECT ${kv;hide:"p LD"} ${requirements;hide:LD_REQUIREMENTS} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"}') # noqa E501