File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,8 @@ extension WindowsToolchain {
117117 return . responseFilePath( input. file)
118118 } else if input. type == . object {
119119 return . path( input. file)
120+ } else if lto != nil && input. type == . llvmBitcode {
121+ return . path( input. file)
120122 } else {
121123 return nil
122124 }
@@ -162,6 +164,15 @@ extension WindowsToolchain {
162164 }
163165 }
164166
167+ if let lto = lto {
168+ switch lto {
169+ case . llvmFull:
170+ commandLine. appendFlag ( " -flto=full " )
171+ case . llvmThin:
172+ commandLine. appendFlag ( " -flto=thin " )
173+ }
174+ }
175+
165176 // Run clang++ in verbose mode if "-v" is set
166177 try commandLine. appendLast ( . v, from: & parsedOptions)
167178
Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ extension WindowsToolchain {
137137 case . illegalCrtName( let argument) :
138138 return " \( argument) is not a valid C Runtime for Windows "
139139 case . sdkNotFound:
140- return " swift development on Windows always requires SDK of the target platform "
140+ return " swift development on Windows always requires the SDK of target platform "
141141 }
142142 }
143143 }
You can’t perform that action at this time.
0 commit comments