Skip to content

Commit 4e5cfa4

Browse files
authored
Merge pull request #1665 from swiftlang/module-abi-name
Pass through `-module-abi-name` to frontend
2 parents dafcec6 + 4ac29df commit 4e5cfa4

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

Sources/SwiftDriver/Jobs/FrontendJobHelpers.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ extension Driver {
214214
try commandLine.appendLast(.importUnderlyingModule, from: &parsedOptions)
215215
try commandLine.appendLast(.moduleCachePath, from: &parsedOptions)
216216
try commandLine.appendLast(.moduleLinkName, from: &parsedOptions)
217+
try commandLine.appendLast(.moduleAbiName, from: &parsedOptions)
217218
try commandLine.appendLast(.nostdimport, from: &parsedOptions)
218219
try commandLine.appendLast(.parseStdlib, from: &parsedOptions)
219220
try commandLine.appendLast(.solverMemoryThreshold, from: &parsedOptions)

Tests/SwiftDriverTests/SwiftDriverTests.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -827,6 +827,16 @@ final class SwiftDriverTests: XCTestCase {
827827
}
828828
}
829829

830+
func testModuleABIName() throws {
831+
var driver = try Driver(
832+
args: ["swiftc", "foo.swift", "-module-name", "Mod", "-module-abi-name", "ABIMod"]
833+
)
834+
let jobs = try driver.planBuild()
835+
let compileJob = try jobs.findJob(.compile)
836+
XCTAssert(compileJob.commandLine.contains(.flag("-module-abi-name")))
837+
XCTAssert(compileJob.commandLine.contains(.flag("ABIMod")))
838+
}
839+
830840
func testStandardCompileJobs() throws {
831841
var driver1 = try Driver(args: ["swiftc", "foo.swift", "bar.swift", "-module-name", "Test"])
832842
let plannedJobs = try driver1.planBuild().removingAutolinkExtractJobs()

0 commit comments

Comments
 (0)