[libcxx] r285382 - Add __libcpp_version file and __libcpp_library_version function.

Ismail Donmez via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 28 02:22:31 PDT 2016


Hi,

On Fri, Oct 28, 2016 at 9:06 AM, Eric Fiselier via cfe-commits
<cfe-commits at lists.llvm.org> wrote:
> Author: ericwf
> Date: Fri Oct 28 01:06:50 2016
> New Revision: 285382
>
> URL: http://llvm.org/viewvc/llvm-project?rev=285382&view=rev
> Log:
> Add __libcpp_version file and __libcpp_library_version function.
>
> This patch does two seperate things. First it adds a file called
> "__libcpp_version" which only contains the current libc++ version
> (currently 4000). This file is not intended for use as a header. This file
> is used by Clang in order to easily determine the installed libc++ version.
> This allows Clang to enable/disable certain language features only when the
> library supports them.
>
> The second change is the addition of _LIBCPP_LIBRARY_VERSION macro, which
> returns the version of the installed dylib since it may be different than
> the headers.

The test seems to be failing here:

[ 7087s] ******************** TEST 'libc++ :: libcxx/version.pass.cpp'
FAILED ********************
[ 7087s] Compiled With:
['/home/abuild/rpmbuild/BUILD/llvm/stage1/bin/clang++', '-o',
'/home/abuild/rpmbuild/BUILD/llvm/stage2/projects/libcxx/test/libcxx/Output/version.pass.cpp.o',
'-x', 'c++', '/home/abuild/rpmbuild/BUILD/llvm/projects/libcxx/test/libcxx/version.pass.cpp',
'-c', '-v', '-Werror=thread-safety', '-std=c++1z', '-include',
'/home/abuild/rpmbuild/BUILD/llvm/projects/libcxx/test/support/nasty_macros.hpp',
'-nostdinc++', '-I/home/abuild/rpmbuild/BUILD/llvm/projects/libcxx/include',
'-D__STDC_FORMAT_MACROS', '-D__STDC_LIMIT_MACROS',
'-D__STDC_CONSTANT_MACROS',
'-I/home/abuild/rpmbuild/BUILD/llvm/projects/libcxx/test/support',
'-DLIBCXX_FILESYSTEM_STATIC_TEST_ROOT="/home/abuild/rpmbuild/BUILD/llvm/projects/libcxx/test/std/experimental/filesystem/Inputs/static_test_env"',
'-DLIBCXX_FILESYSTEM_DYNAMIC_TEST_ROOT="/home/abuild/rpmbuild/BUILD/llvm/stage2/projects/libcxx/test/filesystem/Output/dynamic_env"',
'-DLIBCXX_FILESYSTEM_DYNAMIC_TEST_HELPER="/usr/bin/python2.7
/home/abuild/rpmbuild/BUILD/llvm/projects/libcxx/test/support/filesystem_dynamic_test_helper.py"',
'-c', '&&', '/home/abuild/rpmbuild/BUILD/llvm/stage1/bin/clang++',
'-o', '/home/abuild/rpmbuild/BUILD/llvm/stage2/projects/libcxx/test/libcxx/Output/version.pass.cpp.exe',
'/home/abuild/rpmbuild/BUILD/llvm/stage2/projects/libcxx/test/libcxx/Output/version.pass.cpp.o',
'-v', '-L/home/abuild/rpmbuild/BUILD/llvm/stage2/lib64',
'-Wl,-rpath,/home/abuild/rpmbuild/BUILD/llvm/stage2/lib64',
'-nodefaultlibs', '-lc++experimental', '-lc++', '-lm', '-lgcc_s',
'-lgcc', '-lpthread', '-lc', '-lgcc_s', '-lgcc']
[ 7087s] Command: ['env',
'LIBCXX_FILESYSTEM_DYNAMIC_TEST_ROOT=/home/abuild/rpmbuild/BUILD/llvm/stage2/projects/libcxx/test/filesystem/Output/dynamic_env',
'/home/abuild/rpmbuild/BUILD/llvm/stage2/projects/libcxx/test/libcxx/Output/version.pass.cpp.exe']
[ 7087s] Exit Code: -6
[ 7087s] Standard Error:
[ 7087s] --
[ 7087s] version.pass.cpp.exe:
/home/abuild/rpmbuild/BUILD/llvm/projects/libcxx/test/libcxx/version.pass.cpp:26:
int main(): Assertion `_LIBCPP_VERSION == _LIBCPP_LIBRARY_VERSION'
failed.


More information about the cfe-commits mailing list