diff options
author | Tuetuopay | 2017-01-17 13:51:23 +0100 |
---|---|---|
committer | Michael Hansen | 2017-01-18 10:30:13 -0800 |
commit | 64da0a2688ca6e9632bf7a604ae1c4367b1a8232 (patch) | |
tree | b606373d0030935d1253c8140be592af1c88bf13 | |
parent | 152758fb789c13840790135ff1d2e5ca9ccf0da9 (diff) | |
download | aur-64da0a2688ca6e9632bf7a604ae1c4367b1a8232.tar.gz |
Fix Swift compilation
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 7 | ||||
-rw-r--r-- | swift-init-CachedVFile.patch | 45 |
3 files changed, 54 insertions, 2 deletions
@@ -1,5 +1,5 @@ # Generated by mksrcinfo v8 -# Thu Dec 15 22:58:02 UTC 2016 +# Wed Jan 18 18:30:02 UTC 2017 pkgbase = swift-language pkgdesc = The Swift programming language and debugger pkgver = 3.0.2 @@ -40,6 +40,7 @@ pkgbase = swift-language source = swift-sphinx2.patch source = xar-1.6.patch source = build-script.patch + source = swift-init-CachedVFile.patch sha256sums = e69764cb3d83d7209f21c2af448ae39e6612df28e37b7a3ceffa9c24f19ca0cc sha256sums = 194f66f522aa349061ae682bab18fa3fffe146da30e30f2d9f4b811fd544f8eb sha256sums = 8c9026b6f7543fc4ad2efef412da8ab186dbbcb089e8558e27b9994243faff99 @@ -54,6 +55,7 @@ pkgbase = swift-language sha256sums = 93bbe769666aab15b15d12e2423f213b39d6c47237eafc781569698c8367535f sha256sums = df27c2bfeaed6335f49a8815b0b296fd5acc331a6a9361a40f7dfc69a7518da6 sha256sums = 9f2512df8c495e2b8bf19fe213e951cdd17df9207538ceb8ab59a30bd6a18e3f + sha256sums = 2543e6b4ee21e090eb7f67e07594ac95122eb5b275e1976ededa9ef71f3d8652 pkgname = swift pkgdesc = The Swift programming language compiler and tools @@ -27,6 +27,7 @@ source=( "swift-corelibs-libdispatch-${_swiftver}.tar.gz::https://github.com/apple/swift-corelibs-libdispatch/archive/swift-${_swiftver}.tar.gz" "swift-integration-tests-${_swiftver}.tar.gz::https://github.com/apple/swift-integration-tests/archive/swift-${_swiftver}.tar.gz" "swift-sphinx2.patch" "xar-1.6.patch" "build-script.patch" + "swift-init-CachedVFile.patch" ) sha256sums=('e69764cb3d83d7209f21c2af448ae39e6612df28e37b7a3ceffa9c24f19ca0cc' '194f66f522aa349061ae682bab18fa3fffe146da30e30f2d9f4b811fd544f8eb' @@ -41,7 +42,8 @@ sha256sums=('e69764cb3d83d7209f21c2af448ae39e6612df28e37b7a3ceffa9c24f19ca0cc' '90cb9573f22ed62d49ffff4de0e92fefdb3044a7e19391bbc14a63cc4f0ca27b' '93bbe769666aab15b15d12e2423f213b39d6c47237eafc781569698c8367535f' 'df27c2bfeaed6335f49a8815b0b296fd5acc331a6a9361a40f7dfc69a7518da6' - '9f2512df8c495e2b8bf19fe213e951cdd17df9207538ceb8ab59a30bd6a18e3f') + '9f2512df8c495e2b8bf19fe213e951cdd17df9207538ceb8ab59a30bd6a18e3f' + '2543e6b4ee21e090eb7f67e07594ac95122eb5b275e1976ededa9ef71f3d8652') prepare() { # Use python2 where appropriate @@ -77,6 +79,9 @@ prepare() { # Typo in build-script ( cd "${srcdir}/swift" && patch -p1 -i "${srcdir}/build-script.patch" ) + + # Fix for missing initialization + ( cd "${srcdir}/swift" && patch -p1 -i "${srcdir}/swift-init-CachedVFile.patch" ) } build() { diff --git a/swift-init-CachedVFile.patch b/swift-init-CachedVFile.patch new file mode 100644 index 000000000000..37e38edee65c --- /dev/null +++ b/swift-init-CachedVFile.patch @@ -0,0 +1,45 @@ +From 09cbffb3e4ed5c4ef8069d273e2d34309abcd2e4 Mon Sep 17 00:00:00 2001 +From: Mishal Shah <mishal_shah@apple.com> +Date: Fri, 14 Oct 2016 15:29:18 -0700 +Subject: [PATCH] Initialize CachedVFile with nullptr + +--- + include/swift/Basic/SourceManager.h | 2 +- + lib/Basic/SourceLoc.cpp | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/include/swift/Basic/SourceManager.h b/include/swift/Basic/SourceManager.h +index 1072b8b..e5149f1 100644 +--- a/include/swift/Basic/SourceManager.h ++++ b/include/swift/Basic/SourceManager.h +@@ -40,7 +40,7 @@ class SourceManager { + int LineOffset; + }; + std::map<const char *, VirtualFile> VirtualFiles; +- mutable std::pair<const char *, const VirtualFile*> CachedVFile = {}; ++ mutable std::pair<const char *, const VirtualFile*> CachedVFile = {nullptr, nullptr}; + + public: + llvm::SourceMgr &getLLVMSourceMgr() { +diff --git a/lib/Basic/SourceLoc.cpp b/lib/Basic/SourceLoc.cpp +index 9bc484c..b6e0873 100644 +--- a/lib/Basic/SourceLoc.cpp ++++ b/lib/Basic/SourceLoc.cpp +@@ -82,7 +82,7 @@ bool SourceManager::openVirtualFile(SourceLoc loc, StringRef name, + + CharSourceRange range = CharSourceRange(*this, loc, end); + VirtualFiles[end.Value.getPointer()] = { range, name, lineOffset }; +- CachedVFile = {}; ++ CachedVFile = {nullptr, nullptr}; + return true; + } + +@@ -99,7 +99,7 @@ void SourceManager::closeVirtualFile(SourceLoc end) { + #endif + return; + } +- CachedVFile = {}; ++ CachedVFile = {nullptr, nullptr}; + + CharSourceRange oldRange = virtualFile->Range; + virtualFile->Range = CharSourceRange(*this, virtualFile->Range.getStart(), |