Skip to content

Commit 71eeb61

Browse files
committed
[xcodegen] Avoid emitting Swift Obj-C header
This isn't needed currently and works around an assertion failure.
1 parent 780a546 commit 71eeb61

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

utils/swift-xcodegen/Sources/SwiftXcodeGen/Generator/ProjectGenerator.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,13 @@ fileprivate final class ProjectGenerator {
558558
buildSettings.common.DEFINES_MODULE = "YES"
559559
}
560560

561+
// Disable the Obj-C bridging header; we don't currently use this, and
562+
// even if we did, we'd probably want to use the one in the Ninja build
563+
// folder.
564+
// This also works around a compiler crash
565+
// (https://github.com/swiftlang/swift/issues/78190).
566+
buildSettings.common.SWIFT_OBJC_INTERFACE_HEADER_NAME = ""
567+
561568
if let last = buildArgs.takeFlagGroup(.O, .Onone) {
562569
buildSettings.common.SWIFT_OPTIMIZATION_LEVEL = last.printed
563570
}

utils/swift-xcodegen/Sources/Xcodeproj/XcodeProjectModel.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,7 @@ public struct Xcode {
441441
public var SWIFT_FORCE_DYNAMIC_LINK_STDLIB: String?
442442
public var SWIFT_INCLUDE_PATHS: [String]?
443443
public var SWIFT_MODULE_ALIASES: [String: String]?
444+
public var SWIFT_OBJC_INTERFACE_HEADER_NAME: String?
444445
public var SWIFT_OPTIMIZATION_LEVEL: String?
445446
public var SWIFT_VERSION: String?
446447
public var TARGET_NAME: String?

0 commit comments

Comments
 (0)