Skip to content

Commit 14361df

Browse files
committed
Stop passing -resource-dir to the Frontend if the flag wasn't passed in on the command-line
1 parent 42f79fb commit 14361df

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Sources/SwiftDriver/Jobs/FrontendJobHelpers.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,11 +392,13 @@ extension Driver {
392392
try addPathArgument(.absolute(workingDirectory), to: &commandLine, remap: jobNeedPathRemap)
393393
}
394394

395+
if parsedOptions.hasArgument(.resourceDir) {
395396
// Resource directory.
396397
try addPathOption(option: .resourceDir,
397398
path: VirtualPath.lookup(frontendTargetInfo.runtimeResourcePath.path),
398399
to: &commandLine,
399400
remap: jobNeedPathRemap)
401+
}
400402

401403
if self.useStaticResourceDir {
402404
commandLine.appendFlag("-use-static-resource-dir")

Tests/SwiftDriverTests/ExplicitModuleBuildTests.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
551551
XCTAssertEqual(linkLibrary.shouldForceLoad, shouldForceLoad)
552552
}
553553

554+
#if os(Windows)
554555
for (depId, depInfo) in dependencyGraph.modules {
555556
switch depId {
556557
case .swiftPrebuiltExternal("Swift"):
@@ -587,6 +588,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
587588
continue
588589
}
589590
}
591+
#endif
590592
}
591593
}
592594

0 commit comments

Comments
 (0)