From 5b6b41a5d4b162f3da8d93609cc4dba6c5e4768d Mon Sep 17 00:00:00 2001 From: Ron Olson Date: Sep 19 2020 03:33:45 +0000 Subject: Updated to Swift 5.3-RELEASE --- diff --git a/.gitignore b/.gitignore index eef5596..b0b806f 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ /sourcekit-lsp.tar.gz /swift-syntax.tar.gz /cmake-3.16.5.tar.gz +/release-67-1.tar.gz diff --git a/build-setup.patch b/build-setup.patch deleted file mode 100644 index 0308c3f..0000000 --- a/build-setup.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- swift/utils/build-presets.ini.orig 2020-01-30 19:54:07.528043218 -0600 -+++ swift/utils/build-presets.ini 2020-01-30 19:55:11.580461138 -0600 -@@ -741,7 +741,6 @@ - - dash-dash - --build-ninja - install-swift - install-lldb - install-llbuild -@@ -755,11 +754,6 @@ - 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 -- - # Build the benchmarks against the toolchain. - toolchain-benchmarks - diff --git a/ibm-identifier.patch b/ibm-identifier.patch deleted file mode 100644 index 8ed81c3..0000000 --- a/ibm-identifier.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- swiftpm/Sources/Build/Triple.swift.orig 2020-04-11 19:16:00.451437120 +0000 -+++ swiftpm/Sources/Build/Triple.swift 2020-04-11 19:17:33.091437120 +0000 -@@ -135,7 +135,7 @@ - public static let x86_64Linux = try! Triple("x86_64-unknown-linux-gnu") - public static let i686Linux = try! Triple("i686-unknown-linux") - public static let ppc64leLinux = try! Triple("powerpc64le-unknown-linux") -- public static let s390xLinux = try! Triple("s390x-unknown-linux") -+ public static let s390xLinux = try! Triple("s390x-ibm-linux") - public static let arm64Linux = try! Triple("aarch64-unknown-linux-gnu") - public static let armLinux = try! Triple("armv7-unknown-linux-gnueabihf") - public static let armAndroid = try! Triple("armv7a-unknown-linux-androideabi") diff --git a/llvm-indexstore.patch b/llvm-indexstore.patch new file mode 100644 index 0000000..fac4669 --- /dev/null +++ b/llvm-indexstore.patch @@ -0,0 +1,17 @@ +--- llvm-project/clang/include/indexstore/indexstore.h.orig 2020-08-30 20:56:38.552235207 -0500 ++++ llvm-project/clang/include/indexstore/indexstore.h 2020-08-30 20:58:02.746863308 -0500 +@@ -98,9 +98,11 @@ + + #define INDEXSTORE_OPTIONS_ATTRS INDEXSTORE_OPEN_ENUM_ATTR INDEXSTORE_FLAG_ENUM_ATTR + +-#if defined(__has_extension) +-#if __has_extension(cxx_strong_enums) || __has_feature(objc_fixed_enum) +-# define INDEXSTORE_OPTIONS(_type, _name) enum INDEXSTORE_OPTIONS_ATTRS _name : _type _name; enum INDEXSTORE_OPTIONS_ATTRS _name : _type ++#if __has_feature(objc_fixed_enum) ++#ifdef __cplusplus ++# define INDEXSTORE_OPTIONS(_type, _name) enum INDEXSTORE_OPTIONS_ATTRS _name : _type ++#else ++# define INDEXSTORE_OPTIONS(_type, _name) enum _name : _type; typedef enum _name _name; enum INDEXSTORE_OPTIONS_ATTRS _name : _type + #endif + #endif + diff --git a/llvm.patch b/llvm.patch deleted file mode 100644 index b9f70d5..0000000 --- a/llvm.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- llvm-project/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h.orig 2020-01-29 10:02:44.222689214 -0600 -+++ llvm-project/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h 2020-01-29 10:03:02.007354450 -0600 -@@ -16,6 +16,8 @@ - #include "llvm/Demangle/DemangleConfig.h" - #include "llvm/Demangle/StringView.h" - #include -+#include -+#include - - namespace llvm { - namespace itanium_demangle { diff --git a/nosysctl.patch b/nosysctl.patch index ce4546c..a93e565 100644 --- a/nosysctl.patch +++ b/nosysctl.patch @@ -1,6 +1,6 @@ -diff -Naur swift-corelibs-foundation-orig/CoreFoundation/PlugIn.subproj/CFBundle_InfoPlist.c swift-corelibs-foundation/CoreFoundation/PlugIn.subproj/CFBundle_InfoPlist.c ---- swift-corelibs-foundation-orig/CoreFoundation/PlugIn.subproj/CFBundle_InfoPlist.c 2020-03-18 02:25:12.000000000 -0500 -+++ swift-corelibs-foundation/CoreFoundation/PlugIn.subproj/CFBundle_InfoPlist.c 2020-04-18 12:54:00.130921751 -0500 +diff -Naur ./swift-corelibs-foundation-orig/CoreFoundation/PlugIn.subproj/CFBundle_InfoPlist.c swift-corelibs-foundation/CoreFoundation/PlugIn.subproj/CFBundle_InfoPlist.c +--- ./swift-corelibs-foundation-orig/CoreFoundation/PlugIn.subproj/CFBundle_InfoPlist.c 2020-04-19 22:20:35.000000000 -0500 ++++ swift-corelibs-foundation/CoreFoundation/PlugIn.subproj/CFBundle_InfoPlist.c 2020-04-24 21:29:34.742564898 -0500 @@ -17,7 +17,7 @@ #if (TARGET_OS_MAC || TARGET_OS_LINUX || TARGET_OS_BSD) && !TARGET_OS_CYGWIN @@ -10,12 +10,12 @@ diff -Naur swift-corelibs-foundation-orig/CoreFoundation/PlugIn.subproj/CFBundle #include #endif #include -diff -Naur swift-corelibs-foundation-orig/CoreFoundation/PlugIn.subproj/CFBundle_Resources.c swift-corelibs-foundation/CoreFoundation/PlugIn.subproj/CFBundle_Resources.c ---- swift-corelibs-foundation-orig/CoreFoundation/PlugIn.subproj/CFBundle_Resources.c 2020-03-18 02:25:12.000000000 -0500 -+++ swift-corelibs-foundation/CoreFoundation/PlugIn.subproj/CFBundle_Resources.c 2020-04-18 12:53:44.299349245 -0500 +diff -Naur ./swift-corelibs-foundation-orig/CoreFoundation/PlugIn.subproj/CFBundle_Resources.c swift-corelibs-foundation/CoreFoundation/PlugIn.subproj/CFBundle_Resources.c +--- ./swift-corelibs-foundation-orig/CoreFoundation/PlugIn.subproj/CFBundle_Resources.c 2020-04-19 22:20:35.000000000 -0500 ++++ swift-corelibs-foundation/CoreFoundation/PlugIn.subproj/CFBundle_Resources.c 2020-04-24 21:30:07.201669760 -0500 @@ -27,7 +27,7 @@ - #if TARGET_OS_MAC || TARGET_OS_LINUX + #if TARGET_OS_MAC || TARGET_OS_LINUX || TARGET_OS_BSD #include -#if !TARGET_OS_ANDROID +#if TARGET_OS_MAC || TARGET_OS_BSD diff --git a/python3-2.patch b/python3-2.patch deleted file mode 100644 index 1feab4f..0000000 --- a/python3-2.patch +++ /dev/null @@ -1,410 +0,0 @@ -diff -Naur swift-orig/stdlib/public/core/IntegerTypes.swift.gyb swift/stdlib/public/core/IntegerTypes.swift.gyb ---- swift-orig/stdlib/public/core/IntegerTypes.swift.gyb 2020-01-24 01:22:05.000000000 -0600 -+++ swift/stdlib/public/core/IntegerTypes.swift.gyb 2020-01-29 13:23:24.851180231 -0600 -@@ -14,10 +14,9 @@ - # Utility code for later in this template - # - --from SwiftIntTypes import all_integer_types, int_max_bits, should_define_truncating_bit_pattern_init --from SwiftFloatingPointTypes import getFtoIBounds -+import SwiftIntTypes -+import SwiftFloatingPointTypes - --from string import maketrans, capitalize - from itertools import chain - - # Number of bits in the Builtin.Word type -@@ -1064,7 +1063,7 @@ - //===--- Concrete FixedWidthIntegers --------------------------------------===// - //===----------------------------------------------------------------------===// - --% for self_type in all_integer_types(word_bits): -+% for self_type in SwiftIntTypes.all_integer_types(word_bits): - % bits = self_type.bits - % signed = self_type.is_signed - % BuiltinName = self_type.builtin_name -@@ -1125,7 +1124,7 @@ - - % for (FloatType, FloatBits) in [ - % ('Float', 32), ('Double', 64), ('Float80', 80)]: --% (lower, upper) = getFtoIBounds(floatBits=FloatBits, intBits=int(bits), signed=signed) -+% (lower, upper) = SwiftFloatingPointTypes.getFtoIBounds(floatBits=FloatBits, intBits=int(bits), signed=signed) - - % if FloatType == 'Float80': - #if !(os(Windows) || os(Android)) && (arch(i386) || arch(x86_64)) -@@ -1648,7 +1647,7 @@ - return Hasher._hash( - seed: seed, - bytes: UInt64(truncatingIfNeeded: ${U}${Self}(_value)), -- count: ${bits / 8}) -+ count: ${bits // 8}) - % end - } - } -diff -Naur swift-orig/stdlib/public/core/Mirrors.swift.gyb swift/stdlib/public/core/Mirrors.swift.gyb ---- swift-orig/stdlib/public/core/Mirrors.swift.gyb 2020-01-24 01:22:05.000000000 -0600 -+++ swift/stdlib/public/core/Mirrors.swift.gyb 2020-01-29 13:27:07.425509032 -0600 -@@ -12,7 +12,7 @@ - - %{ - --from SwiftIntTypes import all_integer_types -+import SwiftIntTypes - - # Number of bits in the Builtin.Word type - word_bits = int(CMAKE_SIZEOF_VOID_P) * 8 -@@ -26,7 +26,7 @@ - ('Unicode.Scalar', '.uInt', 'UInt64(self)'), - ] - --for self_ty in all_integer_types(word_bits): -+for self_ty in SwiftIntTypes.all_integer_types(word_bits): - Self = self_ty.stdlib_name - if self_ty.is_signed: - Types.append( (Self, '.int', 'Int64(self)') ) -diff -Naur swift-orig/stdlib/public/core/SIMDVectorTypes.swift.gyb swift/stdlib/public/core/SIMDVectorTypes.swift.gyb ---- swift-orig/stdlib/public/core/SIMDVectorTypes.swift.gyb 2020-01-24 01:22:05.000000000 -0600 -+++ swift/stdlib/public/core/SIMDVectorTypes.swift.gyb 2020-01-29 13:30:52.170919077 -0600 -@@ -11,7 +11,7 @@ - //===----------------------------------------------------------------------===// - - %{ --from SwiftIntTypes import all_integer_types -+import SwiftIntTypes - word_bits = int(CMAKE_SIZEOF_VOID_P) * 8 - storagescalarCounts = [2,4,8,16,32,64] - vectorscalarCounts = storagescalarCounts + [3] -@@ -90,17 +90,17 @@ - % if n >= 4: - /// Creates a new vector from two half-length vectors. - @_transparent -- public init(lowHalf: SIMD${n/2}, highHalf: SIMD${n/2}) { -+ public init(lowHalf: SIMD${n//2}, highHalf: SIMD${n//2}) { - self.init() - self.lowHalf = lowHalf - self.highHalf = highHalf - } - --% for (half,indx) in [('low','i'), ('high',str(n/2)+'+i'), ('even','2*i'), ('odd','2*i+1')]: -+% for (half,indx) in [('low','i'), ('high',str(n//2)+'+i'), ('even','2*i'), ('odd','2*i+1')]: - /// A half-length vector made up of the ${half} elements of the vector. -- public var ${half}Half: SIMD${n/2} { -+ public var ${half}Half: SIMD${n//2} { - @inlinable get { -- var result = SIMD${n/2}() -+ var result = SIMD${n//2}() - for i in result.indices { result[i] = self[${indx}] } - return result - } -@@ -159,7 +159,7 @@ - public var debugDescription: String { - return "SIMD${n}<\(Scalar.self)>(${', '.join(map(lambda c: - '\\(self['+ str(c) + '])', -- xrange(n)))})" -+ range(n)))})" - } - } - -@@ -203,7 +203,7 @@ - } - } - --%for self_type in all_integer_types(word_bits): -+%for self_type in SwiftIntTypes.all_integer_types(word_bits): - % Self = self_type.stdlib_name - % BuiltinName = self_type.builtin_name - % Mask = Self if self_type.is_signed else self_type.get_opposite_signedness().stdlib_name -@@ -212,7 +212,7 @@ - public typealias SIMDMaskScalar = ${Mask} - - % for n in storagescalarCounts: --% bytes = n * self_type.bits / 8 -+% bytes = n * self_type.bits // 8 - /// Storage for a vector of ${spelledNumbers[n]} integers. - @frozen - @_alignment(${bytes if bytes <= 16 else 16}) -@@ -257,7 +257,7 @@ - public typealias SIMDMaskScalar = Int${bits} - - % for n in storagescalarCounts: --% bytes = n * bits / 8 -+% bytes = n * bits // 8 - /// Storage for a vector of ${spelledNumbers[n]} floating-point values. - @frozen - @_alignment(${bytes if bytes <= 16 else 16}) -diff -Naur swift-orig/stdlib/public/core/Tuple.swift.gyb swift/stdlib/public/core/Tuple.swift.gyb ---- swift-orig/stdlib/public/core/Tuple.swift.gyb 2020-01-24 01:22:05.000000000 -0600 -+++ swift/stdlib/public/core/Tuple.swift.gyb 2020-01-29 13:32:22.287291260 -0600 -@@ -111,7 +111,7 @@ - % equatableTypeParams = ", ".join(["{}: Equatable".format(c) for c in typeParams]) - - % originalTuple = "(\"a\", {})".format(", ".join(map(str, range(1, arity)))) --% greaterTuple = "(\"a\", {})".format(", ".join(map(str, range(1, arity - 1) + [arity]))) -+% greaterTuple = "(\"a\", {})".format(", ".join(map(str, list(range(1, arity - 1)) + [arity]))) - - /// Returns a Boolean value indicating whether the corresponding components of - /// two tuples are equal. -diff -Naur swift-orig/utils/gyb_sourcekit_support/__init__.py swift/utils/gyb_sourcekit_support/__init__.py ---- swift-orig/utils/gyb_sourcekit_support/__init__.py 2020-01-24 01:22:05.000000000 -0600 -+++ swift/utils/gyb_sourcekit_support/__init__.py 2020-01-29 13:33:22.111521781 -0600 -@@ -14,9 +14,9 @@ - # utils/gyb_sourcekit_support/ directory as a module. - # - # ---------------------------------------------------------------------------- --from UIDs import UID_KEYS --from UIDs import UID_KINDS --from UIDs import UID_REQUESTS -+from .UIDs import UID_KEYS -+from .UIDs import UID_KINDS -+from .UIDs import UID_REQUESTS - - - def check_uid_duplication(): -diff -Naur swift-orig/utils/gyb_syntax_support/AttributeNodes.py swift/utils/gyb_syntax_support/AttributeNodes.py ---- swift-orig/utils/gyb_syntax_support/AttributeNodes.py 2020-01-24 01:22:05.000000000 -0600 -+++ swift/utils/gyb_syntax_support/AttributeNodes.py 2020-01-29 13:34:03.265044624 -0600 -@@ -1,5 +1,5 @@ --from Child import Child --from Node import Node # noqa: I201 -+from .Child import Child -+from .Node import Node # noqa: I201 - - ATTRIBUTE_NODES = [ - # token-list -> token? token-list? -diff -Naur swift-orig/utils/gyb_syntax_support/AvailabilityNodes.py swift/utils/gyb_syntax_support/AvailabilityNodes.py ---- swift-orig/utils/gyb_syntax_support/AvailabilityNodes.py 2020-01-24 01:22:05.000000000 -0600 -+++ swift/utils/gyb_syntax_support/AvailabilityNodes.py 2020-01-29 13:34:33.458161889 -0600 -@@ -1,5 +1,5 @@ --from Child import Child --from Node import Node # noqa: I201 -+from .Child import Child -+from .Node import Node # noqa: I201 - - AVAILABILITY_NODES = [ - # availability-spec-list -> availability-entry availability-spec-list? -diff -Naur swift-orig/utils/gyb_syntax_support/Child.py swift/utils/gyb_syntax_support/Child.py ---- swift-orig/utils/gyb_syntax_support/Child.py 2020-01-24 01:22:05.000000000 -0600 -+++ swift/utils/gyb_syntax_support/Child.py 2020-01-29 13:35:02.044219688 -0600 -@@ -1,7 +1,7 @@ - # flake8: noqa I201 --from Classification import classification_by_name --from Token import SYNTAX_TOKEN_MAP --from kinds import SYNTAX_BASE_KINDS, kind_to_type, lowercase_first_word -+from .Classification import classification_by_name -+from .Token import SYNTAX_TOKEN_MAP -+from .kinds import SYNTAX_BASE_KINDS, kind_to_type, lowercase_first_word - - - class Child(object): -diff -Naur swift-orig/utils/gyb_syntax_support/Classification.py swift/utils/gyb_syntax_support/Classification.py ---- swift-orig/utils/gyb_syntax_support/Classification.py 2020-01-24 01:22:05.000000000 -0600 -+++ swift/utils/gyb_syntax_support/Classification.py 2020-01-29 13:46:45.334244147 -0600 -@@ -1,5 +1,5 @@ --from Node import error --from kinds import lowercase_first_word # noqa: I201 -+from .Node import error -+from .kinds import lowercase_first_word # noqa: I201 - - - class SyntaxClassification(object): -diff -Naur swift-orig/utils/gyb_syntax_support/CommonNodes.py swift/utils/gyb_syntax_support/CommonNodes.py ---- swift-orig/utils/gyb_syntax_support/CommonNodes.py 2020-01-24 01:22:05.000000000 -0600 -+++ swift/utils/gyb_syntax_support/CommonNodes.py 2020-01-29 13:47:02.390875308 -0600 -@@ -1,5 +1,5 @@ --from Child import Child --from Node import Node # noqa: I201 -+from .Child import Child -+from .Node import Node # noqa: I201 - - COMMON_NODES = [ - Node('Decl', kind='Syntax'), -diff -Naur swift-orig/utils/gyb_syntax_support/DeclNodes.py swift/utils/gyb_syntax_support/DeclNodes.py ---- swift-orig/utils/gyb_syntax_support/DeclNodes.py 2020-01-24 01:22:05.000000000 -0600 -+++ swift/utils/gyb_syntax_support/DeclNodes.py 2020-01-29 13:47:30.486914972 -0600 -@@ -1,6 +1,6 @@ - # flake8: noqa I201 --from Child import Child --from Node import Node -+from .Child import Child -+from .Node import Node - - - DECL_NODES = [ -diff -Naur swift-orig/utils/gyb_syntax_support/ExprNodes.py swift/utils/gyb_syntax_support/ExprNodes.py ---- swift-orig/utils/gyb_syntax_support/ExprNodes.py 2020-01-24 01:22:05.000000000 -0600 -+++ swift/utils/gyb_syntax_support/ExprNodes.py 2020-01-29 13:47:47.095529555 -0600 -@@ -1,5 +1,5 @@ --from Child import Child --from Node import Node # noqa: I201 -+from .Child import Child -+from .Node import Node # noqa: I201 - - EXPR_NODES = [ - # An inout expression. -diff -Naur swift-orig/utils/gyb_syntax_support/GenericNodes.py swift/utils/gyb_syntax_support/GenericNodes.py ---- swift-orig/utils/gyb_syntax_support/GenericNodes.py 2020-01-24 01:22:05.000000000 -0600 -+++ swift/utils/gyb_syntax_support/GenericNodes.py 2020-01-29 13:48:04.737182368 -0600 -@@ -1,5 +1,5 @@ --from Child import Child --from Node import Node # noqa: I201 -+from .Child import Child -+from .Node import Node # noqa: I201 - - GENERIC_NODES = [ - # generic-where-clause -> 'where' requirement-list -diff -Naur swift-orig/utils/gyb_syntax_support/__init__.py swift/utils/gyb_syntax_support/__init__.py ---- swift-orig/utils/gyb_syntax_support/__init__.py 2020-01-24 01:22:05.000000000 -0600 -+++ swift/utils/gyb_syntax_support/__init__.py 2020-01-29 13:52:03.762062110 -0600 -@@ -1,22 +1,22 @@ - import textwrap --from AttributeNodes import ATTRIBUTE_NODES # noqa: I201 --from AvailabilityNodes import AVAILABILITY_NODES # noqa: I201 --import Classification # noqa: I201 --from CommonNodes import COMMON_NODES # noqa: I201 --from DeclNodes import DECL_NODES # noqa: I201 --from ExprNodes import EXPR_NODES # noqa: I201 --from GenericNodes import GENERIC_NODES # noqa: I201 -+from .AttributeNodes import ATTRIBUTE_NODES # noqa: I201 -+from .AvailabilityNodes import AVAILABILITY_NODES # noqa: I201 -+from . import Classification # noqa: I201 -+from .CommonNodes import COMMON_NODES # noqa: I201 -+from .DeclNodes import DECL_NODES # noqa: I201 -+from .ExprNodes import EXPR_NODES # noqa: I201 -+from .GenericNodes import GENERIC_NODES # noqa: I201 - --from NodeSerializationCodes import SYNTAX_NODE_SERIALIZATION_CODES, \ -+from .NodeSerializationCodes import SYNTAX_NODE_SERIALIZATION_CODES, \ - get_serialization_code, \ - verify_syntax_node_serialization_codes - --from PatternNodes import PATTERN_NODES # noqa: I201 --from StmtNodes import STMT_NODES # noqa: I201 -+from .PatternNodes import PATTERN_NODES # noqa: I201 -+from .StmtNodes import STMT_NODES # noqa: I201 - --import Token --from Trivia import TRIVIAS # noqa: I201 --from TypeNodes import TYPE_NODES # noqa: I201 -+from . import Token -+from .Trivia import TRIVIAS # noqa: I201 -+from .TypeNodes import TYPE_NODES # noqa: I201 - - - # Re-export global constants -diff -Naur swift-orig/utils/gyb_syntax_support/Node.py swift/utils/gyb_syntax_support/Node.py ---- swift-orig/utils/gyb_syntax_support/Node.py 2020-01-24 01:22:05.000000000 -0600 -+++ swift/utils/gyb_syntax_support/Node.py 2020-01-29 13:52:32.755139868 -0600 -@@ -1,7 +1,7 @@ - from __future__ import print_function - import sys # noqa: I201 - --from kinds import SYNTAX_BASE_KINDS, kind_to_type, lowercase_first_word -+from .kinds import SYNTAX_BASE_KINDS, kind_to_type, lowercase_first_word - - - def error(msg): -diff -Naur swift-orig/utils/gyb_syntax_support/NodeSerializationCodes.py swift/utils/gyb_syntax_support/NodeSerializationCodes.py ---- swift-orig/utils/gyb_syntax_support/NodeSerializationCodes.py 2020-01-24 01:22:05.000000000 -0600 -+++ swift/utils/gyb_syntax_support/NodeSerializationCodes.py 2020-01-29 13:52:58.148083796 -0600 -@@ -1,4 +1,4 @@ --from Node import error -+from .Node import error - - - SYNTAX_NODE_SERIALIZATION_CODES = { -diff -Naur swift-orig/utils/gyb_syntax_support/PatternNodes.py swift/utils/gyb_syntax_support/PatternNodes.py ---- swift-orig/utils/gyb_syntax_support/PatternNodes.py 2020-01-24 01:22:05.000000000 -0600 -+++ swift/utils/gyb_syntax_support/PatternNodes.py 2020-01-29 13:53:38.452582038 -0600 -@@ -1,5 +1,5 @@ --from Child import Child --from Node import Node # noqa: I201 -+from .Child import Child -+from .Node import Node # noqa: I201 - - PATTERN_NODES = [ - -diff -Naur swift-orig/utils/gyb_syntax_support/StmtNodes.py swift/utils/gyb_syntax_support/StmtNodes.py ---- swift-orig/utils/gyb_syntax_support/StmtNodes.py 2020-01-24 01:22:05.000000000 -0600 -+++ swift/utils/gyb_syntax_support/StmtNodes.py 2020-01-29 13:53:55.056199243 -0600 -@@ -1,5 +1,5 @@ --from Child import Child --from Node import Node # noqa: I201 -+from .Child import Child -+from .Node import Node # noqa: I201 - - STMT_NODES = [ - # continue-stmt -> 'continue' label? ';'? -diff -Naur swift-orig/utils/gyb_syntax_support/Token.py swift/utils/gyb_syntax_support/Token.py ---- swift-orig/utils/gyb_syntax_support/Token.py 2020-01-24 01:22:05.000000000 -0600 -+++ swift/utils/gyb_syntax_support/Token.py 2020-01-29 13:54:12.720855888 -0600 -@@ -1,6 +1,6 @@ --from Classification import classification_by_name --from Node import error # noqa: I201 --from kinds import lowercase_first_word # noqa: I201 -+from .Classification import classification_by_name -+from .Node import error # noqa: I201 -+from .kinds import lowercase_first_word # noqa: I201 - - - class Token(object): -diff -Naur swift-orig/utils/gyb_syntax_support/Trivia.py swift/utils/gyb_syntax_support/Trivia.py ---- swift-orig/utils/gyb_syntax_support/Trivia.py 2020-01-24 01:22:05.000000000 -0600 -+++ swift/utils/gyb_syntax_support/Trivia.py 2020-01-29 13:54:41.647931191 -0600 -@@ -1,5 +1,5 @@ --from Node import error --from kinds import lowercase_first_word # noqa: I201 -+from .Node import error -+from .kinds import lowercase_first_word # noqa: I201 - - - class Trivia(object): -diff -Naur swift-orig/utils/gyb_syntax_support/TypeNodes.py swift/utils/gyb_syntax_support/TypeNodes.py ---- swift-orig/utils/gyb_syntax_support/TypeNodes.py 2020-01-24 01:22:05.000000000 -0600 -+++ swift/utils/gyb_syntax_support/TypeNodes.py 2020-01-29 13:55:07.952909024 -0600 -@@ -1,5 +1,5 @@ --from Child import Child --from Node import Node # noqa: I201 -+from .Child import Child -+from .Node import Node # noqa: I201 - - TYPE_NODES = [ - # simple-type-identifier -> identifier generic-argument-clause? -diff -Naur swift-orig/utils/line-directive swift/utils/line-directive ---- swift-orig/utils/line-directive 2020-01-24 01:22:05.000000000 -0600 -+++ swift/utils/line-directive 2020-01-29 13:57:12.829551057 -0600 -@@ -61,7 +61,7 @@ - - def _make_line_map(target_filename, stream=None): - """ -- >>> from StringIO import StringIO -+ >>> from io import StringIO - >>> _make_line_map('box', - ... StringIO('''// ###sourceLocation(file: "foo.bar", line: 3) - ... line 2 -@@ -95,7 +95,7 @@ - - def map_line_to_source_file(target_filename, target_line_num): - """ -- >>> from tempfile import * -+ >>> from .tempfile import * - >>> # On Windows, the name of a NamedTemporaryFile cannot be used to open - >>> # the file for a second time if delete=True. Therefore, we have to - >>> # manually handle closing and deleting this file to allow us to open -@@ -145,7 +145,7 @@ - def map_line_from_source_file(source_filename, source_line_num, - target_filename): - """ -- >>> from tempfile import * -+ >>> from .tempfile import * - >>> # On Windows, the name of a NamedTemporaryFile cannot be used to open - >>> # the file for a second time if delete=True. Therefore, we have to - >>> # manually handle closing and deleting this file to allow us to open -@@ -231,7 +231,7 @@ - def run(): - """Simulate a couple of gyb-generated files - -- >>> from tempfile import * -+ >>> from .tempfile import * - >>> # On Windows, the name of a NamedTemporaryFile cannot be used to open - >>> # the file for a second time if delete=True. Therefore, we have to - >>> # manually handle closing and deleting this file to allow us to open diff --git a/sources b/sources index 47a2a7b..785548d 100644 --- a/sources +++ b/sources @@ -1,15 +1,15 @@ SHA512 (cmake-3.16.5.tar.gz) = 204ce83501c8068ff660c30a68641a354764135e1600a9a95b39476d072876e400961377e19bbe03a7b18412b36dcf21a693946a2a81cff5985e637e9f193671 -SHA512 (cmark.tar.gz) = a203871f3eb2e5fc7711466da574c7f24d08c32a56568a566fd9fc823a51f8c4241d5b93aad004862cc83410962f97fed275e098192f3a9afe4311a5f9e38197 -SHA512 (corelibs-foundation.tar.gz) = d75fb66841878b4a2cd41d04f19ed647b08715770d396e779b2cb7da9e63ed107ee9c48943472900ff43d3af6f19e341c248fa07714222cf58866047384adf62 -SHA512 (corelibs-libdispatch.tar.gz) = 0cfd719a98605e6e1ef407d01741656277bdb574f97e7f5caf0380ab1da7b7198887b2c2301a9711d292f4a7dc70e80692100d465d345acb82a5e8a9e8280e26 -SHA512 (corelibs-xctest.tar.gz) = a1c4c07a594e0c7c7348f0c7fc4a30858bb4cba8b4109e39c47dedd5671c910ad27c75a8818454d5e3defd0876237f6ce9a0447dd1a71e983c571d6f8c3f8586 -SHA512 (indexstore-db.tar.gz) = 67a17f91850931c075f0f412071fddda5df0c2389b4701f835ca22fd2aced36357b3cf75545ea3f0108cda833deb26fc6e4510e368209e7ce7a53e82f9b33fe1 -SHA512 (llbuild.tar.gz) = ca91a96a25624cf19b741fdc5dc909424aa6e71c4445a07450e1880fb721aff01b0bbcd94f34a11de663fa8811d105d07b277729ead00bc33e6181bbcbf67cb8 -SHA512 (llvm-project.tar.gz) = 157373299065aba8caa074d5d77c5a1e864da0c14cf783ad891cb70e5e03752f413011353a3e88d4fdfced16f177293973c543b9325dc9fdea10725ea401bd88 -SHA512 (package-manager.tar.gz) = 3a0271e1ea67b280253c5859a7535530e471454eeb639e2a2141ff020c453ca0e8b3bfa3273498f3258fb21b9e972ff761ff7516e036daf35de12059dddaf3de -SHA512 (release-61-2.tar.gz) = 9c277f95694ef2b65da0c435ef580f85ec5ac425bca0d3cac82167d32ac6dbcd00a4411def7a7dd0c16786943b498486716b2ed5b353f19c4a499e8e1529fbf2 -SHA512 (sourcekit-lsp.tar.gz) = 28e7bcdabaeb81a00c19aadd74574b8254736e6fb9626fbe070eb1b9f8e62e1fcda1c7cba8427df966d4d2b358669313b8c3cc71223141c2288cc6e56cb827d9 -SHA512 (swift-integration-tests.tar.gz) = d8822305c98912d1fe7e4c20cade9c59d145f830b5c4d60b48b587d9078263b9fa98ee107c15580bdcfe7bb3c2a3322563b68549e01644cc5cb881bc3ef57dcd -SHA512 (swift-syntax.tar.gz) = db765b93ce7d05b5377789aec9db6c9ef4f971e7cecd87cc5bf2f8d9e10780eea324a92b8d86eced7a8357a416ff8f3540bcd5ba8e6fd7f91ce37cccb305da65 -SHA512 (swift-xcode-playground-support.tar.gz) = a3744cca2d19512880f931e2fc23bc2186b7c20a11b9a2b165b89a89cb889fe949776da4478fdbddbbb95cfb26649bacff2c825be935bce383b718fda8adb949 -SHA512 (swift.tar.gz) = 60aff05eb6a8d71bd87ffdf0781dd7440ece8fff961f8676117cd6e520731a393519e7bf64d4ca14d54d109604424b33d89e3c9624d384d451f7fbd48863b886 +SHA512 (cmark.tar.gz) = 75834190177c95123f582e9eb35339d66b2b0aa8c5d31c528efde9554f0def94e3cc81f1211f091795e4ba9aac71f90ef082d3b363549ae78454d722ae78404b +SHA512 (corelibs-foundation.tar.gz) = 2292c8bc7ec49bef6b7b694cb5cbc49808a7460e49f795d5381826941e5b8241bf1b12cc869868aebe0cb8ed81fab8d6c614095e044c60d394595d11cf5e3203 +SHA512 (corelibs-libdispatch.tar.gz) = 9d6dd163a86a9e97d30cea0a268ccf06cee846f7a140722ccb4e73d01a716207be1ab7209ff51f0246fd2fbba43329e4c079fdc2bff991fd0e2c22364dd95cbc +SHA512 (corelibs-xctest.tar.gz) = b763c4a31e5ad0da4930b89c6093b29f22884fa6f890a4e322124c7a91d4dc2fafe90d322dffd6b7d7e1f606e03c8b33dfd9276ab1c3427145e3d5491070b274 +SHA512 (indexstore-db.tar.gz) = 7b57bb47f8651926b54e90e448db99addc4128ba808b2786b907713d5264df8fdf873bec95b146326bb001b58bfad92b5bccc0ef50161adc591512c925daac23 +SHA512 (llbuild.tar.gz) = f5ae7d4918144a890726ad76c1adb9a20a36460411b7b5d7c6305b6b4862aadb47304846a9c1a49f839b851ca82bdede36ca0d621a82ba9fb1876ea6be79e356 +SHA512 (llvm-project.tar.gz) = d2adb502cf11bb5894e05f20759d9c42af966f9577424fcd0b5db07d509040288e803bacde17c1e366623f8be65573802f528dd586c716a6393a608943343528 +SHA512 (package-manager.tar.gz) = d9511bf98f677ebba4c321e107861e032eaeb7f9950335201895acfbcb13ffaa4c9fcfbadac4aae7712ae9218b3f085aede9295740d14e9a9d8c07e02b853c9c +SHA512 (release-67-1.tar.gz) = 1b7b9b908f914a84c59f248f9d9fd5d0e72df3d9742ded10466af866d587aef410341361a6a8ba70ce1b7e99be15cedca271639e0f7d8589c968e6df0ee6ea97 +SHA512 (sourcekit-lsp.tar.gz) = 58af4e577133a65268daeed22cbbe827234be62319e5f6c6e8efb0760b3cdeac10308c55b7858b7e9f0190b0642f8cf62fce403abbc8274bd9399e84852fd8bf +SHA512 (swift-integration-tests.tar.gz) = ffdda011ce2d961a6e7182121cf52e4b2f461babc2340dae64fff5aed000d5f5f3b7a0039f01668ab1538580601c3ac3962745d80b4d7d2f227d4728b6961d1d +SHA512 (swift-syntax.tar.gz) = ba4964e22562600abdd36b01084b8bbf98b396d960d7e14ff0ead7a709c70d91fc37022a3356a41cf915ce450d35a4b5b595b838527aa0eb42a1a201c83cbcfc +SHA512 (swift-xcode-playground-support.tar.gz) = 760a3aaccd0a7587802991e98b650e1ab82cd56b45f99f787688f87020b66924a09e3032943cd7455804aa7f60a2c04f46c8184d331ea605658f473092fc8279 +SHA512 (swift.tar.gz) = 835ee9fc7689d7d9b92eda3d2458025409e574e86cdd59e4cb0e200e3d900ced26c8cf71ccbf02965989591deac9bbe43411a42947a7e47f371289cb84e42f35 diff --git a/swift-build-setup.patch b/swift-build-setup.patch new file mode 100644 index 0000000..4480202 --- /dev/null +++ b/swift-build-setup.patch @@ -0,0 +1,24 @@ +diff -Naur swift-orig/utils/build-presets.ini swift/utils/build-presets.ini +--- swift-orig/utils/build-presets.ini 2020-04-21 15:42:23.000000000 -0500 ++++ swift/utils/build-presets.ini 2020-04-23 09:55:05.038603369 -0500 +@@ -789,7 +789,6 @@ + + dash-dash + +-build-ninja + install-swift + install-lldb + install-llbuild +@@ -801,12 +800,7 @@ + install-sourcekit-lsp + 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 + + # Build the benchmarks against the toolchain. + toolchain-benchmarks diff --git a/swift-lang.spec b/swift-lang.spec index 08fb13d..bed47f9 100644 --- a/swift-lang.spec +++ b/swift-lang.spec @@ -1,15 +1,17 @@ %global debug_package %{nil} -%global swifttag 5.2.5-RELEASE -# Swift syntax seems to only be updated on major releases +%global swifttag 5.3-RELEASE %global swiftbuild swift-source %global cmake_version 3.16.5 +%global icu_version 67-1 + Name: swift-lang -Version: 5.2.5 +Version: 5.3 Release: 1%{?dist} Summary: Apple's Swift programming language License: ASL 2.0 and Unicode URL: https://swift.org + Source0: https://github.com/apple/swift/archive/swift-%{swifttag}.tar.gz#/swift.tar.gz Source1: https://github.com/apple/swift-corelibs-libdispatch/archive/swift-%{swifttag}.tar.gz#/corelibs-libdispatch.tar.gz Source2: https://github.com/apple/swift-corelibs-foundation/archive/swift-%{swifttag}.tar.gz#/corelibs-foundation.tar.gz @@ -22,26 +24,21 @@ Source8: https://github.com/apple/swift-xcode-playground-support/archive/ Source9: https://github.com/apple/sourcekit-lsp/archive/swift-%{swifttag}.tar.gz#/sourcekit-lsp.tar.gz Source10: https://github.com/apple/indexstore-db/archive/swift-%{swifttag}.tar.gz#/indexstore-db.tar.gz Source11: https://github.com/apple/llvm-project/archive/swift-%{swifttag}.tar.gz#/llvm-project.tar.gz -Source12: https://github.com/unicode-org/icu/archive/release-61-2.tar.gz +Source12: https://github.com/unicode-org/icu/archive/release-%{icu_version}.tar.gz Source13: https://github.com/apple/swift-syntax/archive/swift-%{swifttag}.zip#/swift-syntax.tar.gz Source14: https://github.com/Kitware/CMake/releases/download/v%{cmake_version}/cmake-%{cmake_version}.tar.gz -Patch0: build-setup.patch +Patch0: swift-build-setup.patch Patch1: compiler-rt-fuzzer.patch -Patch2: python3-2.patch Patch3: linux-tests-python-3-2.patch Patch4: glibcpthread.patch -Patch5: swift.patch -Patch6: llvm.patch +Patch6: nosysctl.patch Patch7: indexstore.patch Patch8: build-setup-s390x.patch -Patch9: ibm-identifier.patch -Patch10: nosysctl.patch +Patch9: llvm-indexstore.patch BuildRequires: clang BuildRequires: swig -BuildRequires: pkgconfig -BuildRequires: perl-podlators BuildRequires: rsync BuildRequires: python3 BuildRequires: python3-devel @@ -50,15 +47,18 @@ BuildRequires: libbsd-devel BuildRequires: libxml2-devel BuildRequires: libsqlite3x-devel BuildRequires: libblocksruntime-static -BuildRequires: libatomic-static BuildRequires: libcurl-devel BuildRequires: libuuid-devel BuildRequires: libedit-devel BuildRequires: libicu-devel BuildRequires: ninja-build +BuildRequires: perl-podlators +BuildRequires: python3-six +BuildRequires: python27 BuildRequires: /usr/bin/pathfix.py BuildRequires: make BuildRequires: openssl-devel +BuildRequires: cmake Requires: glibc-devel %if 0%{?fedora} >= 31 @@ -74,6 +74,7 @@ Provides: %{name} = %{version}-%{release} Obsoletes: %{name} < %{version}-%{release} Obsoletes: %{name}-runtime < %{version}-%{release} + ExclusiveArch: x86_64 aarch64 @@ -90,6 +91,7 @@ correct programs easier for the developer. %prep +%if 0%{?el8} # Now we build our own CMake because the one in EPEL8 is too old and # we can safely build it for all platforms (though will add some time # to the whole build process) @@ -97,7 +99,7 @@ correct programs easier for the developer. mkdir cmake-build cd cmake-build ../cmake-%{cmake_version}/bootstrap && make - +%endif %setup -q -c -n %{swiftbuild} -a 0 -a 1 -a 2 -a 3 -a 4 -a 5 -a 6 -a 7 -a 8 -a 9 -a 10 -a 11 -a 12 -a 13 # The Swift build script requires directories to be named @@ -118,7 +120,7 @@ mv llvm-project-swift-%{swifttag} llvm-project mv swift-syntax-swift-%{swifttag} swift-syntax # ICU -mv icu-release-61-2 icu +mv icu-release-%{icu_version} icu # Since we require ninja for building, there's no sense to rebuild it just for Swift %ifnarch s390x @@ -132,31 +134,23 @@ mv icu-release-61-2 icu %patch1 -p0 # Python 3 is the new default so we need to make the python code work with it -%patch2 -p0 %patch3 -p0 # Fixes compiler issue with glibc and pthreads after 2.5.0.9000 %patch4 -p0 -# -# 5.2 patches -# -%patch5 -p0 +# sys/sysctl.h has been removed +%patch6 -p0 # implicit include of cstdint -%patch6 -p0 %patch7 -p0 -# s390x-specific patches -%ifarch s390x +# Issue with enum declaration building with Clang 11 %patch9 -p0 -%endif - -# sys/sysctl.h has been removed -%patch10 -p0 # Fix python to python3 pathfix.py -pni "%{__python3} %{py3_shbang_opts}" swift/utils/api_checker/swift-api-checker.py +pathfix.py -pni "%{__python3} %{py3_shbang_opts}" llvm-project/compiler-rt/lib/hwasan/scripts/hwasan_symbolize %build export VERBOSE=1 @@ -165,8 +159,10 @@ export VERBOSE=1 mkdir $PWD/binforpython ln -s /usr/bin/python3 $PWD/binforpython/python export PATH=$PWD/binforpython:$PATH +%if 0%{?el8} # And for CMake, which we built first export PATH=$PWD/../cmake/cmake-build/bin:$PATH +%endif # Here we go! swift/utils/build-script --preset=buildbot_linux,no_test install_destdir=%{_builddir} installable_package=%{_builddir}/swift-%{version}-fedora.tar.gz @@ -197,12 +193,16 @@ cp %{_builddir}/usr/share/man/man1/swift.1 %{buildroot}%{_mandir}/man1/swift.1 %changelog +* Mon Sep 17 2020 Ron Olson 5.3-1 +- Updated to swift-5.3-RELEASE * Mon Aug 10 2020 Ron Olson 5.2.5-1 - Updated to swift-5.2.5-RELEASE * Wed Jul 29 2020 Fedora Release Engineering - 5.2.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Tue May 26 2020 Miro HronĨok - 5.2.4-2 - Rebuilt for Python 3.9 + * Wed May 20 2020 Ron Olson 5.2.4-1 - Updated to swift-5.2.4-RELEASE * Wed Apr 29 2020 Ron Olson 5.2.3-1 diff --git a/swift.patch b/swift.patch deleted file mode 100644 index 80cc2c8..0000000 --- a/swift.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -Naur swift-orig/utils/build-presets.ini swift/utils/build-presets.ini ---- swift-orig/utils/build-presets.ini 2020-02-10 23:48:46.000000000 -0600 -+++ swift/utils/build-presets.ini 2020-02-13 20:40:30.123310629 -0600 -@@ -527,7 +527,6 @@ - release - assertions - --build-swift-stdlib-unittest-extra - - # We run the OS X tests and validation tests. - test -diff -Naur swift-orig/utils/swift_build_support/swift_build_support/host_specific_configuration.py swift/utils/swift_build_support/swift_build_support/host_specific_configuration.py ---- swift-orig/utils/swift_build_support/swift_build_support/host_specific_configuration.py 2020-02-10 23:48:46.000000000 -0600 -+++ swift/utils/swift_build_support/swift_build_support/host_specific_configuration.py 2020-02-13 20:22:27.615497246 -0600 -@@ -12,7 +12,7 @@ - - from argparse import ArgumentError - --import diagnostics -+from . import diagnostics - - from .targets import StdlibDeploymentTarget -