Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1366)

Unified Diff: third_party/instrumented_libraries/scripts/download_build_install.py

Issue 1020583002: Instrumented libraries: more aggressive cleanup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/instrumented_libraries/scripts/download_build_install.py
diff --git a/third_party/instrumented_libraries/scripts/download_build_install.py b/third_party/instrumented_libraries/scripts/download_build_install.py
index 3bd24fa6fea76e7fa57c67fd69093b56735f6ea9..56c4014914d1ca626bf399ea93e2814b109adacc 100755
--- a/third_party/instrumented_libraries/scripts/download_build_install.py
+++ b/third_party/instrumented_libraries/scripts/download_build_install.py
@@ -199,6 +199,15 @@ class InstrumentedPackageBuilder(object):
"""Returns the final location of the DSOs."""
return os.path.join(self._destdir, self._libdir)
+ def cleanup_after_install(self):
+ """Removes unneeded files in self.temp_libdir()."""
+ # .la files are not needed, nuke them.
+ # In case --no-static is not supported, nuke any static libraries we built.
+ self.shell_call(
+ 'find %s -name *.la -or -name *.a | xargs rm -f' % self.temp_libdir())
+ # .pc files are not needed.
+ self.shell_call('rm %s/pkgconfig -rf' % self.temp_libdir())
+
def make(self, args, jobs=None, env=None, cwd=None):
"""Invokes `make'.
@@ -236,8 +245,7 @@ class InstrumentedPackageBuilder(object):
# Some packages don't support parallel install. Use -j1 always.
self.make_install(make_args, jobs=1)
- # .la files are not needed, nuke them.
- self.shell_call('rm %s/*.la -f' % self.temp_libdir())
+ self.cleanup_after_install()
self.fix_rpaths(self.temp_libdir())
@@ -264,6 +272,8 @@ class LibcapBuilder(InstrumentedPackageBuilder):
]
self.make_install(install_args)
+ self.cleanup_after_install()
+
self.fix_rpaths(self.temp_libdir())
# Now move the contents of the temporary destdir to their final place.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698