aboutsummaryrefslogtreecommitdiffstats
path: root/build/scripts/link_dyn_lib.py
diff options
context:
space:
mode:
authorMikhail Borisov <borisov.mikhail@gmail.com>2022-02-10 16:45:40 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:40 +0300
commit5d50718e66d9c037dc587a0211110b7d25a66185 (patch)
treee98df59de24d2ef7c77baed9f41e4875a2fef972 /build/scripts/link_dyn_lib.py
parenta6a92afe03e02795227d2641b49819b687f088f8 (diff)
downloadydb-5d50718e66d9c037dc587a0211110b7d25a66185.tar.gz
Restoring authorship annotation for Mikhail Borisov <borisov.mikhail@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'build/scripts/link_dyn_lib.py')
-rw-r--r--build/scripts/link_dyn_lib.py42
1 files changed, 21 insertions, 21 deletions
diff --git a/build/scripts/link_dyn_lib.py b/build/scripts/link_dyn_lib.py
index ddd3d6d658..23487f5c1e 100644
--- a/build/scripts/link_dyn_lib.py
+++ b/build/scripts/link_dyn_lib.py
@@ -4,19 +4,19 @@ import subprocess
import tempfile
import collections
import optparse
-import pipes
+import pipes
from process_whole_archive_option import ProcessWholeArchiveOption
-def shlex_join(cmd):
- # equivalent to shlex.join() in python 3
- return ' '.join(
- pipes.quote(part)
- for part in cmd
- )
-
-
+def shlex_join(cmd):
+ # equivalent to shlex.join() in python 3
+ return ' '.join(
+ pipes.quote(part)
+ for part in cmd
+ )
+
+
def parse_export_file(p):
with open(p, 'r') as f:
for l in f:
@@ -165,7 +165,7 @@ def parse_args():
parser.add_option('--target')
parser.add_option('--soname')
parser.add_option('--fix-elf')
- parser.add_option('--linker-output')
+ 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')
@@ -180,18 +180,18 @@ if __name__ == '__main__':
cmd = fix_cmd(opts.arch, opts.musl, args)
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')
- else:
- stdout = sys.stdout
-
- proc = subprocess.Popen(cmd, shell=False, stderr=sys.stderr, stdout=stdout)
+
+ if opts.linker_output:
+ stdout = open(opts.linker_output, 'w')
+ else:
+ stdout = sys.stdout
+
+ proc = subprocess.Popen(cmd, shell=False, stderr=sys.stderr, stdout=stdout)
proc.communicate()
if proc.returncode:
- print >>sys.stderr, 'linker has failed with retcode:', proc.returncode
- print >>sys.stderr, 'linker command:', shlex_join(cmd)
+ print >>sys.stderr, 'linker has failed with retcode:', proc.returncode
+ print >>sys.stderr, 'linker command:', shlex_join(cmd)
sys.exit(proc.returncode)
if opts.fix_elf:
@@ -200,8 +200,8 @@ if __name__ == '__main__':
proc.communicate()
if proc.returncode:
- print >>sys.stderr, 'fix_elf has failed with retcode:', proc.returncode
- print >>sys.stderr, 'fix_elf command:', shlex_join(cmd)
+ print >>sys.stderr, 'fix_elf has failed with retcode:', proc.returncode
+ print >>sys.stderr, 'fix_elf command:', shlex_join(cmd)
sys.exit(proc.returncode)
if opts.soname and opts.soname != opts.target: