[libcxx] r215787 - Readding FreeBSD support to lit.cfg. Patch from Pawel Worach.

Eric Fiselier eric at efcs.ca
Fri Aug 15 16:24:00 PDT 2014


Author: ericwf
Date: Fri Aug 15 18:24:00 2014
New Revision: 215787

URL: http://llvm.org/viewvc/llvm-project?rev=215787&view=rev
Log:
Readding FreeBSD support to lit.cfg. Patch from Pawel Worach.

Pawel has been using this patch on his buildbots for a while. This should
allow the testsuite to run on FreeBSD with libcxxrt.

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=215787&r1=215786&r2=215787&view=diff
==============================================================================
--- libcxx/trunk/test/lit.cfg (original)
+++ libcxx/trunk/test/lit.cfg Fri Aug 15 18:24:00 2014
@@ -186,6 +186,14 @@ locales = {
         'ru_RU.UTF-8': 'ru_RU.UTF-8',
         'zh_CN.UTF-8': 'zh_CN.UTF-8',
     },
+    'FreeBSD' : {
+        'en_US.UTF-8': 'en_US.UTF-8',
+        'cs_CZ.ISO8859-2': 'cs_CZ.ISO8859-2',
+        'fr_FR.UTF-8': 'fr_FR.UTF-8',
+        'fr_CA.ISO8859-1': 'fr_CA.ISO8859-1',
+        'ru_RU.UTF-8': 'ru_RU.UTF-8',
+        'zh_CN.UTF-8': 'zh_CN.UTF-8',
+    },
     'Linux': {
         'en_US.UTF-8': 'en_US.UTF-8',
         'cs_CZ.ISO8859-2': 'cs_CZ.ISO-8859-2',
@@ -279,6 +287,8 @@ if link_flags_str is None:
         link_flags += ['-lsupc++']
       elif cxx_abi == 'libcxxabi':
         link_flags += ['-lc++abi']
+      elif cxx_abi == 'libcxxrt':
+        link_flags += ['-lcxxrt']
       elif cxx_abi == 'none':
         pass
       else:
@@ -289,6 +299,8 @@ if link_flags_str is None:
       elif sys.platform == 'linux2':
         link_flags += [ '-lgcc_eh', '-lc', '-lm', '-lpthread',
               '-lrt', '-lgcc_s']
+      elif sys.platform.startswith('freebsd'):
+        link_flags += ['-lc', '-lm', '-pthread', '-lgcc_s']
       else:
         lit_config.fatal("unrecognized system")
 
@@ -314,6 +326,9 @@ elif sys.platform == 'linux2':
         link_flags += ['-Wl,-R', libcxx_obj_root + '/lib']
     compile_flags += ['-D__STDC_FORMAT_MACROS', '-D__STDC_LIMIT_MACROS',
         '-D__STDC_CONSTANT_MACROS']
+elif sys.platform.startswith('freebsd'):
+    if not use_system_lib:
+        link_flags += ['-Wl,-R', libcxx_obj_root + '/lib']
 else:
     lit_config.fatal("unrecognized system")
 





More information about the cfe-commits mailing list