[llvm-bugs] [Bug 41863] New: [C++17] std:variant fails with libstdc++ from gcc-9.1.0
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon May 13 12:16:20 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=41863
Bug ID: 41863
Summary: [C++17] std:variant fails with libstdc++ from
gcc-9.1.0
Product: clang
Version: 8.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++'17
Assignee: unassignedclangbugs at nondot.org
Reporter: orbea at riseup.net
CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
Created attachment 21944
--> https://bugs.llvm.org/attachment.cgi?id=21944&action=edit
variant demo which reproduces the problem
On Slackware64-current gcc was updated from 8.3.0 to 9.1.0 and I found that
clang++ which uses libstdc++ now fails to build C++17 projects which use
'#include <variant>'. The issue does not occur with libc++.
I have attached a small demo which I have found online which can reproduce this
issue, but I first encountered the issue in the current master for dolphin-emu.
https://github.com/dolphin-emu/dolphin/commit/1d5dd5db914d94f3f612c13c6c5e1d5e711b49b5
With the example it can be reproduced:
clang++ -std=c++17 variant.cpp -o variant -v
While both of these work:
g++ -std=c++17 variant.cpp -o variant -v
clang++ -std=c++17 -stdlib=libc++ variant.cpp -o variant -v
In Slackware current llvm is compiled as a single mostly complete package with
these cmake arguments.
cd build
cmake \
-DCMAKE_C_COMPILER="clang" \
-DCMAKE_CXX_COMPILER="clang++" \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLLVM_LIBDIR_SUFFIX=${LIBDIRSUFFIX} \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DCLANG_BUILD_SHARED_LIBS=ON \
-DLLVM_BUILD_LLVM_DYLIB=ON \
-DLLVM_LINK_LLVM_DYLIB=ON \
-DLLVM_USE_LINKER=gold \
-DLLVM_ENABLE_RTTI=ON \
-DLLVM_ENABLE_FFI=ON \
-DLLVM_ENABLE_ASSERTIONS=OFF \
-DLLVM_USE_OPROFILE=ON \
-DLLVM_INSTALL_UTILS=ON \
-DLLVM_BINUTILS_INCDIR=/usr/include \
-DCLANG_RESOURCE_DIR="../lib${LIBDIRSUFFIX}/clang/${VERSION}" \
.. || exit 1
For further details please see this link.
https://mirrors.slackware.com/slackware/slackware64-current/source/d/llvm/
I will add further attachments with details.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190513/7a817a8b/attachment.html>
More information about the llvm-bugs
mailing list