From a8f360c5c36bc8faef90c1fd073bf5f8ec0a64a0 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Thu, 20 Apr 2017 20:47:10 +0530 Subject: unit tests: Add a test case for LTO + static libraries Tests https://github.com/mesonbuild/meson/issues/1646 --- run_unittests.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'run_unittests.py') 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): ''' -- cgit v1.1