Merge pull request #35695 from dtzWill/fix/swift-gcc7
swift: add include for <functional> (#35689)
This commit is contained in:
commit
5069ad2c28
@ -145,7 +145,6 @@ let
|
||||
url = "https://github.com/apple/swift-llbuild/commit/303a89bc6da606c115560921a452686aa0655f5e.diff";
|
||||
sha256 = "04sw7ym1grzggj1v3xrzr2ljxz8rf9rnn9n5fg1xjbwlrdagkc7m";
|
||||
};
|
||||
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "swift-${version_friendly}";
|
||||
@ -247,6 +246,9 @@ stdenv.mkDerivation rec {
|
||||
# https://bugs.swift.org/browse/SR-5779
|
||||
sed -i -e 's|"-latomic"|"-Wl,-rpath,${clang.cc.gcc.lib}/lib" "-L${clang.cc.gcc.lib}/lib" "-latomic"|' swift/cmake/modules/AddSwift.cmake
|
||||
|
||||
# https://bugs.swift.org/browse/SR-4838
|
||||
sed -i -e '30i#include <functional>' lldb/include/lldb/Utility/TaskPool.h
|
||||
|
||||
substituteInPlace clang/lib/Driver/ToolChains.cpp \
|
||||
--replace ' addPathIfExists(D, SysRoot + "/usr/lib", Paths);' \
|
||||
' addPathIfExists(D, SysRoot + "/usr/lib", Paths); addPathIfExists(D, "${glibc}/lib", Paths);'
|
||||
@ -287,7 +289,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
# TODO: Use wrappers to get these on the PATH for swift tools, instead
|
||||
ln -s ${clang}/bin/* $out/bin/
|
||||
ln -s ${targetPackages.stdenv.cc.bintools}/bin/ar $out/bin/ar
|
||||
ln -s ${targetPackages.stdenv.cc.bintools.bintools_bin}/bin/ar $out/bin/ar
|
||||
|
||||
wrapProgram $out/bin/swift \
|
||||
--suffix C_INCLUDE_PATH : $out/lib/swift/clang/include \
|
||||
|
Loading…
Reference in New Issue
Block a user