aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-04-20 20:47:10 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2017-04-20 20:47:10 +0530
commita8f360c5c36bc8faef90c1fd073bf5f8ec0a64a0 (patch)
treeafebca0b20c5a44e296ba520caf1f5de69c362d4
parent4588b910960c24fd61679124b6fd737c90e14c46 (diff)
downloadmeson-a8f360c5c36bc8faef90c1fd073bf5f8ec0a64a0.zip
meson-a8f360c5c36bc8faef90c1fd073bf5f8ec0a64a0.tar.gz
meson-a8f360c5c36bc8faef90c1fd073bf5f8ec0a64a0.tar.bz2
unit tests: Add a test case for LTO + static libraries
Tests https://github.com/mesonbuild/meson/issues/1646
-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):
'''