@@ -461,7 +461,7 @@ public final class LdLinkerSpec : GenericLinkerSpec, SpecIdentifierType, @unchec
461461 let fileListPath = cbc. scope. evaluate ( BuiltinMacros . __INPUT_FILE_LIST_PATH__, lookup: linkerDriverLookup)
462462 if !fileListPath. isEmpty {
463463 let fileListPath = fileListPath
464- cbc. producer. writeFileSpec. constructFileTasks ( CommandBuildContext ( producer: cbc. producer, scope: cbc. scope, inputs: [ ] , output: fileListPath) , delegate, contents: inputFileListContents ( cbc) , permissions: nil , preparesForIndexing: false , additionalTaskOrderingOptions: [ . immediate, . ignorePhaseOrdering] )
464+ cbc. producer. writeFileSpec. constructFileTasks ( CommandBuildContext ( producer: cbc. producer, scope: cbc. scope, inputs: [ ] , output: fileListPath) , delegate, contents: inputFileListContents ( cbc, lookup : linkerDriverLookup ) , permissions: nil , preparesForIndexing: false , additionalTaskOrderingOptions: [ . immediate, . ignorePhaseOrdering] )
465465 inputPaths. append ( fileListPath)
466466 }
467467
@@ -1655,6 +1655,11 @@ public final class LibtoolLinkerSpec : GenericLinkerSpec, SpecIdentifierType, @u
16551655 return resolveExecutablePath ( producer, lookupPath)
16561656 }
16571657
1658+ public override func inputFileListContents( _ cbc: CommandBuildContext , lookup: ( ( MacroDeclaration ) -> MacroExpression ? ) ? = nil ) -> ByteString {
1659+ let format = cbc. scope. evaluate ( BuiltinMacros . LIBTOOL_FILE_LIST_FORMAT, lookup: lookup)
1660+ return ByteString ( encodingAsUTF8: ResponseFiles . responseFileContents ( args: cbc. inputs. map { $0. absolutePath. strWithPosixSlashes } , format: format) )
1661+ }
1662+
16581663 static func discoveredCommandLineToolSpecInfo( _ producer: any CommandProducer , _ delegate: any CoreClientTargetDiagnosticProducingDelegate , toolPath: Path ) async throws -> DiscoveredLibtoolLinkerToolSpecInfo {
16591664 if toolPath. basenameWithoutSuffix == " llvm-lib " || toolPath. basenameWithoutSuffix == " ar " || toolPath. basenameWithoutSuffix. hasSuffix ( " -ar " ) {
16601665 return DiscoveredLibtoolLinkerToolSpecInfo ( toolPath: toolPath, toolVersion: nil )
0 commit comments