attach experimental parts of libc++ (TODO: probably we need to depends sctrictly from the version of libc++ against which we were built because experimental aBI is not stable)

This commit is contained in:
Mikhail Novosyolov 2020-04-01 20:56:28 +03:00
parent e2a55f6ad9
commit f01be3bf2e

View file

@ -103,6 +103,8 @@ BuildRequires: ccache
BuildRequires: clang
BuildRequires: clang-devel
BuildRequires: libcxx-devel
# libc++experimental is static only
BuildRequires: libcxx-static-devel
BuildRequires: libcxxabi-devel
%endif
BuildRequires: desktop-file-utils
@ -2940,6 +2942,11 @@ chmod 777 ~/tmp
# 4.4.1.2 specific
chmod +x bin/unpack-sources
%if %{with clang}
grep -Irl 'include <string_view>' | \
sed -i -E -e 's,include[[:blank:]]([[:blank:]])*<string_view>,include <experimental/string_view>,g'
%endif
%build
# path to external tarballs
EXTSRCDIR=`dirname %{SOURCE0}`
@ -2968,7 +2975,7 @@ export CXXFLAGS="$CXXFLAGS -stdlib=libc++ -nostdinc++ -I/usr/include/c++/v1 -Wno
# https://github.com/TRIQS/triqs/issues/523#issuecomment-351960463
export CXXFLAGS="$CXXFLAGS -D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR"
%clang_gcc_wrapper
export LIBCCX_LIBS="-lc++ -lc++abi"
export LIBCCX_LIBS="-lc++ -lc++abi -lc++experimental"
export CPPUNIT_LIBS="-lcppunit"
install -m0755 %{SOURCE80} "local_bin/clang++wr"
sed -i -e "s,/usr/bin/clang++,${PWD}/local_bin/clang++wr,g" "local_bin/clang++"