diff options
author | lagrunge <lagrunge@yandex-team.ru> | 2022-02-10 16:51:40 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:51:40 +0300 |
commit | dbecdfc04950058596c98da27440fe7fc105b5f6 (patch) | |
tree | 3cbc721ecacceeda3516a9f80572e52458cc8a1b /build | |
parent | 368058fa36ac29dde5ef05db66072c998a47fb58 (diff) | |
download | ydb-dbecdfc04950058596c98da27440fe7fc105b5f6.tar.gz |
Restoring authorship annotation for <lagrunge@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'build')
-rw-r--r-- | build/plugins/build_mn_files.py | 2 | ||||
-rwxr-xr-x | build/scripts/build_mn.py | 32 | ||||
-rw-r--r-- | build/ymake.core.conf | 6 |
3 files changed, 20 insertions, 20 deletions
diff --git a/build/plugins/build_mn_files.py b/build/plugins/build_mn_files.py index 4da76f1852..ee79eb44f2 100644 --- a/build/plugins/build_mn_files.py +++ b/build/plugins/build_mn_files.py @@ -24,6 +24,6 @@ def on_build_mns_files(unit, *args): for filename in files: file_basename, _ = splitext(basename(filename)) - asmdataname = "staticMn{0}{1}Ptr".format(ranking_suffix, file_basename) + asmdataname = "staticMn{0}{1}Ptr".format(ranking_suffix, file_basename) output_name = 'mn.staticMn{0}{1}Ptr.cpp'.format(ranking_suffix, file_basename) unit.on_build_mns_file([filename, name, output_name, ranking_suffix, check, fml_unused_tool, asmdataname]) diff --git a/build/scripts/build_mn.py b/build/scripts/build_mn.py index 5bb03c247c..2669dde35e 100755 --- a/build/scripts/build_mn.py +++ b/build/scripts/build_mn.py @@ -16,7 +16,7 @@ def get_value(val): class BuildMnBase(object): - def Run(self, mninfo, mnname, mnrankingSuffix, mncppPath, check=False, ptr=False, multi=False): + def Run(self, mninfo, mnname, mnrankingSuffix, mncppPath, check=False, ptr=False, multi=False): self.mninfo = mninfo self.mnname = mnname self.mnrankingSuffix = mnrankingSuffix @@ -24,10 +24,10 @@ class BuildMnBase(object): self.check = check self.ptr = ptr self.multi = multi - dataprefix = "MN_External_" - mninfoName = os.path.basename(self.mninfo) - data = dataprefix + mnname - datasize = data + "Size" + dataprefix = "MN_External_" + mninfoName = os.path.basename(self.mninfo) + data = dataprefix + mnname + datasize = data + "Size" if self.multi: if self.ptr: @@ -39,10 +39,10 @@ class BuildMnBase(object): else: if self.ptr: mntype = "const NMatrixnet::TMnSsePtr" - mnload = "(new NMatrixnet::TMnSseInfo({1}, {2}, \"{0}\"))".format(mninfoName, data, datasize) + mnload = "(new NMatrixnet::TMnSseInfo({1}, {2}, \"{0}\"))".format(mninfoName, data, datasize) else: mntype = "const NMatrixnet::TMnSseInfo" - mnload = "({1}, {2}, \"{0}\")".format(mninfoName, data, datasize) + mnload = "({1}, {2}, \"{0}\")".format(mninfoName, data, datasize) if self.check: self.CheckMn() @@ -54,16 +54,16 @@ class BuildMnBase(object): mncpptmp.write("#include <kernel/matrixnet/mn_multi_categ.h>\n") else: mncpptmp.write("#include <kernel/matrixnet/mn_sse.h>\n") - - rodatapath = os.path.dirname(self.mncppPath) + "/" + dataprefix + self.mnname + ".rodata" - mncpptmp.write("namespace{\n") - mncpptmp.write(" extern \"C\" {\n") - mncpptmp.write(" extern const unsigned char {1}{0}[];\n".format(self.mnname, dataprefix)) - mncpptmp.write(" extern const ui32 {1}{0}Size;\n".format(self.mnname, dataprefix)) - mncpptmp.write(" }\n") - mncpptmp.write("}\n") + + rodatapath = os.path.dirname(self.mncppPath) + "/" + dataprefix + self.mnname + ".rodata" + mncpptmp.write("namespace{\n") + mncpptmp.write(" extern \"C\" {\n") + mncpptmp.write(" extern const unsigned char {1}{0}[];\n".format(self.mnname, dataprefix)) + mncpptmp.write(" extern const ui32 {1}{0}Size;\n".format(self.mnname, dataprefix)) + mncpptmp.write(" }\n") + mncpptmp.write("}\n") archiverCall = subprocess.Popen([self.archiver, "-q", "-p", "-o", rodatapath, self.mninfo], stdout=None, stderr=subprocess.PIPE) - archiverCall.wait() + archiverCall.wait() mncpptmp.write("extern {0} {1};\n".format(mntype, self.mnname)) mncpptmp.write("{0} {1}{2};".format(mntype, self.mnname, mnload)) mncpptmp.close() diff --git a/build/ymake.core.conf b/build/ymake.core.conf index 081833998b..1a8f8f7f20 100644 --- a/build/ymake.core.conf +++ b/build/ymake.core.conf @@ -6843,8 +6843,8 @@ BUILD_MN_SCRIPT=build/scripts/build_mn.py ### Alternative macro BUILD_MNS() works faster and better for large files. macro BUILD_MN(MnInfo, MnName, CHECK?"fml_tool=$FML_UNUSED_TOOL CHECK":"", MULTI?, PTR?, RANKING_SUFFIX="") { .CMD=$YMAKE_PYTHON ${input:BUILD_MN_SCRIPT} BuildMnF $ARCADIA_ROOT $ARCH_TOOL ${input:MnInfo} $MnName ranking_suffix=$RANKING_SUFFIX ${output;chksum;pre=mn.:MnName.cpp} ${output;hide;pre=MN_External_;suf=.rodata:MnName} ${output_include;hide:"kernel/matrixnet/mn_sse.h"} $CHECK $MULTI $PTR ${kv;hide:"p MN"} ${kv;hide:"pc yellow"} -} - +} + macro _BUILD_MNS_FILE(Input, Name, Output, Suffix, Check, Fml_tool, AsmDataName) { .CMD=$YMAKE_PYTHON ${input:BUILD_MN_SCRIPT} BuildMnsFilesF $ARCADIA_ROOT $BINDIR $ARCH_TOOL fml_tool=$Fml_tool $Name ranking_suffix=$Suffix ${input:Input} ${output;hide:Output} ${output;hide;pre=MN_External_;suf=.rodata:AsmDataName} ${output_include;hide:"kernel/matrixnet/mn_sse.h"} ${kv;hide:"p MN"} ${kv;hide:"pc yellow"} } @@ -6860,7 +6860,7 @@ macro _BUILD_MNS_HEADER(NAME="", CHECK?, RANKING_SUFFIX="", Files...) { } # TODO: support foreach_in and keywords simultaneous usage (look at BUILD_MNS_FILES) - + # tag:matrixnet ### @usage: BUILD_MNS([CHECK] NAME listname mninfos...) # matrixnet ### |