[cfe-commits] [libcxx] r124052 - /libcxx/trunk/test/lit.cfg

Chandler Carruth chandlerc at gmail.com
Sat Jan 22 17:05:20 PST 2011


Author: chandlerc
Date: Sat Jan 22 19:05:20 2011
New Revision: 124052

URL: http://llvm.org/viewvc/llvm-project?rev=124052&view=rev
Log:
Teach the Lit configuration to actually use the cxx0x setting when
constructing compile flags, and to link against the 'rt' library on
Linux for clock_gettime and friends.

Modified:
    libcxx/trunk/test/lit.cfg

Modified: libcxx/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/lit.cfg?rev=124052&r1=124051&r2=124052&view=diff
==============================================================================
--- libcxx/trunk/test/lit.cfg (original)
+++ libcxx/trunk/test/lit.cfg Sat Jan 22 19:05:20 2011
@@ -134,16 +134,21 @@
 else:
   libcxx_obj_root = "/usr"
 
+# Configure extra compiler flags.
+compile_flags = []
+if getattr(config, 'cxx_has_stdcxx0x_flag', False):
+  compile_flags += ['-std=c++0x']
+
 # Configure extra libraries.
 libraries = []
 if sys.platform == 'darwin':
   libraries += ['-lSystem']
 if sys.platform == 'linux2':
-  libraries += ['-lgcc_eh', '-lsupc++', '-lc', '-lm', '-lgcc_s']
+  libraries += ['-lgcc_eh', '-lsupc++', '-lc', '-lm', '-lrt', '-lgcc_s']
   libraries += ['-Wl,-R', libcxx_obj_root + '/lib']
 
 config.test_format = LibcxxTestFormat(cxx_under_test,
-                                      cpp_flags = ['-nostdinc++'] + include_paths,
+                                      cpp_flags = ['-nostdinc++'] + compile_flags + include_paths,
                                       ld_flags = ['-nodefaultlibs'] + library_paths + ['-lc++'] + libraries)
 
 config.target_triple = None





More information about the cfe-commits mailing list