From: Nadav Har'El <n...@scylladb.com>
Committer: Nadav Har'El <n...@scylladb.com>
Branch: master
scripts/build: fix upload of unstrip-able shared objects
Before this patch, the upload process of scripts/build, when it sees
a shared object (*.so), it is stripped before uploading - into a new
file "*-stripped.so". If the strip process fails for some reason (e.g.,
the host's "strip" tool doesn't support a newer shared object), the
"*-stripped.so" file isn't created, but we nevertheless try to upload
it (and of course fail).
With this patch, if the strip fails, we print a warning message but
continue with uploading the original, unstripped, file.
Signed-off-by: Nadav Har'El <n...@scylladb.com>
---
diff --git a/scripts/manifest_common.py b/scripts/manifest_common.py
--- a/scripts/manifest_common.py
+++ b/scripts/manifest_common.py
@@ -74,5 +74,8 @@ def to_strip(filename):
if not os.path.exists(stripped_filename) \
or (os.path.getmtime(stripped_filename) < \
os.path.getmtime(filename)):
- subprocess.call(["strip", "-o", stripped_filename, filename])
+ ret = subprocess.call(["strip", "-o", stripped_filename,
filename])
+ if ret != 0:
+ print("Failed stripping %s. Using original." % filename)
+ return filename
return stripped_filename
--
You received this message because you are subscribed to the Google Groups "OSv
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to osv-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.