@@ -1379,17 +1379,22 @@ public final class LibtoolLinkerSpec : GenericLinkerSpec, SpecIdentifierType, @u
1379
1379
1380
1380
override public func constructLinkerTasks( _ cbc: CommandBuildContext , _ delegate: any TaskGenerationDelegate , libraries: [ LibrarySpecifier ] , usedTools: [ CommandLineToolSpec : Set < FileTypeSpec > ] ) async {
1381
1381
var inputPaths = cbc. inputs. map ( { $0. absolutePath } )
1382
+ var specialArgs = [ String] ( )
1382
1383
1383
- // Define the linker file list.
1384
- let fileListPath = cbc. scope. evaluate ( BuiltinMacros . __INPUT_FILE_LIST_PATH__)
1385
- if !fileListPath. isEmpty {
1386
- let contents = cbc. inputs. map ( { return $0. absolutePath. strWithPosixSlashes + " \n " } ) . joined ( separator: " " )
1387
- cbc. producer. writeFileSpec. constructFileTasks ( CommandBuildContext ( producer: cbc. producer, scope: cbc. scope, inputs: [ ] , output: fileListPath) , delegate, contents: ByteString ( encodingAsUTF8: contents) , permissions: nil , preparesForIndexing: false , additionalTaskOrderingOptions: [ . immediate, . ignorePhaseOrdering] )
1388
- inputPaths. append ( fileListPath)
1384
+ if cbc. scope. evaluate ( BuiltinMacros . LIBTOOL_USE_RESPONSE_FILE) {
1385
+ // Define the linker file list.
1386
+ let fileListPath = cbc. scope. evaluate ( BuiltinMacros . __INPUT_FILE_LIST_PATH__)
1387
+ if !fileListPath. isEmpty {
1388
+ let contents = cbc. inputs. map ( { return $0. absolutePath. strWithPosixSlashes + " \n " } ) . joined ( separator: " " )
1389
+ cbc. producer. writeFileSpec. constructFileTasks ( CommandBuildContext ( producer: cbc. producer, scope: cbc. scope, inputs: [ ] , output: fileListPath) , delegate, contents: ByteString ( encodingAsUTF8: contents) , permissions: nil , preparesForIndexing: false , additionalTaskOrderingOptions: [ . immediate, . ignorePhaseOrdering] )
1390
+ inputPaths. append ( fileListPath)
1391
+ }
1392
+ } else {
1393
+ specialArgs. append ( contentsOf: cbc. inputs. map { $0. absolutePath. str } )
1394
+ inputPaths. append ( contentsOf: cbc. inputs. map { $0. absolutePath } )
1389
1395
}
1390
1396
1391
1397
// Add arguments for the contents of the Link Binaries build phase.
1392
- var specialArgs = [ String] ( )
1393
1398
specialArgs. append ( contentsOf: libraries. flatMap { specifier -> [ String ] in
1394
1399
let basename = specifier. path. basename
1395
1400
0 commit comments