aboutsummaryrefslogtreecommitdiffstats
path: root/lang/swift
diff options
context:
space:
mode:
authorswills <swills@FreeBSD.org>2017-04-25 10:53:03 +0800
committerswills <swills@FreeBSD.org>2017-04-25 10:53:03 +0800
commite9c5c93cb80888e5dba6664f2f6408bb8da3036d (patch)
treead4639750c8c7e5a1028b478aece0c9e1cbbb388 /lang/swift
parent24aede1d30d18919209b638b5203039fdbdce2f3 (diff)
downloadfreebsd-ports-gnome-e9c5c93cb80888e5dba6664f2f6408bb8da3036d.tar.gz
freebsd-ports-gnome-e9c5c93cb80888e5dba6664f2f6408bb8da3036d.tar.zst
freebsd-ports-gnome-e9c5c93cb80888e5dba6664f2f6408bb8da3036d.zip
lang/swift: update to 3.1.1
This fixes build issues [1] and makes swiftc work [2]. But swiftpm is still not working, hopefully soon. PR: 210284 [1] PR: 210386 [2] Reported by: Lacey Powers <lacey.leanne@gmail.com> [1] Reported by: Tom Pusateri <pusateri@bangj.com> [2]
Diffstat (limited to 'lang/swift')
-rw-r--r--lang/swift/Makefile82
-rw-r--r--lang/swift/distinfo40
-rw-r--r--lang/swift/files/patch-llbuild_CMakeLists.txt11
-rw-r--r--lang/swift/files/patch-llbuild_lib_llvm_Support_CMakeLists.txt10
-rw-r--r--lang/swift/files/patch-llbuild_lib_llvm_Support_Unix_Process.inc11
-rw-r--r--lang/swift/files/patch-llvm_lib_Support_Unix_Process.inc11
-rw-r--r--lang/swift/files/patch-swift-corelibs-foundation_lib_target.py20
-rw-r--r--lang/swift/files/patch-swift_cmake_modules_SwiftSharedCMakeConfig.cmake20
-rw-r--r--lang/swift/files/patch-swift_docs_CMakeLists.txt10
-rw-r--r--lang/swift/files/patch-swift_lib_ClangImporter_ClangImporter.cpp20
-rw-r--r--lang/swift/files/patch-swift_utils_build-presets.ini44
-rw-r--r--lang/swift/files/patch-swift_utils_build-script-impl16
-rw-r--r--lang/swift/files/patch-swiftpm_Sources_PackageDescription_Package.swift11
-rw-r--r--lang/swift/files/patch-swiftpm_Sources_libc_libc.swift11
-rw-r--r--lang/swift/pkg-plist56
15 files changed, 192 insertions, 181 deletions
diff --git a/lang/swift/Makefile b/lang/swift/Makefile
index ce5f4699fecd..5f3b30f29320 100644
--- a/lang/swift/Makefile
+++ b/lang/swift/Makefile
@@ -1,10 +1,9 @@
# $FreeBSD$
PORTNAME= swift
-PORTVERSION= 2.2.1
+PORTVERSION= 3.1.1
DISTVERSIONPREFIX= swift-
DISTVERSIONSUFFIX= -RELEASE
-PORTREVISION= 4
CATEGORIES= lang
MAINTAINER= swills@FreeBSD.org
@@ -20,36 +19,53 @@ BUILD_DEPENDS= cmake:devel/cmake \
sphinx-build:textproc/py-sphinx \
binutils>=2.25.1:devel/binutils
LIB_DEPENDS= libicudata.so:devel/icu \
- libuuid.so:misc/e2fsprogs-libuuid
+ libuuid.so:misc/e2fsprogs-libuuid \
+ libobjc.so:lang/libobjc2
+REL_SNAP= 2017-04-22-a
USE_GITHUB= yes
-GH_ACCOUNT= apple:DEFAULT,llvm,clang,lldb,cmark,llbuild,swiftpm,xctest,xcfound
+
+GH_ACCOUNT= apple:DEFAULT,llvm,clang,dispatch,lldb,cmark,llbuild,swiftpm,xctest,xcfound
GH_PROJECT= swift:DEFAULT swift-llvm:llvm swift-clang:clang swift-lldb:lldb \
swift-cmark:cmark swift-llbuild:llbuild swift-package-manager:swiftpm \
- swift-corelibs-xctest:xctest swift-corelibs-foundation:xcfound
-GH_TAGNAME= swift-DEVELOPMENT-SNAPSHOT-2016-05-03-a:llbuild,swiftpm,xctest,xcfound
+ swift-corelibs-xctest:xctest swift-corelibs-foundation:xcfound \
+ swift-corelibs-libdispatch:dispatch
+GH_TAGNAME= swift-${PORTVERSION}-RELEASE:llbuild,swiftpm,xctest,xcfound,dispatch
GH_SUBDIR= llvm:llvm clang:clang lldb:lldb cmark:cmark llbuild:llbuild \
swiftpm:swiftpm swift-corelibs-xctest:xctest \
- swift-corelibs-foundation:xcfound
+ swift-corelibs-foundation:xcfound \
+ swift-corelibs-libdispatch:dispatch
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
-USES= iconv libedit ninja perl5 pkgconfig python:3,build sqlite
+USES= autoreconf:build compiler:c++14-lang libtool localbase:ldflags iconv libedit ninja perl5 pkgconfig sqlite
+USE_AUTOTOOLS= autoconf:env
USE_GNOME= libxml2
USE_LDCONFIG= yes
ONLY_FOR_ARCHS= amd64
+BROKEN_FreeBSD_10= Builds but does not work
CONFLICTS_BUILD= googletest
+LDFLAGS+= -lobjc
OPTIONS_DEFINE= DOCS
PORTDOCS= *
+STRIP_FILES= bin/sil-func-extractor bin/sil-nm bin/sil-opt \
+ bin/sil-passpipeline-dumper bin/swift \
+ bin/swift-api-digester bin/swift-build-tool \
+ bin/swift-demangle bin/swift-ide-test \
+ bin/swift-llvm-opt bin/swift-reflection-dump \
+ bin/swift-remoteast-test lib/swift/freebsd/libswiftCore.so \
+ lib/swift/freebsd/libswiftGlibc.so \
+ lib/swift/freebsd/libswiftRemoteMirror.so \
+ lib/swift/freebsd/libswiftSwiftOnoneSupport.so
+
.include <bsd.port.pre.mk>
-.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1100079
-BUILD_DEPENDS+= clang38:devel/llvm38
-EXTRA_FLAGS= --host-cc=${LOCALBASE}/bin/clang38 --host-cxx=${LOCALBASE}/bin/clang++38
-.endif
+CC_ONLY= ${CC:C/.*\///}
+CPP_ONLY= ${CPP:C/.*\///}
+CXX_ONLY= ${CXX:C/.*\///}
post-extract:
@${MKDIR} ${WRKSRC}
@@ -58,47 +74,39 @@ post-extract:
post-patch:
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
${WRKSRC}/swift/cmake/modules/SwiftSharedCMakeConfig.cmake
+ @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
+ -e 's|%%CPP_ONLY%%|${CPP_ONLY}|g' \
+ -e 's|%%CC_ONLY%%|${CC_ONLY}|g' \
+ -e 's|%%CXX_ONLY%%|${CXX_ONLY}|g' \
+ ${WRKSRC}/swift/utils/build-presets.ini \
+ ${WRKSRC}/swift/utils/build-script-impl
do-build:
@${MKDIR} ${STAGEDIR}${PREFIX}
- cd ${WRKSRC}/swift; ${SETENV} PATH=${LOCALBASE}/bin:${PATH} \
- CPPFLAGS="-I${LOCALBASE}/include ${CPPFLAGS}" \
- CFLAGS="-I${LOCALBASE}/include ${CFLAGS}" \
- CXXFLAGS="-I${LOCALBASE}/include ${CXXFLAGS}" \
- LDFLAGS='-B${LOCALBASE}/bin -fuse-ld=bfd' \
+ cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} \
+ ./swift/utils/build-script --preset=mixin_freebsd_installation \
+ -j ${MAKE_JOBS_NUMBER} \
install_destdir=${STAGEDIR} \
- ./utils/build-script -R --no-assertions \
- --llbuild \
-- \
${EXTRA_FLAGS} \
- --verbose-build \
- --swift-runtime-enable-dtrace \
- --install-swift \
- --install-llbuild \
+ --skip-build-llvm=1 \
--install_prefix=${PREFIX} \
--install_destdir=${STAGEDIR} \
- --swift-install-components='compiler;clang-builtin-headers;stdlib;sdk-overlay;license;tools;editor-integration' \
- --build-swift-static-stdlib=1 \
- --skip-test-lldb=1
+ --verbose-build=1 \
+ --install-llbuild=1 \
+ --skip-test-llbuild=1
@${RM} /var/run/libuuid/clock.txt /var/run/libuuid/request /var/run/libuuid/uuidd.pid
do-install:
${MV} ${STAGEDIR}${PREFIX}/share/man/man1/swift.1 ${STAGEDIR}${PREFIX}/man/man1/swift.1
${RM} -r ${STAGEDIR}${PREFIX}/share/man
${GZIP_CMD} ${STAGEDIR}${PREFIX}/man/man1/swift.1
- ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/swift/freebsd/libswiftGlibc.so
- ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/swift/freebsd/libswiftCore.so
- ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/swift-compress
- ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/sil-extract
- ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/swift-ide-test
- ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/swift-llvm-opt
- ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/swift-build-tool
- ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/swift
- ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/swift-demangle
- ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/sil-opt
+.for FILE in ${STRIP_FILES}
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/${FILE}
+.endfor
do-install-DOCS-on:
- cd ${WRKSRC}/build/Ninja-Release/swift-freebsd-x86_64/docs/html ; \
+ cd ${WRKSRC}/build/Ninja-ReleaseAssert+stdlib-Release/swift-freebsd-x86_64/docs/html ; \
${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
.include <bsd.port.post.mk>
diff --git a/lang/swift/distinfo b/lang/swift/distinfo
index 6a66e7a2197b..0575c3d7b502 100644
--- a/lang/swift/distinfo
+++ b/lang/swift/distinfo
@@ -1,19 +1,21 @@
-TIMESTAMP = 1490087178
-SHA256 (apple-swift-swift-2.2.1-RELEASE_GH0.tar.gz) = e971e2287055da72564356f369bad97e95821afb1ef36157e954a04a7e90753a
-SIZE (apple-swift-swift-2.2.1-RELEASE_GH0.tar.gz) = 8443158
-SHA256 (apple-swift-llvm-swift-2.2.1-RELEASE_GH0.tar.gz) = f7977e5bb275494b5dac4490afc5d634f894ba5f209f3b2dbd5b7e520fa5fce2
-SIZE (apple-swift-llvm-swift-2.2.1-RELEASE_GH0.tar.gz) = 22560962
-SHA256 (apple-swift-clang-swift-2.2.1-RELEASE_GH0.tar.gz) = 40bdfa7eec0497ec69005d6a5d018b12c85aa2c0959d3408ecaaa9e34ff0415f
-SIZE (apple-swift-clang-swift-2.2.1-RELEASE_GH0.tar.gz) = 12995260
-SHA256 (apple-swift-lldb-swift-2.2.1-RELEASE_GH0.tar.gz) = 2098043dbda98374e784d3357f71f8e931aea3ac958c042adf0df0fae7bc22a3
-SIZE (apple-swift-lldb-swift-2.2.1-RELEASE_GH0.tar.gz) = 14216244
-SHA256 (apple-swift-cmark-swift-2.2.1-RELEASE_GH0.tar.gz) = 254d3c02bf2b03ad456fa3ad27b4da854e36318fcaf6b6f199fdb3e978a90803
-SIZE (apple-swift-cmark-swift-2.2.1-RELEASE_GH0.tar.gz) = 214444
-SHA256 (apple-swift-llbuild-swift-DEVELOPMENT-SNAPSHOT-2016-05-03-a_GH0.tar.gz) = 520680d66b14329089d0040d5e05f48f3a6d4c7266aa9e92ca3e5b332d567808
-SIZE (apple-swift-llbuild-swift-DEVELOPMENT-SNAPSHOT-2016-05-03-a_GH0.tar.gz) = 4713455
-SHA256 (apple-swift-package-manager-swift-DEVELOPMENT-SNAPSHOT-2016-05-03-a_GH0.tar.gz) = fce64a4266bb00717293f7d3b3e39d6601887910b60505885d670fc70a6f958b
-SIZE (apple-swift-package-manager-swift-DEVELOPMENT-SNAPSHOT-2016-05-03-a_GH0.tar.gz) = 142826
-SHA256 (apple-swift-corelibs-xctest-swift-DEVELOPMENT-SNAPSHOT-2016-05-03-a_GH0.tar.gz) = 97bbc56579e2af93c5101478e99c18446963af3d6764f6e75220ea22e4886c4f
-SIZE (apple-swift-corelibs-xctest-swift-DEVELOPMENT-SNAPSHOT-2016-05-03-a_GH0.tar.gz) = 42557
-SHA256 (apple-swift-corelibs-foundation-swift-DEVELOPMENT-SNAPSHOT-2016-05-03-a_GH0.tar.gz) = 5fbb87ea62faf2a3fcc3cd1cfb49348d0e94837ba7aa8a430c172cac685e6d97
-SIZE (apple-swift-corelibs-foundation-swift-DEVELOPMENT-SNAPSHOT-2016-05-03-a_GH0.tar.gz) = 2455060
+TIMESTAMP = 1493047496
+SHA256 (apple-swift-swift-3.1.1-RELEASE_GH0.tar.gz) = 03eb54e7f89109a85c9b2a9bfdee88d2d7e1bdef73ae0385b30fe4661efaf407
+SIZE (apple-swift-swift-3.1.1-RELEASE_GH0.tar.gz) = 10548277
+SHA256 (apple-swift-llvm-swift-3.1.1-RELEASE_GH0.tar.gz) = fc6ac7c0c6afff344a8d4e5299b7417f414f1499cf374953e06c339d8177fc26
+SIZE (apple-swift-llvm-swift-3.1.1-RELEASE_GH0.tar.gz) = 28252386
+SHA256 (apple-swift-clang-swift-3.1.1-RELEASE_GH0.tar.gz) = ed41f1231bae030a412455491a5244ede53a4761617194b2dda573f5776361ad
+SIZE (apple-swift-clang-swift-3.1.1-RELEASE_GH0.tar.gz) = 14642919
+SHA256 (apple-swift-corelibs-libdispatch-swift-3.1.1-RELEASE_GH0.tar.gz) = b711a5afaf027ac2cfefc144cd3760dd1d6a99689864be6ecb73a62cbb21b04f
+SIZE (apple-swift-corelibs-libdispatch-swift-3.1.1-RELEASE_GH0.tar.gz) = 487271
+SHA256 (apple-swift-lldb-swift-3.1.1-RELEASE_GH0.tar.gz) = 84a8640ce285748dee4bfd742dee50136a10f3a96d24bb15410092afe6f495bf
+SIZE (apple-swift-lldb-swift-3.1.1-RELEASE_GH0.tar.gz) = 18179384
+SHA256 (apple-swift-cmark-swift-3.1.1-RELEASE_GH0.tar.gz) = 51db8067f11976a7ca38a6ff9f173d3d9e3df290991be87835cdc003e0b62e4e
+SIZE (apple-swift-cmark-swift-3.1.1-RELEASE_GH0.tar.gz) = 214437
+SHA256 (apple-swift-llbuild-swift-3.1.1-RELEASE_GH0.tar.gz) = ea59fd6603fe5d71598895832d6eef9314f1af99a72050536e473e9bb08a57df
+SIZE (apple-swift-llbuild-swift-3.1.1-RELEASE_GH0.tar.gz) = 4734687
+SHA256 (apple-swift-package-manager-swift-3.1.1-RELEASE_GH0.tar.gz) = 5f98dd6fd41170e2f51f85131ca50cba3d50a187ce94b7a1db7a776c2815c778
+SIZE (apple-swift-package-manager-swift-3.1.1-RELEASE_GH0.tar.gz) = 382717
+SHA256 (apple-swift-corelibs-xctest-swift-3.1.1-RELEASE_GH0.tar.gz) = 188272552bf35c411c73ad35345e0e8893e67d8d098a805fb26ad220291421e3
+SIZE (apple-swift-corelibs-xctest-swift-3.1.1-RELEASE_GH0.tar.gz) = 55326
+SHA256 (apple-swift-corelibs-foundation-swift-3.1.1-RELEASE_GH0.tar.gz) = 86f1d57a38661a8186104440369a1e3657093ebc37716a31a0e539eadfad60e3
+SIZE (apple-swift-corelibs-foundation-swift-3.1.1-RELEASE_GH0.tar.gz) = 3290006
diff --git a/lang/swift/files/patch-llbuild_CMakeLists.txt b/lang/swift/files/patch-llbuild_CMakeLists.txt
deleted file mode 100644
index ba29fbcd89c4..000000000000
--- a/lang/swift/files/patch-llbuild_CMakeLists.txt
+++ /dev/null
@@ -1,11 +0,0 @@
---- llbuild/CMakeLists.txt.orig 2016-03-15 20:15:59 UTC
-+++ llbuild/CMakeLists.txt
-@@ -128,7 +128,7 @@ else ()
- endif ()
-
- # On Linux, always build with PIC.
--if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
-+if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
- endif ()
diff --git a/lang/swift/files/patch-llbuild_lib_llvm_Support_CMakeLists.txt b/lang/swift/files/patch-llbuild_lib_llvm_Support_CMakeLists.txt
deleted file mode 100644
index ff9a9cd07d09..000000000000
--- a/lang/swift/files/patch-llbuild_lib_llvm_Support_CMakeLists.txt
+++ /dev/null
@@ -1,10 +0,0 @@
---- llbuild/lib/llvm/Support/CMakeLists.txt.orig 2016-03-15 20:15:59 UTC
-+++ llbuild/lib/llvm/Support/CMakeLists.txt
-@@ -41,3 +41,7 @@ raw_ostream.cpp
- if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
- target_link_libraries(llvmSupport pthread dl)
- endif()
-+
-+if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
-+ target_link_libraries(llvmSupport pthread execinfo)
-+endif()
diff --git a/lang/swift/files/patch-llbuild_lib_llvm_Support_Unix_Process.inc b/lang/swift/files/patch-llbuild_lib_llvm_Support_Unix_Process.inc
deleted file mode 100644
index 9fc789fff5c6..000000000000
--- a/lang/swift/files/patch-llbuild_lib_llvm_Support_Unix_Process.inc
+++ /dev/null
@@ -1,11 +0,0 @@
---- llbuild/lib/llvm/Support/Unix/Process.inc.orig 2016-03-15 20:15:59 UTC
-+++ llbuild/lib/llvm/Support/Unix/Process.inc
-@@ -36,7 +36,7 @@
- // DragonFlyBSD, OpenBSD, and Bitrig have deprecated <malloc.h> for
- // <stdlib.h> instead. Unix.h includes this for us already.
- #if defined(HAVE_MALLOC_H) && !defined(__DragonFly__) && \
-- !defined(__OpenBSD__) && !defined(__Bitrig__)
-+ !defined(__OpenBSD__) && !defined(__Bitrig__) && !defined(__FreeBSD__)
- #include <malloc.h>
- #endif
- #if defined(HAVE_MALLCTL)
diff --git a/lang/swift/files/patch-llvm_lib_Support_Unix_Process.inc b/lang/swift/files/patch-llvm_lib_Support_Unix_Process.inc
deleted file mode 100644
index 8d21a2b05939..000000000000
--- a/lang/swift/files/patch-llvm_lib_Support_Unix_Process.inc
+++ /dev/null
@@ -1,11 +0,0 @@
---- llvm/lib/Support/Unix/Process.inc.orig 2016-02-26 00:51:43 UTC
-+++ llvm/lib/Support/Unix/Process.inc
-@@ -36,7 +36,7 @@
- // DragonFlyBSD, OpenBSD, and Bitrig have deprecated <malloc.h> for
- // <stdlib.h> instead. Unix.h includes this for us already.
- #if defined(HAVE_MALLOC_H) && !defined(__DragonFly__) && \
-- !defined(__OpenBSD__) && !defined(__Bitrig__)
-+ !defined(__OpenBSD__) && !defined(__Bitrig__) && !defined(__FreeBSD__)
- #include <malloc.h>
- #endif
- #if defined(HAVE_MALLCTL)
diff --git a/lang/swift/files/patch-swift-corelibs-foundation_lib_target.py b/lang/swift/files/patch-swift-corelibs-foundation_lib_target.py
new file mode 100644
index 000000000000..67d4c73837c0
--- /dev/null
+++ b/lang/swift/files/patch-swift-corelibs-foundation_lib_target.py
@@ -0,0 +1,20 @@
+--- swift-corelibs-foundation/lib/target.py.orig 2017-04-13 07:34:00 UTC
++++ swift-corelibs-foundation/lib/target.py
+@@ -204,6 +204,8 @@ class ArchType:
+ return ArchType.x86
+ if string == "x86_64":
+ return ArchType.x86_64
++ if string == "amd64":
++ return ArchType.x86_64
+ if string == "xcore":
+ return ArchType.xcore
+ if string == "nvptx":
+@@ -370,7 +372,7 @@ class Target:
+ triple += "-apple-darwin"
+ elif platform.system() == "FreeBSD":
+ # Make this work on 10 as well.
+- triple += "-freebsd11.0"
++ triple += "-v11.0-freebsd11.0"
+ elif platform.system() == "CYGWIN_NT-10.0":
+ triple += "-windows-cygnus"
+ else:
diff --git a/lang/swift/files/patch-swift_cmake_modules_SwiftSharedCMakeConfig.cmake b/lang/swift/files/patch-swift_cmake_modules_SwiftSharedCMakeConfig.cmake
deleted file mode 100644
index 3432b3301d62..000000000000
--- a/lang/swift/files/patch-swift_cmake_modules_SwiftSharedCMakeConfig.cmake
+++ /dev/null
@@ -1,20 +0,0 @@
---- swift/cmake/modules/SwiftSharedCMakeConfig.cmake.orig 2016-03-21 17:35:26 UTC
-+++ swift/cmake/modules/SwiftSharedCMakeConfig.cmake
-@@ -236,7 +236,8 @@ macro(swift_common_standalone_build_conf
- set(CMARK_BUILD_INCLUDE_DIR "${PATH_TO_CMARK_BUILD}/src")
-
- set(CMAKE_INCLUDE_CURRENT_DIR ON)
-- include_directories("${PATH_TO_LLVM_BUILD}/include"
-+ include_directories("/usr/local/include"
-+ "${PATH_TO_LLVM_BUILD}/include"
- "${LLVM_MAIN_INCLUDE_DIR}"
- "${CLANG_BUILD_INCLUDE_DIR}"
- "${CLANG_MAIN_INCLUDE_DIR}"
-@@ -244,6 +245,7 @@ macro(swift_common_standalone_build_conf
- "${CMARK_BUILD_INCLUDE_DIR}")
-
- link_directories(
-+ "/usr/local/lib"
- "${LLVM_LIBRARY_DIR}"
- # FIXME: if we want to support separate Clang builds and mix different
- # build configurations of Clang and Swift, this line should be adjusted.
diff --git a/lang/swift/files/patch-swift_docs_CMakeLists.txt b/lang/swift/files/patch-swift_docs_CMakeLists.txt
deleted file mode 100644
index 8f4fdeb5ab84..000000000000
--- a/lang/swift/files/patch-swift_docs_CMakeLists.txt
+++ /dev/null
@@ -1,10 +0,0 @@
---- swift/docs/CMakeLists.txt.orig 2016-03-21 17:35:26 UTC
-+++ swift/docs/CMakeLists.txt
-@@ -10,7 +10,6 @@ SET(SWIFT_SPHINX_PAPER_SIZE "letter"
- CACHE STRING "Paper size for generated documentation")
-
- SET(SPHINX_ARGS
-- -W
- -D latex_paper_size=${SWIFT_SPHINX_PAPER_SIZE}
- -d ${CMAKE_BINARY_DIR}/doctrees)
-
diff --git a/lang/swift/files/patch-swift_lib_ClangImporter_ClangImporter.cpp b/lang/swift/files/patch-swift_lib_ClangImporter_ClangImporter.cpp
deleted file mode 100644
index ade06fba212b..000000000000
--- a/lang/swift/files/patch-swift_lib_ClangImporter_ClangImporter.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
---- swift/lib/ClangImporter/ClangImporter.cpp.orig 2016-03-21 17:35:26 UTC
-+++ swift/lib/ClangImporter/ClangImporter.cpp
-@@ -332,7 +332,7 @@ getNormalInvocationArguments(std::vector
- // not import Objective-C modules.
- //
- // Just use the most feature-rich C language mode.
-- "-x", "c", "-std=gnu11",
-+ "-x", "c", "-std=gnu11", "-I/usr/include"
- });
- }
-
-@@ -376,7 +376,7 @@ getNormalInvocationArguments(std::vector
- } else {
- // On Darwin, Clang uses -isysroot to specify the include
- // system root. On other targets, it seems to use --sysroot.
-- if (triple.isOSDarwin()) {
-+ if (triple.isOSDarwin() || triple.isOSFreeBSD()) {
- invocationArgStrs.push_back("-isysroot");
- } else {
- invocationArgStrs.push_back("--sysroot");
diff --git a/lang/swift/files/patch-swift_utils_build-presets.ini b/lang/swift/files/patch-swift_utils_build-presets.ini
new file mode 100644
index 000000000000..6cb2b8267343
--- /dev/null
+++ b/lang/swift/files/patch-swift_utils_build-presets.ini
@@ -0,0 +1,44 @@
+--- swift/utils/build-presets.ini.orig 2017-04-21 21:18:29 UTC
++++ swift/utils/build-presets.ini
+@@ -676,6 +676,41 @@ dash-dash
+ swift-enable-ast-verifier=0
+
+ #===------------------------------------------------------------------------===#
++# FreeBSD Builders
++#===------------------------------------------------------------------------===#
++[preset: mixin_freebsd_installation]
++mixin-preset=mixin_lightweight_assertions
++
++llbuild
++#swiftpm
++release
++#xctest
++dash-dash
++
++install-swift
++install-lldb
++install-llbuild
++install-xctest
++#install-swiftpm
++install-prefix=/usr/local
++swift-install-components=autolink-driver;compiler;clang-builtin-headers;stdlib;swift-remote-mirror;sdk-overlay;license;tools;editor-integration
++skip-build-libdispatch
++build-swift-static-stdlib
++build-swift-static-sdk-overlay
++build-swift-stdlib-unittest-extra
++
++# Executes the lit tests for the installable package that is created
++# Assumes the swift-integration-tests repo is checked out
++#test-installable-package
++
++# Path to the root of the installation filesystem.
++install-destdir=%(install_destdir)s
++
++# Path to the .tar.gz package we would create.
++#installable-package=%(installable_package)s
++
++
++#===------------------------------------------------------------------------===#
+ # Linux Builders
+ #===------------------------------------------------------------------------===#
+ [preset: mixin_linux_installation]
diff --git a/lang/swift/files/patch-swift_utils_build-script-impl b/lang/swift/files/patch-swift_utils_build-script-impl
new file mode 100644
index 000000000000..cfb7bd86fef0
--- /dev/null
+++ b/lang/swift/files/patch-swift_utils_build-script-impl
@@ -0,0 +1,16 @@
+--- swift/utils/build-script-impl.orig 2017-03-28 05:42:53.000000000 +0000
++++ swift/utils/build-script-impl 2017-04-23 23:59:13.869062000 +0000
+@@ -1948,8 +1948,11 @@ for host in "${ALL_HOSTS[@]}"; do
+ # gold linker support.
+ cmake_options=(
+ "${cmake_options[@]}"
+- -DCMAKE_EXE_LINKER_FLAGS:STRING="-fuse-ld=gold"
+- -DCMAKE_SHARED_LINKER_FLAGS:STRING="-fuse-ld=gold"
++ -DCMAKE_EXE_LINKER_FLAGS:STRING="-L/usr/local/lib -fuse-ld=gold"
++ -DCMAKE_SHARED_LINKER_FLAGS:STRING="-L/usr/local/lib -fuse-ld=gold"
++ -DCMAKE_CPP_COMPILER=%%CPP_ONLY%%
++ -DCMAKE_C_COMPILER=%%CC_ONLY%%
++ -DCMAKE_CXX_COMPILER=%%CXX_ONLY%%
+ )
+ fi
+ else
diff --git a/lang/swift/files/patch-swiftpm_Sources_PackageDescription_Package.swift b/lang/swift/files/patch-swiftpm_Sources_PackageDescription_Package.swift
deleted file mode 100644
index 5a920f889b9e..000000000000
--- a/lang/swift/files/patch-swiftpm_Sources_PackageDescription_Package.swift
+++ /dev/null
@@ -1,11 +0,0 @@
---- swiftpm/Sources/PackageDescription/Package.swift.orig 2016-03-16 18:28:14 UTC
-+++ swiftpm/Sources/PackageDescription/Package.swift
-@@ -10,6 +10,8 @@
-
- #if os(Linux)
- import Glibc
-+#elseif os(FreeBSD)
-+import Glibc
- #else
- import Darwin.C
- #endif
diff --git a/lang/swift/files/patch-swiftpm_Sources_libc_libc.swift b/lang/swift/files/patch-swiftpm_Sources_libc_libc.swift
deleted file mode 100644
index d898055a8050..000000000000
--- a/lang/swift/files/patch-swiftpm_Sources_libc_libc.swift
+++ /dev/null
@@ -1,11 +0,0 @@
---- swiftpm/Sources/libc/libc.swift.orig 2016-03-16 18:28:14 UTC
-+++ swiftpm/Sources/libc/libc.swift
-@@ -10,6 +10,8 @@
-
- #if os(Linux)
- @_exported import Glibc
-+#elseif os(FreeBSD)
-+@_exported import Glibc
- #else
- @_exported import Darwin.C
- #endif
diff --git a/lang/swift/pkg-plist b/lang/swift/pkg-plist
index e0c3ab2292bc..b463a5eb24cb 100644
--- a/lang/swift/pkg-plist
+++ b/lang/swift/pkg-plist
@@ -1,13 +1,23 @@
-bin/sil-extract
+bin/sil-func-extractor
+bin/sil-nm
bin/sil-opt
+bin/sil-passpipeline-dumper
bin/swift
-bin/swift-compress
+bin/swift-api-digester
+bin/swift-api-dump.py
+bin/swift-autolink-extract
+bin/swift-build-tool
bin/swift-demangle
+bin/swift-format
bin/swift-ide-test
bin/swift-llvm-opt
+bin/swift-reflection-dump
+bin/swift-remoteast-test
bin/swiftc
-bin/swift-build-tool
-lib/swift/clang/include/Intrin.h
+lib/swift/clang/include/__clang_cuda_cmath.h
+lib/swift/clang/include/__clang_cuda_intrinsics.h
+lib/swift/clang/include/__clang_cuda_math_forward_declares.h
+lib/swift/clang/include/__clang_cuda_runtime_wrapper.h
lib/swift/clang/include/__stddef_max_align_t.h
lib/swift/clang/include/__wmmintrin_aes.h
lib/swift/clang/include/__wmmintrin_pclmul.h
@@ -16,18 +26,26 @@ lib/swift/clang/include/altivec.h
lib/swift/clang/include/ammintrin.h
lib/swift/clang/include/arm_acle.h
lib/swift/clang/include/arm_neon.h
+lib/swift/clang/include/armintr.h
lib/swift/clang/include/avx2intrin.h
lib/swift/clang/include/avx512bwintrin.h
lib/swift/clang/include/avx512cdintrin.h
lib/swift/clang/include/avx512dqintrin.h
lib/swift/clang/include/avx512erintrin.h
lib/swift/clang/include/avx512fintrin.h
+lib/swift/clang/include/avx512ifmaintrin.h
+lib/swift/clang/include/avx512ifmavlintrin.h
+lib/swift/clang/include/avx512pfintrin.h
+lib/swift/clang/include/avx512vbmiintrin.h
+lib/swift/clang/include/avx512vbmivlintrin.h
lib/swift/clang/include/avx512vlbwintrin.h
+lib/swift/clang/include/avx512vlcdintrin.h
lib/swift/clang/include/avx512vldqintrin.h
lib/swift/clang/include/avx512vlintrin.h
lib/swift/clang/include/avxintrin.h
lib/swift/clang/include/bmi2intrin.h
lib/swift/clang/include/bmiintrin.h
+lib/swift/clang/include/clflushoptintrin.h
lib/swift/clang/include/cpuid.h
lib/swift/clang/include/cuda_builtin_vars.h
lib/swift/clang/include/emmintrin.h
@@ -40,6 +58,7 @@ lib/swift/clang/include/htmintrin.h
lib/swift/clang/include/htmxlintrin.h
lib/swift/clang/include/ia32intrin.h
lib/swift/clang/include/immintrin.h
+lib/swift/clang/include/intrin.h
lib/swift/clang/include/inttypes.h
lib/swift/clang/include/iso646.h
lib/swift/clang/include/limits.h
@@ -48,7 +67,10 @@ lib/swift/clang/include/mm3dnow.h
lib/swift/clang/include/mm_malloc.h
lib/swift/clang/include/mmintrin.h
lib/swift/clang/include/module.modulemap
+lib/swift/clang/include/mwaitxintrin.h
lib/swift/clang/include/nmmintrin.h
+lib/swift/clang/include/opencl-c.h
+lib/swift/clang/include/pkuintrin.h
lib/swift/clang/include/pmmintrin.h
lib/swift/clang/include/popcntintrin.h
lib/swift/clang/include/prfchwintrin.h
@@ -82,30 +104,44 @@ lib/swift/clang/include/xsavesintrin.h
lib/swift/clang/include/xtestintrin.h
lib/swift/freebsd/libswiftCore.so
lib/swift/freebsd/libswiftGlibc.so
+lib/swift/freebsd/libswiftRemoteMirror.so
+lib/swift/freebsd/libswiftSwiftOnoneSupport.so
lib/swift/freebsd/x86_64/Glibc.swiftdoc
lib/swift/freebsd/x86_64/Glibc.swiftmodule
lib/swift/freebsd/x86_64/Swift.swiftdoc
lib/swift/freebsd/x86_64/Swift.swiftmodule
-lib/swift/freebsd/x86_64/swift.ld
-lib/swift/glibc/module.map
+lib/swift/freebsd/x86_64/SwiftOnoneSupport.swiftdoc
+lib/swift/freebsd/x86_64/SwiftOnoneSupport.swiftmodule
+lib/swift/freebsd/x86_64/glibc.modulemap
+lib/swift/freebsd/x86_64/swift_begin.o
+lib/swift/freebsd/x86_64/swift_end.o
+lib/swift/shims/AssertionReporting.h
lib/swift/shims/CoreFoundationShims.h
+lib/swift/shims/DispatchOverlayShims.h
lib/swift/shims/FoundationShims.h
lib/swift/shims/GlobalObjects.h
lib/swift/shims/HeapObject.h
lib/swift/shims/LibcShims.h
+lib/swift/shims/OSOverlayShims.h
+lib/swift/shims/ObjectiveCOverlayShims.h
lib/swift/shims/RefCount.h
lib/swift/shims/RuntimeShims.h
lib/swift/shims/RuntimeStubs.h
+lib/swift/shims/SafariServicesOverlayShims.h
+lib/swift/shims/SwiftStdbool.h
lib/swift/shims/SwiftStddef.h
lib/swift/shims/SwiftStdint.h
lib/swift/shims/UnicodeShims.h
-lib/swift/shims/module.map
+lib/swift/shims/Visibility.h
+lib/swift/shims/XCTestOverlayShims.h
+lib/swift/shims/XPCOverlayShims.h
+lib/swift/shims/module.modulemap
lib/swift_static/freebsd/libswiftCore.a
lib/swift_static/freebsd/libswiftGlibc.a
-lib/swift_static/freebsd/libswiftRuntime.a
-lib/swift_static/freebsd/libswiftStdlibStubs.a
-share/emacs/site-lisp/swift-mode.el
+lib/swift_static/freebsd/libswiftSwiftOnoneSupport.a
+lib/swift_static/freebsd/static-stdlib-args.lnk
man/man1/swift.1.gz
+share/emacs/site-lisp/swift-mode.el
share/vim/vim73/ftdetect/sil.vim
share/vim/vim73/ftdetect/swift.vim
share/vim/vim73/ftdetect/swiftgyb.vim