UserToolchain
UserToolchain.swift:25final class UserToolchain
final class UserToolchain
import PackageModel
protocol Toolchain
init(swiftSDK: SwiftSDK, environment: Environment = .current, searchStrategy: SearchStrategy = .default, customLibrariesLocation: ToolchainConfiguration.SwiftPMLibrariesLocation? = nil, customInstalledSwiftPMConfiguration: InstalledSwiftPMConfiguration? = nil, fileSystem: any FileSystem = localFileSystem) throws
static func determineLibrarian(triple: Triple, binDirectories: [AbsolutePath], useXcrun: Bool, environment: Environment, searchPaths: [AbsolutePath], extraSwiftFlags: [String], fileSystem: any FileSystem) throws -> AbsolutePath
static func determineSwiftCompilers(binDirectories: [AbsolutePath], useXcrun: Bool, environment: Environment, searchPaths: [AbsolutePath], fileSystem: any FileSystem) throws -> SwiftCompilers
Determines the Swift compiler paths for compilation and manifest parsing.
let architectures: [String]?
The list of CPU architectures to build for.
var extraFlags: BuildFlags
let includeSearchPaths: [AbsolutePath]
let installedSwiftPMConfiguration: InstalledSwiftPMConfiguration
let librarianPath: AbsolutePath
let librarySearchPaths: [AbsolutePath]
var sdkRootPath: AbsolutePath? { get }
var swiftCompilerEnvironment: Environment { get }
var swiftCompilerFlags: [String] { get }
let swiftCompilerPath: AbsolutePath
var swiftCompilerPathForManifests: AbsolutePath { get }
var swiftInterpreterPath: AbsolutePath { get }
Path of the swift
interpreter.
var swiftPMLibrariesLocation: ToolchainConfiguration.SwiftPMLibrariesLocation { get }
var swiftResourcesPath: AbsolutePath? { get }
Path containing Swift resources for dynamic linking.
let swiftSDK: SwiftSDK
The Swift SDK used by this toolchain.
var swiftStaticResourcesPath: AbsolutePath? { get }
Path containing Swift resources for static linking.
var swiftTestingPathOnWindows: AbsolutePath? { get }
let targetTriple: Triple
var xctestPath: AbsolutePath? { get }
func _isClangCompilerVendorApple() throws -> Bool?
func getClangCompiler() throws -> AbsolutePath
Returns the path to clang compiler tool.
func getLLDB() throws -> AbsolutePath
Returns the path to lldb.
func getLLVMCov() throws -> AbsolutePath
Returns the path to llvm-cov tool.
func getLLVMProf() throws -> AbsolutePath
Returns the path to llvm-prof tool.
func getSwiftAPIDigester() throws -> AbsolutePath
func getSymbolGraphExtract() throws -> AbsolutePath
func runtimeLibrary(for sanitizer: Sanitizer) throws -> AbsolutePath
Returns the runtime library for the given sanitizer.
enum SearchStrategy
typealias SwiftCompilers = (compile: AbsolutePath, manifest: AbsolutePath)
convenience init(destination: SwiftSDK, environment: Environment = .current, searchStrategy: SearchStrategy = .default, customLibrariesLocation: ToolchainConfiguration.SwiftPMLibrariesLocation? = nil) throws
var destination: SwiftSDK { get }
The compilation destination object.
var triple: Triple { get }
The target triple that should be used for compilation.
static func toolchainLibDir(swiftCompilerPath: AbsolutePath) throws -> AbsolutePath
var extraCCFlags: [String] { get }
var extraCPPFlags: [String] { get }
var extraSwiftCFlags: [String] { get }
var hostLibDir: AbsolutePath { get throws }
var macosSwiftStdlib: AbsolutePath { get throws }
var toolchainLibDir: AbsolutePath { get throws }
func swiftResourcesPath(isStatic: Bool) -> AbsolutePath?
Returns the appropriate Swift resources directory path.