@@ -23,20 +23,20 @@ import struct SPMBuildCore.PrebuildCommandResult
23
23
import enum TSCBasic. ProcessEnv
24
24
25
25
/// Target description for a Clang target i.e. C language family target.
26
- package final class ClangTargetBuildDescription {
26
+ public final class ClangTargetBuildDescription {
27
27
/// The package this target belongs to.
28
- package let package : ResolvedPackage
28
+ public let package : ResolvedPackage
29
29
30
30
/// The target described by this target.
31
- package let target : ResolvedModule
31
+ public let target : ResolvedModule
32
32
33
33
/// The underlying clang target.
34
- package let clangTarget : ClangTarget
34
+ public let clangTarget : ClangTarget
35
35
36
36
/// The tools version of the package that declared the target. This can
37
37
/// can be used to conditionalize semantically significant changes in how
38
38
/// a target is built.
39
- package let toolsVersion : ToolsVersion
39
+ public let toolsVersion : ToolsVersion
40
40
41
41
/// The build parameters.
42
42
let buildParameters : BuildParameters
@@ -47,7 +47,7 @@ package final class ClangTargetBuildDescription {
47
47
}
48
48
49
49
/// The list of all resource files in the target, including the derived ones.
50
- package var resources : [ Resource ] {
50
+ public var resources : [ Resource ] {
51
51
self . target. underlying. resources + self . pluginDerivedResources
52
52
}
53
53
@@ -65,7 +65,7 @@ package final class ClangTargetBuildDescription {
65
65
}
66
66
67
67
/// The modulemap file for this target, if any.
68
- package private( set) var moduleMap : AbsolutePath ?
68
+ public private( set) var moduleMap : AbsolutePath ?
69
69
70
70
/// Path to the temporary directory for this target.
71
71
var tempsPath : AbsolutePath
@@ -82,13 +82,13 @@ package final class ClangTargetBuildDescription {
82
82
private var pluginDerivedResources : [ Resource ]
83
83
84
84
/// Path to the resource accessor header file, if generated.
85
- package private( set) var resourceAccessorHeaderFile : AbsolutePath ?
85
+ public private( set) var resourceAccessorHeaderFile : AbsolutePath ?
86
86
87
87
/// Path to the resource Info.plist file, if generated.
88
- package private( set) var resourceBundleInfoPlistPath : AbsolutePath ?
88
+ public private( set) var resourceBundleInfoPlistPath : AbsolutePath ?
89
89
90
90
/// The objects in this target.
91
- package var objects : [ AbsolutePath ] {
91
+ public var objects : [ AbsolutePath ] {
92
92
get throws {
93
93
try compilePaths ( ) . map ( \. object)
94
94
}
@@ -104,12 +104,12 @@ package final class ClangTargetBuildDescription {
104
104
private let fileSystem : FileSystem
105
105
106
106
/// If this target is a test target.
107
- package var isTestTarget : Bool {
107
+ public var isTestTarget : Bool {
108
108
target. type == . test
109
109
}
110
110
111
111
/// The results of applying any build tool plugins to this target.
112
- package let buildToolPluginInvocationResults : [ BuildToolPluginInvocationResult ]
112
+ public let buildToolPluginInvocationResults : [ BuildToolPluginInvocationResult ]
113
113
114
114
/// Create a new target description with target and build parameters.
115
115
init (
@@ -188,7 +188,7 @@ package final class ClangTargetBuildDescription {
188
188
}
189
189
190
190
/// An array of tuples containing filename, source, object and dependency path for each of the source in this target.
191
- package func compilePaths( )
191
+ public func compilePaths( )
192
192
throws -> [ ( filename: RelativePath , source: AbsolutePath , object: AbsolutePath , deps: AbsolutePath ) ]
193
193
{
194
194
let sources = [
@@ -212,7 +212,7 @@ package final class ClangTargetBuildDescription {
212
212
/// NOTE: The parameter to specify whether to get C++ semantics is currently optional, but this is only for revlock
213
213
/// avoidance with clients. Callers should always specify what they want based either the user's indication or on a
214
214
/// default value (possibly based on the filename suffix).
215
- package func basicArguments(
215
+ public func basicArguments(
216
216
isCXX isCXXOverride: Bool ? = . none,
217
217
isC: Bool = false
218
218
) throws -> [ String ] {
@@ -335,7 +335,7 @@ package final class ClangTargetBuildDescription {
335
335
return args
336
336
}
337
337
338
- package func emitCommandLine( for filePath: AbsolutePath ) throws -> [ String ] {
338
+ public func emitCommandLine( for filePath: AbsolutePath ) throws -> [ String ] {
339
339
let standards = [
340
340
( clangTarget. cxxLanguageStandard, SupportedLanguageExtension . cppExtensions) ,
341
341
( clangTarget. cLanguageStandard, SupportedLanguageExtension . cExtensions) ,
0 commit comments