teach LIT how to detect the glibc version
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@296942 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -401,6 +401,14 @@ class Configuration(object):
|
||||
if self.is_windows:
|
||||
self.config.available_features.add('windows')
|
||||
|
||||
# Attempt to detect the glibc version by querying
|
||||
macros = self.cxx.dumpMacros(flags=['-include', 'features.h'])
|
||||
if macros is not None and '__GLIBC__' in macros:
|
||||
maj_v, min_v = (macros['__GLIBC__'], macros['__GLIBC_MINOR__'])
|
||||
self.config.available_features.add('glibc')
|
||||
self.config.available_features.add('glibc-%s' % maj_v)
|
||||
self.config.available_features.add('glibc-%s.%s' % (maj_v, min_v))
|
||||
|
||||
def configure_compile_flags(self):
|
||||
no_default_flags = self.get_lit_bool('no_default_flags', False)
|
||||
if not no_default_flags:
|
||||
|
||||
Reference in New Issue
Block a user