forked from OSchip/llvm-project
teach LIT how to detect the glibc version
llvm-svn: 296942
This commit is contained in:
parent
0e1d52ae51
commit
51383a60c0
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue