@@ -68,10 +68,10 @@ extension DarwinToolchain {
68
68
// Same as an executable, but with the -dylib flag
69
69
linkerTool = . dynamicLinker
70
70
commandLine. appendFlag ( " -dynamiclib " )
71
- addLinkInputs ( shouldUseInputFileList: shouldUseInputFileList,
72
- commandLine: & commandLine,
73
- inputs: inputs,
74
- linkerOutputType: linkerOutputType)
71
+ try addLinkInputs ( shouldUseInputFileList: shouldUseInputFileList,
72
+ commandLine: & commandLine,
73
+ inputs: inputs,
74
+ linkerOutputType: linkerOutputType)
75
75
try addDynamicLinkerFlags ( targetInfo: targetInfo,
76
76
parsedOptions: & parsedOptions,
77
77
commandLine: & commandLine,
@@ -81,10 +81,10 @@ extension DarwinToolchain {
81
81
82
82
case . executable:
83
83
linkerTool = . dynamicLinker
84
- addLinkInputs ( shouldUseInputFileList: shouldUseInputFileList,
85
- commandLine: & commandLine,
86
- inputs: inputs,
87
- linkerOutputType: linkerOutputType)
84
+ try addLinkInputs ( shouldUseInputFileList: shouldUseInputFileList,
85
+ commandLine: & commandLine,
86
+ inputs: inputs,
87
+ linkerOutputType: linkerOutputType)
88
88
try addDynamicLinkerFlags ( targetInfo: targetInfo,
89
89
parsedOptions: & parsedOptions,
90
90
commandLine: & commandLine,
@@ -95,10 +95,10 @@ extension DarwinToolchain {
95
95
case . staticLibrary:
96
96
linkerTool = . staticLinker( lto)
97
97
commandLine. appendFlag ( . static)
98
- addLinkInputs ( shouldUseInputFileList: shouldUseInputFileList,
99
- commandLine: & commandLine,
100
- inputs: inputs,
101
- linkerOutputType: linkerOutputType)
98
+ try addLinkInputs ( shouldUseInputFileList: shouldUseInputFileList,
99
+ commandLine: & commandLine,
100
+ inputs: inputs,
101
+ linkerOutputType: linkerOutputType)
102
102
}
103
103
104
104
// Add the output
@@ -111,7 +111,7 @@ extension DarwinToolchain {
111
111
private func addLinkInputs( shouldUseInputFileList: Bool ,
112
112
commandLine: inout [ Job . ArgTemplate ] ,
113
113
inputs: [ TypedVirtualPath ] ,
114
- linkerOutputType: LinkOutputType ) {
114
+ linkerOutputType: LinkOutputType ) throws {
115
115
// inputs LinkFileList
116
116
if shouldUseInputFileList {
117
117
commandLine. appendFlag ( . filelist)
@@ -129,8 +129,8 @@ extension DarwinToolchain {
129
129
inputPaths. append ( input. file)
130
130
}
131
131
}
132
- let fileList = VirtualPath . createUniqueFilelist ( RelativePath ( " inputs.LinkFileList " ) ,
133
- . list( inputPaths) )
132
+ let fileList = try VirtualPath . createUniqueFilelist ( RelativePath ( validating : " inputs.LinkFileList " ) ,
133
+ . list( inputPaths) )
134
134
commandLine. appendPath ( fileList)
135
135
if linkerOutputType != . staticLibrary {
136
136
for module in inputModules {
0 commit comments