summaryrefslogtreecommitdiffstats
path: root/third_party/instrumented_libraries/scripts
diff options
context:
space:
mode:
authorearthdok <earthdok@chromium.org>2015-03-18 11:24:08 -0700
committerCommit bot <commit-bot@chromium.org>2015-03-18 18:24:56 +0000
commit54fa4b3ab3bf4c682d8c66c069c305f66d82bbfd (patch)
treecf02ca90293f7876602d88bf2599addc571cd3b9 /third_party/instrumented_libraries/scripts
parenta1c84bc83dcf5cb61d907c2d4285ebebb39315a1 (diff)
downloadchromium_src-54fa4b3ab3bf4c682d8c66c069c305f66d82bbfd.zip
chromium_src-54fa4b3ab3bf4c682d8c66c069c305f66d82bbfd.tar.gz
chromium_src-54fa4b3ab3bf4c682d8c66c069c305f66d82bbfd.tar.bz2
Instrumented libraries: more aggressive cleanup.
Do not leave unnecessary files in the output dir. BUG=none R=glider@chromium.org NOTRY=true Review URL: https://codereview.chromium.org/1020583002 Cr-Commit-Position: refs/heads/master@{#321172}
Diffstat (limited to 'third_party/instrumented_libraries/scripts')
-rwxr-xr-xthird_party/instrumented_libraries/scripts/download_build_install.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/third_party/instrumented_libraries/scripts/download_build_install.py b/third_party/instrumented_libraries/scripts/download_build_install.py
index 3bd24fa..56c4014 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.