[libcxx-commits] [PATCH] D78381: [libc++] Create a small DSL for defining Lit features and parameters

David Zarzycki via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 28 05:19:39 PDT 2020


davezarzycki added a comment.

In D78381#2007451 <https://reviews.llvm.org/D78381#2007451>, @tpopp wrote:

> In D78381#2006266 <https://reviews.llvm.org/D78381#2006266>, @davezarzycki wrote:
>
> > In D78381#2005219 <https://reviews.llvm.org/D78381#2005219>, @ldionne wrote:
> >
> > > I'm going to go ahead and ship this now so I can see whether it breaks anything.
> >
> >
> > This breaks Fedora 32 (x86_64) building with the system clang/lld (version 10.0):
> >
> > [0+1] Running all regression tests
> >  llvm-lit: /home/dave/s/lp/libcxxabi/test/lit.cfg:64: note: Using configuration variant: libcxxabi
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:307: note: inferred use_system_cxx_lib as: None
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:333: note: inferred use_clang_verify as: True
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:342: note: enabling thread-safety annotations
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:487: note: inferred language dialect as: c++2a
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/target_info.py:84: warning: The locale fr_FR.UTF-8 is not supported by your platform. Some tests will be unsupported.
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/target_info.py:84: warning: The locale ru_RU.UTF-8 is not supported by your platform. Some tests will be unsupported.
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/target_info.py:84: warning: The locale zh_CN.UTF-8 is not supported by your platform. Some tests will be unsupported.
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/target_info.py:84: warning: The locale fr_CA.ISO8859-1 is not supported by your platform. Some tests will be unsupported.
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/target_info.py:84: warning: The locale cs_CZ.ISO8859-2 is not supported by your platform. Some tests will be unsupported.
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:389: note: inferred long_tests as: True
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:153: note: Using compiler: /usr/bin/clang++
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:154: note: Using flags: ['-v']
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:158: note: Using compile flags: ['-Werror=thread-safety', '-DLIBCXXABI_NO_TIMER', '-D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS', '-funwind-tables', '-std=c++2a', '-nostdinc++', '-I/home/dave/s/lp/libcxx/include', '-I/home/dave/s/lp/libcxxabi/include', '-D__STDC_FORMAT_MACROS', '-D__STDC_LIMIT_MACROS', '-D__STDC_CONSTANT_MACROS', '-I/home/dave/s/lp/libcxx/test/support', '-ftemplate-depth=270']
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:161: note: Using warnings: ['-Wall', '-Wextra', '-D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER', '-Wuser-defined-warnings', '-Wshadow', '-Wno-unused-command-line-argument', '-Wno-attributes', '-Wno-pessimizing-move', '-Wno-c++11-extensions', '-Wno-user-defined-literals', '-Wno-noexcept-type', '-Wsign-compare', '-Wunused-variable', '-Wunused-parameter', '-Wunreachable-code', '-Wno-unused-local-typedef']
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:162: note: Using link flags: ['-L/tmp/_update_lc/r/./lib64', '-Wl,-rpath,/tmp/_update_lc/r/./lib64', '-L/tmp/_update_lc/r/./lib64', '-Wl,-rpath,/tmp/_update_lc/r/./lib64', '-nodefaultlibs', '/tmp/_update_lc/r/./lib64/libc++.a', '/tmp/_update_lc/r/./lib64/libc++abi.a', '-lm', '-lgcc_s', '-lgcc', '-lpthread', '-lrt', '-lc', '-lgcc_s', '-lgcc']
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:164: note: Using available_features: ['long_tests', 'fdelayed-template-parsing', 'libc++', 'c++2a', 'diagnose-if-support', 'has-fblocks', '-faligned-allocation', 'clang-10', 'clang', 'locale.en_US.UTF-8', 'linux', 'clang-10.0.0', '-fsized-deallocation', 'thread-safety', 'libcxxabi-has-system-unwinder', 'fcoroutines-ts', 'modules-support', 'clang-10.0']
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:170: note: Adding environment variables: {}
> >  llvm-lit: /home/dave/s/lp/libcxxabi/test/lit.cfg:77: note: Using the new libc++ testing format
> >  llvm-lit: /home/dave/s/lp/libcxx/test/lit.cfg:49: note: Using configuration variant: libcxx
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:307: note: inferred use_system_cxx_lib as: None
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:333: note: inferred use_clang_verify as: True
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:342: note: enabling thread-safety annotations
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:487: note: inferred language dialect as: c++2a
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/target_info.py:84: warning: The locale fr_FR.UTF-8 is not supported by your platform. Some tests will be unsupported.
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/target_info.py:84: warning: The locale ru_RU.UTF-8 is not supported by your platform. Some tests will be unsupported.
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/target_info.py:84: warning: The locale zh_CN.UTF-8 is not supported by your platform. Some tests will be unsupported.
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/target_info.py:84: warning: The locale fr_CA.ISO8859-1 is not supported by your platform. Some tests will be unsupported.
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/target_info.py:84: warning: The locale cs_CZ.ISO8859-2 is not supported by your platform. Some tests will be unsupported.
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:389: note: inferred long_tests as: True
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:153: note: Using compiler: /usr/bin/clang++
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:154: note: Using flags: ['-v']
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:158: note: Using compile flags: ['-Werror=thread-safety', '-std=c++2a', '-include', '/home/dave/s/lp/libcxx/test/support/nasty_macros.h', '-nostdinc++', '-I/home/dave/s/lp/libcxx/include', '-I/tmp/_update_lc/r/projects/libcxx/include/c++build', '-D__STDC_FORMAT_MACROS', '-D__STDC_LIMIT_MACROS', '-D__STDC_CONSTANT_MACROS', '-I/home/dave/s/lp/libcxx/test/support', '-ftemplate-depth=270']
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:161: note: Using warnings: ['-Wall', '-Wextra', '-D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER', '-Wuser-defined-warnings', '-Wshadow', '-Wno-unused-command-line-argument', '-Wno-attributes', '-Wno-pessimizing-move', '-Wno-c++11-extensions', '-Wno-user-defined-literals', '-Wno-noexcept-type', '-Wsign-compare', '-Wunused-variable', '-Wunused-parameter', '-Wunreachable-code', '-Wno-unused-local-typedef']
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:162: note: Using link flags: ['-L/tmp/_update_lc/r/./lib64', '-Wl,-rpath,/tmp/_update_lc/r/./lib64', '-nodefaultlibs', '-lc++experimental', '/tmp/_update_lc/r/./lib64/libc++.a', '-lc++abi', '-lm', '-lgcc_s', '-lgcc', '-lpthread', '-lrt', '-lc', '-lgcc_s', '-lgcc']
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:164: note: Using available_features: ['modules-support', 'clang-10.0', 'fdelayed-template-parsing', 'diagnose-if-support', 'has-fblocks', 'clang-10', 'libatomic', '-faligned-allocation', 'clang', 'locale.en_US.UTF-8', 'c++experimental', 'long_tests', 'libc++', 'c++2a', 'linux', 'clang-10.0.0', 'thread-safety', 'fcoroutines-ts', '-fsized-deallocation']
> >  llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:170: note: Adding environment variables: {}
> >  llvm-lit: /home/dave/s/lp/libcxx/test/lit.cfg:62: note: Using the new libc++ testing format
> >  llvm-lit: /tmp/_update_lc/r/bin/../../../../home/dave/s/lp/llvm/utils/lit/lit/TestingConfig.py:100: fatal: unable to parse config file '/home/dave/s/lp/libcxx/test/libcxx/selftest/dsl/lit.local.cfg', traceback: Traceback (most recent call last):
> >
> >   File "/tmp/_update_lc/r/bin/../../../../home/dave/s/lp/llvm/utils/lit/lit/TestingConfig.py", line 89, in load_from_path
> >     exec(compile(data, path, 'exec'), cfg_globals, None)
> >   File "/home/dave/s/lp/libcxx/test/libcxx/selftest/dsl/lit.local.cfg", line 13, in <module>
> >     escaped = [(k.replace('%{', '%{escaped_'), base64.b64encode(v)) for (k, v) in config.substitutions]
> >   File "/home/dave/s/lp/libcxx/test/libcxx/selftest/dsl/lit.local.cfg", line 13, in <listcomp>
> >     escaped = [(k.replace('%{', '%{escaped_'), base64.b64encode(v)) for (k, v) in config.substitutions]
> >   File "/usr/lib64/python3.8/base64.py", line 58, in b64encode
> >     encoded = binascii.b2a_base64(s, newline=False)
> >
> > TypeError: a bytes-like object is required, not 'str'
> >
> > FAILED: CMakeFiles/check-all
>
>
> Just a note, this seems due to incompatibilities between python2 and python3. Python2 expects strings like given here while Python3 expects the bytes-like object.


Right. Python 2.x was EOLed January 1st, 2020. See: https://www.python.org/dev/peps/pep-0373/#release-schedule

I'm going to revert this due to lack of Python 3 testing.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78381/new/

https://reviews.llvm.org/D78381





More information about the libcxx-commits mailing list