From 16e92aa601bed218c022e67f756ef60dda7c76b6 Mon Sep 17 00:00:00 2001 From: Yim Lee Date: Mon, 8 Feb 2021 14:06:09 -0800 Subject: [PATCH] Revert "Add swift-crypto dependency (#3202)" This reverts commit 60d6da69ef7e35fb01aac813badd98edf83b8778. --- CMakeLists.txt | 3 +-- Documentation/Contributing.md | 7 ------- Package.swift | 8 +++----- Sources/PackageCollections/CMakeLists.txt | 4 ---- .../Signing/PackageCollectionSignature.swift | 16 ---------------- Utilities/bootstrap | 18 +----------------- 6 files changed, 5 insertions(+), 51 deletions(-) delete mode 100644 Sources/PackageCollections/Signing/PackageCollectionSignature.swift diff --git a/CMakeLists.txt b/CMakeLists.txt index 1755ec9a897..fbc4e361522 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ # This source file is part of the Swift.org open source project # -# Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors +# Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See http://swift.org/LICENSE.txt for license information @@ -47,7 +47,6 @@ if(FIND_PM_DEPS) endif() find_package(ArgumentParser CONFIG REQUIRED) - find_package(SwiftCrypto CONFIG REQUIRED) find_package(SwiftDriver CONFIG REQUIRED) endif() diff --git a/Documentation/Contributing.md b/Documentation/Contributing.md index ba0fbbfbea3..7667de91346 100644 --- a/Documentation/Contributing.md +++ b/Documentation/Contributing.md @@ -152,13 +152,6 @@ For example, if the latest tag is 0.3.1: $> git clone https://github.com/apple/swift-argument-parser --branch 0.3.1 ``` -5. Clone [swift-crypto](https://github.com/apple/swift-crypto) beside the SwiftPM directory and check out tag with the [latest version](https://github.com/apple/swift-crypto/tags). - -For example, if the latest tag is 1.1.3: -```bash -$> git clone https://github.com/apple/swift-crypto --branch 1.1.3 -``` - #### Building ```bash diff --git a/Package.swift b/Package.swift index e36d2d6b607..16f796a2aca 100644 --- a/Package.swift +++ b/Package.swift @@ -3,7 +3,7 @@ /* This source file is part of the Swift.org open source project - Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors + Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors Licensed under Apache License v2.0 with Runtime Library Exception See http://swift.org/LICENSE.txt for license information @@ -20,7 +20,7 @@ let macOSPlatform: SupportedPlatform if let deploymentTarget = ProcessInfo.processInfo.environment["SWIFTPM_MACOS_DEPLOYMENT_TARGET"] { macOSPlatform = .macOS(deploymentTarget) } else { - macOSPlatform = .macOS(.v10_15) + macOSPlatform = .macOS(.v10_10) } let package = Package( @@ -156,7 +156,7 @@ let package = Package( .target( /** Data structures and support for package collections */ name: "PackageCollections", - dependencies: ["SwiftToolsSupport-auto", "Basics", "PackageModel", "SourceControl", "PackageCollectionsModel", "Crypto"]), + dependencies: ["SwiftToolsSupport-auto", "Basics", "PackageModel", "SourceControl", "PackageCollectionsModel"]), // MARK: Package Manager Functionality @@ -323,13 +323,11 @@ if ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil { // dependency version changes here with those projects. .package(url: "https://github.com/apple/swift-argument-parser.git", .upToNextMinor(from: "0.3.1")), .package(url: "https://github.com/apple/swift-driver.git", .branch(relatedDependenciesBranch)), - .package(url: "https://github.com/apple/swift-crypto.git", .branch(relatedDependenciesBranch)), ] } else { package.dependencies += [ .package(path: "../swift-tools-support-core"), .package(path: "../swift-argument-parser"), .package(path: "../swift-driver"), - .package(path: "../swift-crypto"), ] } diff --git a/Sources/PackageCollections/CMakeLists.txt b/Sources/PackageCollections/CMakeLists.txt index 9293c4f9ab4..fa94a4b451f 100644 --- a/Sources/PackageCollections/CMakeLists.txt +++ b/Sources/PackageCollections/CMakeLists.txt @@ -32,15 +32,11 @@ target_link_libraries(PackageCollections PUBLIC TSCBasic TSCUtility Basics - Crypto - CCryptoBoringSSL PackageModel SourceControl) # NOTE(compnerd) workaround for CMake not setting up include flags yet set_target_properties(PackageCollections PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY}) -target_link_options(PackageCollections PRIVATE - "$<$:SHELL:-Xlinker -framework -Xlinker Security>") if(USE_CMAKE_INSTALL) install(TARGETS PackageCollections diff --git a/Sources/PackageCollections/Signing/PackageCollectionSignature.swift b/Sources/PackageCollections/Signing/PackageCollectionSignature.swift deleted file mode 100644 index edab6e32ab5..00000000000 --- a/Sources/PackageCollections/Signing/PackageCollectionSignature.swift +++ /dev/null @@ -1,16 +0,0 @@ -/* - This source file is part of the Swift.org open source project - - Copyright (c) 2021 Apple Inc. and the Swift project authors - Licensed under Apache License v2.0 with Runtime Library Exception - - See http://swift.org/LICENSE.txt for license information - See http://swift.org/CONTRIBUTORS.txt for Swift project authors - */ - -import Crypto -#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) -import Security -#else -import CCryptoBoringSSL -#endif diff --git a/Utilities/bootstrap b/Utilities/bootstrap index 01aa3efd1c1..ead6af68a9c 100755 --- a/Utilities/bootstrap +++ b/Utilities/bootstrap @@ -3,7 +3,7 @@ """ This source file is part of the Swift.org open source project - Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors + Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors Licensed under Apache License v2.0 with Runtime Library Exception See http://swift.org/LICENSE.txt for license information @@ -171,7 +171,6 @@ def parse_global_args(args): args.yams_source_dir = os.path.join(args.project_root, "..", "yams") args.swift_argument_parser_source_dir = os.path.join(args.project_root, "..", "swift-argument-parser") args.swift_driver_source_dir = os.path.join(args.project_root, "..", "swift-driver") - args.swift_crypto_source_dir = os.path.join(args.project_root, "..", "swift-crypto") args.source_root = os.path.join(args.project_root, "Sources") if platform.system() == 'Darwin': @@ -308,7 +307,6 @@ def build(args): build_yams(args) build_swift_argument_parser(args) build_swift_driver(args) - build_swift_crypto(args) build_swiftpm_with_cmake(args) build_swiftpm_with_swiftpm(args,integrated_swift_driver=False) @@ -561,17 +559,6 @@ def build_swift_driver(args): cmake_flags.append("-DCMAKE_OSX_DEPLOYMENT_TARGET=%s" % g_macos_deployment_target) build_with_cmake(args, cmake_flags, args.swift_driver_source_dir, args.swift_driver_build_dir) - -def build_swift_crypto(args): - note("Building SwiftCrypto") - args.swift_crypto_build_dir = os.path.join(args.target_dir, "swift-crypto") - - cmake_flags = [] - if platform.system() == 'Darwin': - cmake_flags.append("-DCMAKE_C_FLAGS=-target %s%s" % (get_build_target(args), g_macos_deployment_target)) - cmake_flags.append("-DCMAKE_OSX_DEPLOYMENT_TARGET=%s" % g_macos_deployment_target) - - build_with_cmake(args, cmake_flags, args.swift_crypto_source_dir, args.swift_crypto_build_dir) def add_rpath_for_cmake_build(args, rpath): "Adds the given rpath to the CMake-built swift-build" @@ -591,7 +578,6 @@ def build_swiftpm_with_cmake(args): "-DYams_DIR=" + os.path.join(args.yams_build_dir, "cmake/modules"), "-DArgumentParser_DIR=" + os.path.join(args.swift_argument_parser_build_dir, "cmake/modules"), "-DSwiftDriver_DIR=" + os.path.join(args.swift_driver_build_dir, "cmake/modules"), - "-DSwiftCrypto_DIR=" + os.path.join(args.swift_crypto_build_dir, "cmake/modules"), "-DFIND_PM_DEPS:BOOL=YES", ] else: @@ -612,7 +598,6 @@ def build_swiftpm_with_cmake(args): add_rpath_for_cmake_build(args, os.path.join(args.yams_build_dir, "lib")) add_rpath_for_cmake_build(args, os.path.join(args.swift_argument_parser_build_dir, "lib")) add_rpath_for_cmake_build(args, os.path.join(args.swift_driver_build_dir, "lib")) - add_rpath_for_cmake_build(args, os.path.join(args.swift_crypto_build_dir, "lib")) def build_swiftpm_with_swiftpm(args, integrated_swift_driver): """Builds SwiftPM using the version of SwiftPM built with CMake.""" @@ -709,7 +694,6 @@ def get_swiftpm_env_cmd(args): os.path.join(args.yams_build_dir, "lib"), os.path.join(args.swift_argument_parser_build_dir, "lib"), os.path.join(args.swift_driver_build_dir, "lib"), - os.path.join(args.swift_crypto_build_dir, "lib"), ] + args.target_info["paths"]["runtimeLibraryPaths"]) if platform.system() == 'Darwin':