From 501b0080421f893f86ea29ade0922ca5b2860227 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Thu, 29 Sep 2022 22:48:22 +0100 Subject: [PATCH 1/2] test: check static linking of FoundationNetworking This was fixed in https://github.com/apple/swift-corelibs-foundation/pull/3135 for Swift 5.5, but regressed in Swift 5.6 and Swift 5.7 --- test/Misc/foundation_static_linking.swift | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 test/Misc/foundation_static_linking.swift diff --git a/test/Misc/foundation_static_linking.swift b/test/Misc/foundation_static_linking.swift new file mode 100644 index 0000000000000..39bf02830be60 --- /dev/null +++ b/test/Misc/foundation_static_linking.swift @@ -0,0 +1,6 @@ +// RUN: %target-swiftc_driver -static-stdlib -o %t/foundation_static_linking %s +// RUN: not --crash %t/foundation_static_linking + +import Foundation + +_ = try! Data(contentsOf: URL(string: "http://httpbin.org/get")!) From 2f86cf6054fcca1eecb42729ce71b1438d69b250 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Fri, 30 Sep 2022 12:21:55 +0100 Subject: [PATCH 2/2] test: add REQUIRES: OS to foundation linking --- test/Misc/foundation_static_linking.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/test/Misc/foundation_static_linking.swift b/test/Misc/foundation_static_linking.swift index 39bf02830be60..7cd6bfe1cb91e 100644 --- a/test/Misc/foundation_static_linking.swift +++ b/test/Misc/foundation_static_linking.swift @@ -1,3 +1,4 @@ +// REQUIRES: OS=linux-gnu // RUN: %target-swiftc_driver -static-stdlib -o %t/foundation_static_linking %s // RUN: not --crash %t/foundation_static_linking