File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Sources/swift-build-sdk-interfaces Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -157,6 +157,18 @@ do {
157157 try localFileSystem. createDirectory ( mcpPath, recursive: true )
158158 }
159159 }
160+
161+ // When building modules for an SDK, ignore any existing prebuilt modules.
162+ // modules. Do so by passing an intentially-bad path for the prebuilt
163+ // module cache path that's derived from the output path (but not the same
164+ // as that path). This prohibits the frontend scanning job from adding the
165+ // default prebuilt module cache path, while ensuring that we find no
166+ // prebuilt modules during this scan.
167+ args. append ( " -Xfrontend " )
168+ args. append ( " -prebuilt-module-cache-path " )
169+ args. append ( " -Xfrontend " )
170+ args. append ( outputDir. appending ( component: " __nonexistent__ " ) . pathString)
171+
160172 let baselineABIDir = try getArgumentAsPath ( " -baseline-abi-dir " )
161173 var driver = try Driver ( args: args,
162174 diagnosticsOutput: . engine( diagnosticsEngine) ,
You can’t perform that action at this time.
0 commit comments