Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase the -driver-filelist-threshold workaround #329

Merged
merged 2 commits into from
Oct 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Generator/Sources/SwiftWinRT/writeProjectionFiles.swift
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,11 @@ fileprivate func writeSwiftModuleFiles(_ module: Module, directoryPath: String,
}

// Workaround for https://github.com/swiftlang/swift-driver/issues/1477
// The threshold value has to be real high because the driver multiplies the number of input files by ~50.
// See https://github.com/swiftlang/swift-driver/blob/6af4c7dbc0559694578e5221d49970f94603b9e5/Sources/SwiftDriver/Jobs/FrontendJobHelpers.swift#L714
writer.writeSingleLineCommand(
"target_compile_options", .autoquote(targetName),
"PRIVATE", "-driver-filelist-threshold=9999")
"PRIVATE", .unquoted("-driver-filelist-threshold=\(Int32.max)"))

writer.writeTargetLinkLibraries(targetName, .public,
[ cmakeOptions.getTargetName(moduleName: module.abiModuleName), SupportModules.WinRT.moduleName ]
Expand Down
Loading