aboutsummaryrefslogtreecommitdiffstats
path: root/build/plugins/rodata.py
diff options
context:
space:
mode:
authorsidorovaa <sidorovaa@yandex-team.ru>2022-02-10 16:47:53 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:53 +0300
commit09f39deb02382f740cd19dee5511ba781fd2f9d5 (patch)
tree19f064d2f5a2aa9c2fb80049de4eec87c721a503 /build/plugins/rodata.py
parentb05913d1c3c02a773578bceb7285084d2933ae86 (diff)
downloadydb-09f39deb02382f740cd19dee5511ba781fd2f9d5.tar.gz
Restoring authorship annotation for <sidorovaa@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'build/plugins/rodata.py')
-rw-r--r--build/plugins/rodata.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/build/plugins/rodata.py b/build/plugins/rodata.py
index 3ecb0f9a83..abe8131904 100644
--- a/build/plugins/rodata.py
+++ b/build/plugins/rodata.py
@@ -1,4 +1,4 @@
-import argparse
+import argparse
import os
import _common as common
@@ -74,21 +74,21 @@ class ROData(iw.CustomCommand):
def output(self):
return common.make_tuples([common.tobuilddir(common.stripext(self._path)) + '.o'])
- def requested_vars(self):
+ def requested_vars(self):
return [('includes', '_ASM__INCLUDE')]
-
- def run(self, extra_args, binary):
+
+ def run(self, extra_args, binary):
in_file = self.resolve_path(common.get(self.input, 0))
in_file_no_ext = common.stripext(in_file)
file_name = os.path.basename(in_file_no_ext)
file_size = os.path.getsize(in_file)
tmp_file = self.resolve_path(common.get(self.output, 0) + '.asm')
- parser = argparse.ArgumentParser(prog='rodata.py', add_help=False)
- parser.add_argument('--includes', help='module\'s addincls', nargs='*', required=False)
- args = parser.parse_args(extra_args)
- self._incl_dirs = args.includes
-
+ parser = argparse.ArgumentParser(prog='rodata.py', add_help=False)
+ parser.add_argument('--includes', help='module\'s addincls', nargs='*', required=False)
+ args = parser.parse_args(extra_args)
+ self._incl_dirs = args.includes
+
with open(tmp_file, 'w') as f:
f.write('global ' + self._prefix + file_name + '\n')
f.write('global ' + self._prefix + file_name + 'Size' + '\n')
@@ -112,7 +112,7 @@ class ROData(iw.CustomCommand):
def incls():
for x in self._incl_dirs:
yield '-I'
- yield x
+ yield x
cmd = [binary, '-f', self._fmt] + list(plt()) + ['-D', '_' + self._type + '_', '-D_YASM_'] + self._flags + list(incls()) + ['-o', common.get(self.output, 0), path]
self.call(cmd)
@@ -135,7 +135,7 @@ class RODataCXX(iw.CustomCommand):
def output(self):
return common.make_tuples([self.main_out()])
- def run(self, extra_args, binary):
+ def run(self, extra_args, binary):
with open(self.resolve_path(self.main_out()), 'w') as f:
f.write('static_assert(sizeof(unsigned int) == 4, "ups, something gone wrong");\n\n')
f.write('extern "C" {\n')