BuildParameters
BuildParameters.swift:18struct BuildParameters
struct BuildParameters
import SPMBuildCore
protocol Encodable
A type that can encode itself to an external representation.
init(destination: Destination, dataPath: AbsolutePath, configuration: BuildConfiguration, toolchain: Toolchain, triple: Triple? = nil, flags: BuildFlags, pkgConfigDirectories: [AbsolutePath] = [], architectures: [String]? = nil, workers: UInt32 = UInt32(ProcessInfo.processInfo.activeProcessorCount), shouldCreateDylibForDynamicProducts: Bool = true, sanitizers: EnabledSanitizers = EnabledSanitizers(), indexStoreMode: IndexStoreMode = .auto, isXcodeBuildSystemEnabled: Bool = false, shouldSkipBuilding: Bool = false, prepareForIndexing: PrepareForIndexingMode = .off, debuggingParameters: Debugging? = nil, driverParameters: Driver = .init(), linkingParameters: Linking = .init(), outputParameters: Output = .init(), testingParameters: Testing? = nil) throws
var architectures: [String]?
The architectures to build for.
var buildDescriptionPath: AbsolutePath { get }
var buildEnvironment: BuildEnvironment { get }
The current build environment.
var buildPath: AbsolutePath { get }
The path to the build directory (inside the data directory).
var codeCovDataFile: AbsolutePath { get }
The path to the code coverage profdata file.
var codeCovPath: AbsolutePath { get }
The path to the code coverage directory.
var configuration: BuildConfiguration
The build configuration.
var dataPath: AbsolutePath
The path to the data directory.
var debuggingParameters: Debugging
Build parameters related to debugging.
var debuggingStrategy: DebuggingStrategy? { get }
The debugging strategy according to the current build parameters.
var destination: Destination
The destination these parameters are going to be used for.
var driverParameters: Driver
Build parameters related to Swift Driver.
var flags: BuildFlags
Extra build flags.
var indexStore: AbsolutePath { get }
The path to the index store directory.
var indexStoreMode: IndexStoreMode
The mode to use for indexing-while-building feature.
var isXcodeBuildSystemEnabled: Bool
Whether the Xcode build system is used.
var linkingParameters: Linking
Build parameters related to linking.
var llbuildManifest: AbsolutePath { get }
var outputParameters: Output
Build parameters related to output and logging.
var pifManifest: AbsolutePath { get }
var pkgConfigDirectories: [AbsolutePath]
An array of paths to search for pkg-config .pc
files.
var prepareForIndexing: PrepareForIndexingMode
Do minimal build to prepare for indexing
var sanitizers: EnabledSanitizers
Which compiler sanitizers should be enabled
var shouldCreateDylibForDynamicProducts: Bool
Whether to create dylibs for dynamic library products.
var shouldSkipBuilding: Bool
var suffix: String { get }
Suffix appended to build manifest nodes to distinguish nodes created for tools from nodes created for end products, i.e. nodes for host vs target triples.
var testOutputPath: AbsolutePath { get }
var testingParameters: Testing
Build parameters related to testing.
var toolchain: Toolchain { get }
The toolchain.
var triple: Triple
The triple for which the code is built using these build parameters.
var useWholeModuleOptimization: Bool { get }
Whether to build Swift code with whole module optimization (WMO) enabled.
var workers: UInt32
How many jobs should llbuild and the Swift compiler spawn
func binaryPath(for product: ResolvedProduct) throws -> AbsolutePath
Returns the path to the binary of a product for the current build parameters.
func binaryRelativePath(for product: ResolvedProduct) throws -> RelativePath
Returns the path to the binary of a product for the current build parameters, relative to the build directory.
enum DebugInfoFormat
Represents the debug information format.
struct Debugging
enum DebuggingStrategy
Represents the debugging strategy.
enum Destination
The destination for which code should be compiled for.
struct Driver
Build parameters related to Swift Driver grouped in a single type to aggregate those in one place.
enum IndexStoreMode
Mode for the indexing-while-building feature.
enum LinkTimeOptimizationMode
An optional intermodule optimization to run at link time.
struct Linking
Build parameters related to linking grouped in a single type to aggregate those in one place.
struct Output
Build parameters related to output and logging grouped in a single type to aggregate those in one place.
enum PrepareForIndexingMode
enum TargetDependencyImportCheckingMode
A mode for explicit import checking
enum TestProductStyle
Represents the test product style.
struct Testing
Build parameters related to testing grouped in a single type to aggregate those in one place.
var targetTriple: Triple { get }
import Build
var moduleCache: AbsolutePath { get throws }
Returns the directory to be used for module cache.
func tripleArgs(for target: ResolvedModule) throws -> [String]
Computes the target triple arguments for a given resolved target.