Skip to content

Commit 54254d7

Browse files
committed
Make the properties of ToolchainConfiguration mutable, allowing easier customization of a single property of an already existing toolchain. It is already a struct, so the whole struct can be either mutable or immutable based on use.
1 parent f9e137c commit 54254d7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Sources/PackageModel/ToolchainConfiguration.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,30 @@
1010

1111
import TSCBasic
1212

13-
/// Toolchain configuration required for evaluation os swift code such as the manifests or plugins
13+
/// Toolchain configuration required for evaluation of swift code such as the manifests or plugins
1414
///
1515
/// These requirements are abstracted out to make it easier to add support for
1616
/// using the package manager with alternate toolchains in the future.
1717
public struct ToolchainConfiguration {
1818
/// The path of the swift compiler.
19-
public let swiftCompiler: AbsolutePath
19+
public var swiftCompiler: AbsolutePath
2020

21-
/// Extra flags to pass the Swift compiler.
22-
public let swiftCompilerFlags: [String]
21+
/// Extra arguments to pass the Swift compiler (defaults to the empty string).
22+
public var swiftCompilerFlags: [String]
2323

2424
/// The path of the library resources.
25-
public let libDir: AbsolutePath
25+
public var libDir: AbsolutePath
2626

2727
/// The bin directory.
28-
public let binDir: AbsolutePath?
28+
public var binDir: AbsolutePath?
2929

3030
/// The path to SDK root.
3131
///
3232
/// If provided, it will be passed to the swift interpreter.
33-
public let sdkRoot: AbsolutePath?
33+
public var sdkRoot: AbsolutePath?
3434

3535
/// XCTest Location
36-
public let xctestLocation: AbsolutePath?
36+
public var xctestLocation: AbsolutePath?
3737

3838
/// Creates the set of manifest resources associated with a `swiftc` executable.
3939
///

0 commit comments

Comments
 (0)