summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorApollon Oikonomopoulos <apoikos@debian.org>2018-12-04 10:55:27 +0200
committerApollon Oikonomopoulos <apoikos@debian.org>2018-12-04 10:55:27 +0200
commit9de4d348a74c4b4e4f236ac36d7bc01fa0345ee6 (patch)
tree6d7a9b5f62990d3f6858e83b531c0f98776d6e42
parent37ece3d372c00e24d9254e549b5d0da65bd87751 (diff)
Strip test binaries to reduce build disk usage
Patch imported from Ubuntu. Git-Dch: Full Thanks: Dimitri John Ledkov and Robie Basak for the patch
-rw-r--r--debian/patches/series1
-rw-r--r--debian/patches/strip-test-binaries.patch24
2 files changed, 25 insertions, 0 deletions
diff --git a/debian/patches/series b/debian/patches/series
index 3a1dfe52460..9a3098b64ec 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@ fix-ftbfs-with-gcc-7.patch
asio-openssl-1.1-support.patch
fix-ftbfs-with-openssl-1.1.1.patch
fix-ftbfs-with-boost-1.66.patch
+strip-test-binaries.patch
diff --git a/debian/patches/strip-test-binaries.patch b/debian/patches/strip-test-binaries.patch
new file mode 100644
index 00000000000..0fd4f2b1fc4
--- /dev/null
+++ b/debian/patches/strip-test-binaries.patch
@@ -0,0 +1,24 @@
+Description: Strip test binaries by default
+ This is needed to reduce build size to within Launchpad's limit.
+Author: Dimitri John Ledkov <xnox@ubuntu.com>
+Bug: https://jira.mongodb.org/browse/SERVER-34079
+Bug-Ubuntu: https://launchpad.net/bugs/1763119
+Forwarded: no
+Last-Update: 2018-03-23
+
+--- juju-mongodb3.6-3.6.3.orig/site_scons/site_tools/mongo_unittest.py
++++ juju-mongodb3.6-3.6.3/site_scons/site_tools/mongo_unittest.py
+@@ -23,7 +23,13 @@ def build_cpp_unit_test(env, target, sou
+ libdeps = kwargs.get('LIBDEPS', [])
+ libdeps.append( '$BUILD_DIR/mongo/unittest/unittest_main' )
+
++ linkflags = []
++ linkflags.extend(env.get('LINKFLAGS', []))
++ linkflags.extend(kwargs.get('LINKFLAGS', []))
++ linkflags.append('-Wl,--strip-debug')
++
+ kwargs['LIBDEPS'] = libdeps
++ kwargs['LINKFLAGS'] = linkflags
+
+ result = env.Program(target, source, **kwargs)
+ env.RegisterUnitTest(result[0])