[libcxx] r340419 - Merging r340406:

Hans Wennborg via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 22 09:39:25 PDT 2018


Author: hans
Date: Wed Aug 22 09:39:24 2018
New Revision: 340419

URL: http://llvm.org/viewvc/llvm-project?rev=340419&view=rev
Log:
Merging r340406:
------------------------------------------------------------------------
r340406 | ericwf | 2018-08-22 15:29:52 +0200 (Wed, 22 Aug 2018) | 12 lines

Attempt to unbreak filesystem tests on certain linux distros.

On some platforms clock_gettime is in librt, which we don't
link by default when building the tests. However it is required
by the filesystem tests.

This patch introduces a workaround which links librt whenever
the filesystem tests are enabled. The workaround should later
be replaced with a patch that selectively links both libc++fs
and librt only when building filesystem specific tests. However,
the way the test configuration is set up right now, this is
non-trivial.
------------------------------------------------------------------------

Modified:
    libcxx/branches/release_70/   (props changed)
    libcxx/branches/release_70/utils/libcxx/test/target_info.py

Propchange: libcxx/branches/release_70/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Aug 22 09:39:24 2018
@@ -1,2 +1,2 @@
 /libcxx/branches/apple:136569-137939
-/libcxx/trunk:339431,339675,339697,339702,339741-339743,339794,339804,339816,339874
+/libcxx/trunk:339431,339675,339697,339702,339741-339743,339794,339804,339816,339874,340406

Modified: libcxx/branches/release_70/utils/libcxx/test/target_info.py
URL: http://llvm.org/viewvc/llvm-project/libcxx/branches/release_70/utils/libcxx/test/target_info.py?rev=340419&r1=340418&r2=340419&view=diff
==============================================================================
--- libcxx/branches/release_70/utils/libcxx/test/target_info.py (original)
+++ libcxx/branches/release_70/utils/libcxx/test/target_info.py Wed Aug 22 09:39:24 2018
@@ -222,12 +222,17 @@ class LinuxLocalTI(DefaultTargetInfo):
                           self.full_config.config.available_features)
         llvm_unwinder = self.full_config.get_lit_bool('llvm_unwinder', False)
         shared_libcxx = self.full_config.get_lit_bool('enable_shared', True)
+        # FIXME: Remove the need to link -lrt in all the tests, and instead
+        # limit it only to the filesystem tests. This ensures we don't cause an
+        # implicit dependency on librt except when filesystem is needed.
+        enable_fs = self.full_config.get_lit_bool('enable_filesystem',
+                                                  default=False)
         flags += ['-lm']
         if not llvm_unwinder:
             flags += ['-lgcc_s', '-lgcc']
         if enable_threads:
             flags += ['-lpthread']
-            if not shared_libcxx:
+            if not shared_libcxx or enable_fs:
               flags += ['-lrt']
         flags += ['-lc']
         if llvm_unwinder:




More information about the cfe-commits mailing list