Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
linux_os_versions: '["amazonlinux2", "bookworm", "noble", "jammy", "rhel-ubi9"]'
linux_swift_versions: '["nightly-main", "nightly-6.2"]'
linux_build_command: 'swift build'
enable_linux_static_sdk_build: true
linux_static_sdk_build_command: SWIFTTOOLSSUPPORTCORE_STATIC_LINK=1 swift build
windows_swift_versions: '["nightly-main"]'
windows_build_command: 'Invoke-Program swift build'
enable_android_sdk_build: true
Expand Down
11 changes: 11 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ if let deploymentTarget = ProcessInfo.processInfo.environment["SWIFTTSC_IOS_DEPL
iOSPlatform = .iOS(.v13)
}

let isStaticBuild = ProcessInfo.processInfo.environment["SWIFTTOOLSSUPPORTCORE_STATIC_LINK"] != nil

let CMakeFiles = ["CMakeLists.txt"]

let package = Package(
Expand Down Expand Up @@ -115,3 +117,12 @@ let package = Package(
exclude: ["pkgconfigInputs", "Inputs"]),
]
)

if isStaticBuild {
package.targets = package.targets.filter { target in
target.type != .test && !target.name.hasSuffix("TestSupport")
}
package.products = package.products.filter { product in
!product.name.hasSuffix("TestSupport")
}
}
Loading