aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2017-04-22 14:26:25 +0300
committerGitHub <noreply@github.com>2017-04-22 14:26:25 +0300
commite107017b3bc73d8f04d43d47f2ccb7eecc817aaa (patch)
treebfb41827fd039731d7b1a1dcd1f4478e9825f45c /run_unittests.py
parent47579d3acba484d9c801fc9a2e751ffa3194eee5 (diff)
parent61ed2702bf83210d08b4eec9870d081fdedea0fe (diff)
downloadmeson-e107017b3bc73d8f04d43d47f2ccb7eecc817aaa.zip
meson-e107017b3bc73d8f04d43d47f2ccb7eecc817aaa.tar.gz
meson-e107017b3bc73d8f04d43d47f2ccb7eecc817aaa.tar.bz2
Merge pull request #1649 from centricular/static-lto
Fix LTO + static libraries on GCC and Clang
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 3e98c21..20464e0 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -1060,6 +1060,17 @@ class AllPlatformTests(BasePlatformTests):
self.utime(os.path.join(testdir, f))
self.assertRebuiltTarget('prog')
+ def test_static_library_lto(self):
+ '''
+ Test that static libraries can be built with LTO and linked to
+ executables. On Linux, this requires the use of gcc-ar.
+ https://github.com/mesonbuild/meson/issues/1646
+ '''
+ testdir = os.path.join(self.common_test_dir, '5 linkstatic')
+ self.init(testdir, extra_args='-Db_lto=true')
+ self.build()
+ self.run_tests()
+
class WindowsTests(BasePlatformTests):
'''