[cfe-dev] [Modules TS] new libstdc++ weakref issue
Boris Kolpackov via cfe-dev
cfe-dev at lists.llvm.org
Wed Jul 19 06:21:53 PDT 2017
Something recently introduced (~ past two weeks) is now causing the
following error when using Clang with libstdc++ on Linux:
$ cat <<EOF >std-core.mxx
export module std.core;
export
{
#include <stdexcept>
}
EOF
$ clang++-5.0 --version
clang version 5.0.0-svn308397-1~exp1 (trunk)
$ clang++-5.0 -std=c++1z -D__cpp_modules=201704 -fmodules-ts -o std.core.pcm --precompile -Xclang -fmodules-embed-all-files -Xclang -fmodules-codegen -Xclang -fmodules-debuginfo -x c++-module std-core.mxx
In file included from std-core.mxx:4:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/6.2.0/../../../../include/c++/6.2.0/stdexcept:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/6.2.0/../../../../include/c++/6.2.0/string:52:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/6.2.0/../../../../include/c++/6.2.0/bits/basic_string.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/6.2.0/../../../../include/c++/6.2.0/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/6.2.0/../../../../include/x86_64-linux-gnu/c++/6.2.0/bits/gthr.h:148:
/usr/bin/../lib/gcc/x86_64-linux-gnu/6.2.0/../../../../include/x86_64-linux-gnu/c++/6.2.0/bits/gthr-default.h:101:1: error: weakref declaration must have internal
linkage
__gthrw(pthread_once)
A non-module program that uses the same header compiles fine.
Let me know if you need any extra information.
Boris
More information about the cfe-dev
mailing list